Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config-ui-x breaks homebridge-apple-tv plugin #75

Closed
normen opened this issue Apr 6, 2018 · 16 comments
Closed

config-ui-x breaks homebridge-apple-tv plugin #75

normen opened this issue Apr 6, 2018 · 16 comments

Comments

@normen
Copy link

normen commented Apr 6, 2018

Hi,

it seems this plugin is causing issues in another homebridge plugin for some reason:

lprhodes/homebridge-apple-tv#9

@oznu
Copy link
Member

oznu commented Apr 7, 2018

I've setup this plugin and cannot replicate the issue.

:( [oznu@mac-pro.local:~] -2 INT $ homebridge
[2018-4-7 11:15:15] Loaded plugin: homebridge-apple-tv
[2018-4-7 11:15:15] Registering platform 'homebridge-apple-tv.AppleTV'
[2018-4-7 11:15:15] ---
[2018-4-7 11:15:15] Loaded plugin: homebridge-camera-ffmpeg
[2018-4-7 11:15:15] Registering platform 'homebridge-camera-ffmpeg.Camera-ffmpeg'
[2018-4-7 11:15:15] ---
[2018-4-7 11:15:15] Loaded plugin: homebridge-config-ui-x
[2018-4-7 11:15:15] Registering platform 'homebridge-config-ui-x.config'
[2018-4-7 11:15:15] ---
[2018-4-7 11:15:15] Loaded plugin: homebridge-platform-wemo
[2018-4-7 11:15:15] Registering platform 'homebridge-platform-wemo.BelkinWeMo'
[2018-4-7 11:15:15] ---
[2018-4-7 11:15:15] Loaded config.json with 0 accessories and 2 platforms.
[2018-4-7 11:15:15] ---
[2018-4-7 11:15:15] Loading 2 platforms...
[2018-4-7 11:15:15] [Config] Initializing config platform...
[2018-4-7 11:15:15] [Apple TV] Initializing AppleTV platform...
[2018-4-7 11:15:15] [Apple TV] [INFO] Automatically discovering Apple TV's
[2018-4-7 11:15:15] Loading 0 accessories...
Load homebridge-camera-ffmpeg.Camera-ffmpeg
Load homebridge-platform-wemo.BelkinWeMo
[2018-4-7 11:15:15] [homebridge-platform-wemo.BelkinWeMo] Ignoring WeMo Platform setup because it is not configured
[2018-4-7 11:15:16] [Config] Authentication Disabled
[2018-4-7 11:15:16] [Config] Console is listening on port 8080.
[2018-4-7 11:15:20] [Apple TV] [INFO] Discovered Apple TV (THE APPLE TV) at 192.168.1.99
[2018-4-7 11:15:20] [Apple TV] [INFO] Added pair switch for Apple TV (THE APPLE TV) at 192.168.1.99
[2018-4-7 11:15:20] [Apple TV] [INFO] Connecting to "Lounge Apple TV"
[2018-4-7 11:15:21] [Apple TV] [INFO] Connected to "Lounge Apple TV"
[2018-4-7 11:15:21] [Apple TV] Initializing platform accessory 'Pair THE APPLE TV'...
[2018-4-7 11:15:21] [Apple TV] Initializing platform accessory 'Up'...
[2018-4-7 11:15:21] [Apple TV] Initializing platform accessory 'Down'...
Setup Payload:
X-HM://00247HJ5JK22L
Scan this code with your HomeKit app on your iOS device to pair with Homebridge:

...

Or enter this code with your HomeKit app on your iOS device to pair with Homebridge:

    ┌────────────┐
    │ 446-01-911 │
    └────────────┘

[2018-4-7 11:15:21] Homebridge is running on port 51827.
[2018-4-7 11:15:22] [Apple TV]
[2018-4-7 11:15:22] [Apple TV] **************************************************************************************************************
[2018-4-7 11:15:22] [Apple TV] ** Welcome to version 1.0.2 of the Homebridge Apple TV Plugin!
[2018-4-7 11:15:22] [Apple TV] **
[2018-4-7 11:15:22] [Apple TV] ** Find out what's in the latest release here: https://github.com/lprhodes/homebridge-apple-tv/releases
[2018-4-7 11:15:22] [Apple TV] **
[2018-4-7 11:15:22] [Apple TV] ** If you like this plugin then please star it on GitHub or better yet
[2018-4-7 11:15:22] [Apple TV] ** buy me a drink using Paypal https://paypal.me/lprhodes or crypto https://goo.gl/bEn1RW.
[2018-4-7 11:15:22] [Apple TV] **
[2018-4-7 11:15:22] [Apple TV] ** Keep up to date with this plugin along with everything HomeKit and homebridge
[2018-4-7 11:15:22] [Apple TV] ** by signing up to my newsletter at http://workswith.io
[2018-4-7 11:15:22] [Apple TV] **
[2018-4-7 11:15:22] [Apple TV] ** You can disable this message by adding "hideWelcomeMessage": true to the config (see config-sample.json).
[2018-4-7 11:15:22] [Apple TV] **
[2018-4-7 11:15:22] [Apple TV] **************************************************************************************************************
[2018-4-7 11:15:22] [Apple TV]

My config:

{
    "bridge": {
        "username": "0E:E7:33:3A:A0:A7",
        "port": 51827,
        "pin": "446-01-911",
        "name": "Homebridge on Mac"
    },
    "platforms": [
        {
            "platform": "config",
            "name": "Config",
            "port": 8080,
            "sudo": false,
            "auth": false
        },
        {
            "platform": "AppleTV",
            "name": "Apple TV",
            "devices": [
                {
                    "id": "lounge",
                    "name": "Lounge Apple TV",
                    "credentials": "xxxxxxxxxx"
                }
            ],
            "accessories": [
                {
                    "deviceID": "lounge",
                    "name": "Up",
                    "command": "up"
                },
                {
                    "deviceID": "lounge",
                    "name": "Down",
                    "command": "down"
                }
            ]
        }
    ],
    "accessories": []
}

@normen
Copy link
Author

normen commented Apr 7, 2018

For me the AppleTV plugin doesn't discover any Apple TV devices until I disable config-ui-x from my config then the AppleTV plugin works.

Heres my config:

{
    "bridge": {
        "name": "Homebridge",
        "username": "X",
        "port": 51826,
        "pin": "X"
    },
    "accessories": [
        {
            "accessory": "http-motion-sensor",
            "name": "Melder Eingang",
            "port": 8301,
            "serial": "X"
        },
        {
            "accessory": "DummySwitch",
            "name": "Automate Switch 1"
        },
        {
            "accessory": "DummySwitch",
            "name": "Automate Switch 2"
        },
        {
            "accessory": "DummySwitch",
            "name": "Automate Switch 3"
        }
    ],
    "platforms": [
        {
            "platform": "cmdSwitch2",
            "switches": [
                {
                    "name": "Playstation",
                    "on_cmd": "ps4-waker",
                    "off_cmd": "ps4-waker standby",
                    "state_cmd": "ps4-waker search -t 500 | grep -i '200 Ok'",
                    "manufacturer": "Sony Corporation",
                    "model": "CUH-1001A",
                    "serial": "XXXXXXXXXXX"
                },
                {
                    "name": "3D Drucker",
                    "on_cmd": "curl -s -H 'Content-Type: application/json' -H 'X-Api-Key: BLAH' -X POST -d '{ \"command\":\"turnPSUOn\" }' http://makerpi.local/api/plugin/psucontrol",
                    "off_cmd": "curl -s -H 'Content-Type: application/json' -H 'X-Api-Key: BLAH' -X POST -d '{ \"command\":\"turnPSUOff\" }' http://makerpi.local/api/plugin/psucontrol",
                    "state_cmd": "curl -s -H 'Content-Type: application/json' -H 'X-Api-Key: BLAH' -X POST -d '{ \"command\":\"getPSUState\" }' http://makerpi.local/api/plugin/psucontrol | grep -i ': true'"
                }
            ]
        },
        {
            "platform": "MiLight",
            "name": "MiLight",
            "bridges": [
                {
                    "ip_address": "192.168.2.50",
                    "version": "v3",
                    "lights": {
                        "rgbw": [
                            "Spiegel",
                            "Fenster",
                            "Eingang",
                            "Sofa"
                        ]
                    },
                    "repeat": 1,
                    "delay": 100
                },
                {
                    "ip_address": "192.168.2.51",
                    "version": "v3",
                    "lights": {
                        "rgbw": [
                            "Decke Vorne",
                            "Decke Hinten",
                            "Säulen Vorne",
                            "Säulen Hinten"
                        ]
                    },
                    "repeat": 1,
                    "delay": 100
                }
            ]
        },
        {
            "platform": "ArduinoRCSwitch",
            "name": "Arduino RC Switch Platform",
            "serial_port_in": "/dev/ttyACM0",
            "serial_port_out": "/dev/ttyACM0",
            "input_output_timeout": 100,
            "switches": [
                {
                    "name": "Esstisch",
                    "hint": "310 / 1",
                    "on": {
                        "code": 4478259,
                        "pulse": 188
                    },
                    "off": {
                        "code": 4478268,
                        "pulse": 188
                    }
                },
                {
                    "name": "Ionisierer",
                    "hint": "310 / 2",
                    "on": {
                        "code": 4478403,
                        "pulse": 188
                    },
                    "off": {
                        "code": 4478412,
                        "pulse": 188
                    }
                },
                {
                    "name": "Spüle",
                    "hint": "310 / 3",
                    "on": {
                        "code": 4478723,
                        "pulse": 188
                    },
                    "off": {
                        "code": 4478732,
                        "pulse": 188
                    }
                },
                {
                    "name": "Waschbecken",
                    "hint": "310 / 4",
                    "on": {
                        "code": 4480259,
                        "pulse": 188
                    },
                    "off": {
                        "code": 4480268,
                        "pulse": 188
                    }
                },
                {
                    "name": "Nilpferd",
                    "hint": "315N / 1",
                    "on": {
                        "code": 4461875,
                        "pulse": 188
                    },
                    "off": {
                        "code": 4461884,
                        "pulse": 188
                    }
                },
                {
                    "name": "Igel",
                    "hint": "315N / 2",
                    "on": {
                        "code": 4462019,
                        "pulse": 188
                    },
                    "off": {
                        "code": 4462028,
                        "pulse": 188
                    }
                },
                {
                    "name": "Kommode",
                    "hint": "315N / 4",
                    "on": {
                        "code": 4463875,
                        "pulse": 188
                    },
                    "off": {
                        "code": 4463884,
                        "pulse": 188
                    }
                },
                {
                    "name": "Nachttisch",
                    "hint": "315N / 5",
                    "on": {
                        "code": 4470019,
                        "pulse": 188
                    },
                    "off": {
                        "code": 4470028,
                        "pulse": 188
                    }
                },
                {
                    "name": "Arbeitsplatte",
                    "hint": "Intertechno YWT-800 / C-3",
                    "on": {
                        "code": 1052693,
                        "pulse": 355
                    },
                    "off": {
                        "code": 1052692,
                        "pulse": 355
                    }
                },
                {
                    "name": "Flur",
                    "hint": "Intertechno YWT-800 / O-1",
                    "on": {
                        "code": 1376277,
                        "pulse": 355
                    },
                    "off": {
                        "code": 1376276,
                        "pulse": 355
                    }
                },
                {
                    "name": "Badezimmer",
                    "hint": "Intertechno YWT-800 / E-1",
                    "on": {
                        "code": 262165,
                        "pulse": 355
                    },
                    "off": {
                        "code": 262164,
                        "pulse": 355
                    }
                },
                {
                    "name": "Küche",
                    "hint": "Intertechno YWT-800 / O-2",
                    "on": {
                        "code": 1392661,
                        "pulse": 355
                    },
                    "off": {
                        "code": 1392660,
                        "pulse": 355
                    }
                },
                {
                    "name": "Büro",
                    "hint": "Intertechno YWT-800 / O-3",
                    "on": {
                        "code": 1380373,
                        "pulse": 355
                    },
                    "off": {
                        "code": 1380372,
                        "pulse": 355
                    }
                }
            ],
            "buttons": [
                {
                    "name": "Scene 1",
                    "hint": "315 / 1 ON",
                    "code": 21811,
                    "pulse": 188
                },
                {
                    "name": "Scene 2",
                    "hint": "315 / 1 OFF",
                    "code": 21820,
                    "pulse": 188
                },
                {
                    "name": "Scene 3",
                    "hint": "315 / 2 ON",
                    "code": 21955,
                    "pulse": 188
                },
                {
                    "name": "Scene 4",
                    "hint": "315 / 2 OFF",
                    "code": 21964,
                    "pulse": 188
                },
                {
                    "name": "Scene 5",
                    "hint": "315 / 3 ON",
                    "code": 22275,
                    "pulse": 188
                },
                {
                    "name": "Scene 6",
                    "hint": "315 / 3 OFF",
                    "code": 22284,
                    "pulse": 188
                },
                {
                    "name": "Scene 7",
                    "hint": "315 / 4 ON",
                    "code": 23811,
                    "pulse": 188
                },
                {
                    "name": "Scene 8",
                    "hint": "315 / 4 OFF",
                    "code": 23820,
                    "pulse": 188
                },
                {
                    "name": "Scene 9",
                    "hint": "315 / 5 ON",
                    "code": 29955,
                    "pulse": 188
                },
                {
                    "name": "Scene 10",
                    "hint": "315 / 5 OFF",
                    "code": 29964,
                    "pulse": 188
                },
                {
                    "name": "Schlaf 1",
                    "hint": "Intertechno YWT-800 / O-4 ON",
                    "code": 1396757,
                    "pulse": 355
                },
                {
                    "name": "Schlaf 2",
                    "hint": "Intertechno YWT-800 / O-4 OFF",
                    "code": 1396756,
                    "pulse": 355
                },
                {
                    "name": "Stube ON",
                    "hint": "Intertechno YWT-800 / O-5 ON",
                    "code": 1377301,
                    "pulse": 355
                },
                {
                    "name": "Stube OFF",
                    "hint": "Intertechno YWT-800 / O-5 OFF",
                    "code": 1377300,
                    "pulse": 355
                },
                {
                    "name": "Ess ON",
                    "hint": "Intertechno YWT-800 / O-6 ON",
                    "code": 1393685,
                    "pulse": 355
                },
                {
                    "name": "Ess OFF",
                    "hint": "Intertechno YWT-800 / O-6 OFF",
                    "code": 1393684,
                    "pulse": 355
                },
                {
                    "name": "Bad 1",
                    "hint": "Intertechno YWT-800 / E-1 ON",
                    "code": 262165,
                    "pulse": 355
                },
                {
                    "name": "Bad 2",
                    "hint": "Intertechno YWT-800 / E-1 OFF",
                    "code": 262164,
                    "pulse": 355
                },
                {
                    "name": "Küche 1",
                    "hint": "Intertechno YWT-800 / O-2 ON",
                    "code": 1392661,
                    "pulse": 355
                },
                {
                    "name": "Küche 2",
                    "hint": "Intertechno YWT-800 / O-2 OFF",
                    "code": 1392660,
                    "pulse": 355
                },
                {
                    "name": "Klingelknopf",
                    "hint": "Türklingel",
                    "code": 3459,
                    "pulse": 320
                }
            ]
        },
        {
            "platform": "Camera-ffmpeg",
            "cameras": [
                {
                    "name": "Booth 1",
                    "videoConfig": {
                        "source": "-re -i http://192.168.2.31/mjpg/video.mjpg",
                        "stillImageSource": "-i http://192.168.2.31/jpg/image.jpg",
                        "maxFPS": 25,
                        "vcodec": "h264_omx",
                        "packetSize": 188
                    }
                },
                {
                    "name": "Zelt",
                    "videoConfig": {
                        "source": "-re -i http://192.168.2.33/mjpg/video.mjpg",
                        "stillImageSource": "-i http://192.168.2.33/jpg/image.jpg",
                        "maxFPS": 10,
                        "vcodec": "h264_omx",
                        "packetSize": 188
                    }
                },
                {
                    "name": "Main Booth",
                    "videoConfig": {
                        "source": "-vcodec h264_mmal -rtsp_transport tcp -re -i rtsp://192.168.2.34/ipcam_h264.sdp",
                        "stillImageSource": "-i http://192.168.2.34/jpg/image.jpg",
                        "maxWidth": 640,
                        "maxHeight": 480,
                        "maxFPS": 25,
                        "vcodec": "h264_omx",
                        "audio": true,
                        "packetSize": 188
                    }
                },
                {
                    "name": "Aussen 1",
                    "videoConfig": {
                        "source": "-vcodec h264_mmal -rtsp_transport tcp -re -i rtsp://192.168.2.37/11",
                        "stillImageSource": "-i http://192.168.2.37/tmpfs/auto.jpg",
                        "maxFPS": 25,
                        "vcodec": "h264_omx",
                        "packetSize": 188
                    }
                },
                {
                    "name": "Aussen 2",
                    "videoConfig": {
                        "source": "-vcodec h264_mmal -rtsp_transport tcp -re -i rtsp://192.168.2.38/11",
                        "stillImageSource": "-i http://192.168.2.38/tmpfs/auto.jpg",
                        "maxFPS": 25,
                        "vcodec": "h264_omx",
                        "packetSize": 188
                    }
                }
            ]
        },
        {
            "platform": "Video-doorbell",
            "cameras": [
                {
                    "name": "Haupteingang",
                    "button": true,
                    "portX": 5005,
                    "videoConfig": {
                        "source": "-vcodec h264_mmal -rtsp_transport tcp -re -i rtsp://192.168.2.35/ipcam_h264.sdp",
                        "stillImageSource": "-i http://192.168.2.35/jpg/image.jpg",
                        "maxWidth": 640,
                        "maxHeight": 480,
                        "maxFPS": 10,
                        "vcodec": "h264_omx",
                        "packetSize": 188
                    }
                },
                {
                    "name": "Studioeingang",
                    "button": true,
                    "portX": 5006,
                    "videoConfig": {
                        "source": "-vcodec h264_mmal -rtsp_transport tcp -re -i rtsp://192.168.2.36/ipcam_h264.sdp",
                        "stillImageSource": "-i http://192.168.2.36/jpg/image.jpg",
                        "maxWidth": 640,
                        "maxHeight": 480,
                        "maxFPS": 10,
                        "vcodec": "h264_omx",
                        "packetSize": 188
                    }
                }
            ]
        },
        {
            "platform": "MaxCubePlatform",
            "name": "MaxCube Platform",
            "ip": "192.168.2.99",
            "port": 62910
        },
        {
            "platform": "BraviaPlatform",
            "tvs": [
                {
                    "name": "Fernseher",
                    "ip": "192.168.2.60",
                    "tvsource": "tv:dvbs",
                    "soundoutput": "speaker",
                    "maxchannels": 200,
                    "listapplications": 0,
                    "apps": [
                        "com.sony.dtv.com.edgeway.cozyfireplacehd.com.unity3d.player.UnityPlayerActivity",
                        "com.sony.dtv.com.amazon.aiv.eu.com.amazon.ignition.IgnitionActivity",
                        "com.sony.dtv.com.google.android.youtube.tv.com.google.android.apps.youtube.tv.cobalt.activity.ShellActivity",
                        "com.sony.dtv.com.netflix.ninja.com.netflix.ninja.MainActivity"
                    ]
                }
            ]
        },
        {
            "platform": "ArduinoRoomba",
            "serial_port": "/dev/ttyACM1"
        },
        {
            "platform": "AppleTV",
            "name": "Apple TV",
            "showPairSwitches": false,
            "hideWelcomeMessage": true,
            "devices": [
                {
                    "id": "Apple TV",
                    "name": "Apple TV",
                    "credentials": "BLAH"
                }
            ],
            "accessories": [
                {
                    "deviceID": "Apple TV",
                    "name": "TV Next",
                    "command": [
                        {
                            "command": "tv",
                            "repeat": 4,
                            "interval": 1,
                            "pause": 1
                        },
                        "select"
                    ]
                },
                {
                    "deviceID": "Apple TV",
                    "name": "Kamin",
                    "command": [
                        {
                            "command": "tv",
                            "repeat": 4,
                            "interval": 1,
                            "pause": 1
                        },
                        {
                            "command": "right",
                            "pause": 1
                        },
                        {
                            "command": "select",
                            "pause": 1
                        },
                        {
                            "command": "select",
                            "pause": 1
                        },
                        {
                            "command": "menu",
                            "pause": 1
                        },
                        "select"
                    ]
                }
            ]
        }
    ]
}

Heres the bit I need to remove:

        {
            "platform": "config",
            "name": "Config",
            "port": 8080,
            "sudo": true,
            "theme": "blue",
            "temp": "/sys/class/thermal/thermal_zone0/temp",
            "restart": "sudo systemctl restart homebridge",
            "log": "/var/log/homebridge.log",
            "linux": {
                "shutdown": "sudo shutdown now",
                "restart": "sudo reboot now"
            }
        }

@oznu
Copy link
Member

oznu commented Apr 7, 2018

Can you post the homebridge logs from startup? Knowing the order that the plugins get loaded in on your system might be helpful.

Are you running on a Raspberry Pi 3?

@normen
Copy link
Author

normen commented Apr 7, 2018

Yes, it's a Pi3

Heres the startup when I add the config-ui-x bit at the very end:

[2018-4-7 15:22:29] Loaded plugin: homebridge-433-arduino
[2018-4-7 15:22:29] Registering platform 'homebridge-433-arduino.ArduinoRCSwitch'
[2018-4-7 15:22:29] ---
[2018-4-7 15:22:31] Loaded plugin: homebridge-apple-tv
[2018-4-7 15:22:31] Registering platform 'homebridge-apple-tv.AppleTV'
[2018-4-7 15:22:31] ---
[2018-4-7 15:22:32] Loaded plugin: homebridge-bravia
[2018-4-7 15:22:32] Registering platform 'homebridge-bravia.BraviaPlatform'
[2018-4-7 15:22:32] ---
[2018-4-7 15:22:34] Loaded plugin: homebridge-camera-ffmpeg
[2018-4-7 15:22:34] Registering platform 'homebridge-camera-ffmpeg.Camera-ffmpeg'
[2018-4-7 15:22:34] ---
[2018-4-7 15:22:34] Loaded plugin: homebridge-cmdswitch2
[2018-4-7 15:22:34] Registering platform 'homebridge-cmdswitch2.cmdSwitch2'
[2018-4-7 15:22:34] ---
[2018-4-7 15:22:35] Loaded plugin: homebridge-config-ui-x
[2018-4-7 15:22:35] Registering platform 'homebridge-config-ui-x.config'
[2018-4-7 15:22:35] ---
[2018-4-7 15:22:35] Loaded plugin: homebridge-dummy
[2018-4-7 15:22:35] Registering accessory 'homebridge-dummy.DummySwitch'
[2018-4-7 15:22:35] ---
[2018-4-7 15:22:35] Loaded plugin: homebridge-http-motion-sensor
[2018-4-7 15:22:35] Registering accessory 'homebridge-http-motion-sensor.http-motion-sensor'
[2018-4-7 15:22:35] ---
[2018-4-7 15:22:36] Loaded plugin: homebridge-milight
[2018-4-7 15:22:36] Registering platform 'homebridge-milight.MiLight'
[2018-4-7 15:22:36] ---
[2018-4-7 15:22:36] Loaded plugin: homebridge-platform-maxcube
[2018-4-7 15:22:36] Registering platform 'homebridge-platform-maxcube.MaxCubePlatform'
[2018-4-7 15:22:36] ---
[2018-4-7 15:22:36] Loaded plugin: homebridge-roomba-arduino
[2018-4-7 15:22:36] Registering platform 'homebridge-roomba-arduino.ArduinoRoomba'
[2018-4-7 15:22:36] ---
[2018-4-7 15:22:38] Loaded plugin: homebridge-videodoorbell
[2018-4-7 15:22:38] Registering platform 'homebridge-videodoorbell.Video-doorbell'
[2018-4-7 15:22:38] ---
[2018-4-7 15:22:38] Loaded config.json with 4 accessories and 10 platforms.
[2018-4-7 15:22:38] ---
[2018-4-7 15:22:38] Loading 10 platforms...
[2018-4-7 15:22:38] [cmdSwitch2] Initializing cmdSwitch2 platform...
[2018-4-7 15:22:38] [MiLight] Initializing MiLight platform...
[2018-4-7 15:22:38] [MiLight] Initializing platform accessory 'Spiegel'...
[2018-4-7 15:22:38] [MiLight] Initializing platform accessory 'Fenster'...
[2018-4-7 15:22:38] [MiLight] Initializing platform accessory 'Eingang'...
[2018-4-7 15:22:38] [MiLight] Initializing platform accessory 'Sofa'...
[2018-4-7 15:22:38] [MiLight] Initializing platform accessory 'Decke Vorne'...
[2018-4-7 15:22:38] [MiLight] Initializing platform accessory 'Decke Hinten'...
[2018-4-7 15:22:38] [MiLight] Initializing platform accessory 'Säulen Vorne'...
[2018-4-7 15:22:38] [MiLight] Initializing platform accessory 'Säulen Hinten'...
[2018-4-7 15:22:38] [Arduino RC Switch Platform] Initializing ArduinoRCSwitch platform...
[2018-4-7 15:22:38] [Arduino RC Switch Platform] Enabling one-arduino-mode using  /dev/ttyACM0
[2018-4-7 15:22:38] [Arduino RC Switch Platform] Initializing platform accessory 'Esstisch'...
[2018-4-7 15:22:38] [Arduino RC Switch Platform] Initializing platform accessory 'Ionisierer'...
[2018-4-7 15:22:38] [Arduino RC Switch Platform] Initializing platform accessory 'Spüle'...
[2018-4-7 15:22:38] [Arduino RC Switch Platform] Initializing platform accessory 'Waschbecken'...
[2018-4-7 15:22:38] [Arduino RC Switch Platform] Initializing platform accessory 'Nilpferd'...
[2018-4-7 15:22:38] [Arduino RC Switch Platform] Initializing platform accessory 'Igel'...
[2018-4-7 15:22:38] [Arduino RC Switch Platform] Initializing platform accessory 'Kommode'...
[2018-4-7 15:22:38] [Arduino RC Switch Platform] Initializing platform accessory 'Nachttisch'...
[2018-4-7 15:22:38] [Arduino RC Switch Platform] Initializing platform accessory 'Arbeitsplatte'...
[2018-4-7 15:22:38] [Arduino RC Switch Platform] Initializing platform accessory 'Flur'...
[2018-4-7 15:22:38] [Arduino RC Switch Platform] Initializing platform accessory 'Badezimmer'...
[2018-4-7 15:22:38] [Arduino RC Switch Platform] Initializing platform accessory 'Küche'...
[2018-4-7 15:22:38] [Arduino RC Switch Platform] Initializing platform accessory 'Büro'...
[2018-4-7 15:22:38] [Arduino RC Switch Platform] Initializing platform accessory 'Scene 1'...
[2018-4-7 15:22:38] [Arduino RC Switch Platform] Initializing platform accessory 'Scene 2'...
[2018-4-7 15:22:38] [Arduino RC Switch Platform] Initializing platform accessory 'Scene 3'...
[2018-4-7 15:22:38] [Arduino RC Switch Platform] Initializing platform accessory 'Scene 4'...
[2018-4-7 15:22:38] [Arduino RC Switch Platform] Initializing platform accessory 'Scene 5'...
[2018-4-7 15:22:38] [Arduino RC Switch Platform] Initializing platform accessory 'Scene 6'...
[2018-4-7 15:22:38] [Arduino RC Switch Platform] Initializing platform accessory 'Scene 7'...
[2018-4-7 15:22:38] [Arduino RC Switch Platform] Initializing platform accessory 'Scene 8'...
[2018-4-7 15:22:38] [Arduino RC Switch Platform] Initializing platform accessory 'Scene 9'...
[2018-4-7 15:22:38] [Arduino RC Switch Platform] Initializing platform accessory 'Scene 10'...
[2018-4-7 15:22:38] [Arduino RC Switch Platform] Initializing platform accessory 'Schlaf 1'...
[2018-4-7 15:22:38] [Arduino RC Switch Platform] Initializing platform accessory 'Schlaf 2'...
[2018-4-7 15:22:38] [Arduino RC Switch Platform] Initializing platform accessory 'Stube ON'...
[2018-4-7 15:22:38] [Arduino RC Switch Platform] Initializing platform accessory 'Stube OFF'...
[2018-4-7 15:22:38] [Arduino RC Switch Platform] Initializing platform accessory 'Ess ON'...
[2018-4-7 15:22:38] [Arduino RC Switch Platform] Initializing platform accessory 'Ess OFF'...
[2018-4-7 15:22:38] [Arduino RC Switch Platform] Initializing platform accessory 'Bad 1'...
[2018-4-7 15:22:38] [Arduino RC Switch Platform] Initializing platform accessory 'Bad 2'...
[2018-4-7 15:22:38] [Arduino RC Switch Platform] Initializing platform accessory 'Küche 1'...
[2018-4-7 15:22:38] [Arduino RC Switch Platform] Initializing platform accessory 'Küche 2'...
[2018-4-7 15:22:38] [Arduino RC Switch Platform] Initializing platform accessory 'Klingelknopf'...
[2018-4-7 15:22:38] [Camera-ffmpeg] Initializing Camera-ffmpeg platform...
[2018-4-7 15:22:38] [Video-doorbell] Initializing Video-doorbell platform...
[2018-4-7 15:22:38] [MaxCube Platform] Initializing MaxCubePlatform platform...
[2018-4-7 15:22:38] [MaxCube Platform] Try connecting to Max! Cube..
[2018-4-7 15:22:38] [BraviaPlatform] Initializing BraviaPlatform platform...
[2018-4-7 15:22:38] [BraviaPlatform] Initializing platform accessory 'Fernseher'...
[2018-4-7 15:22:38] [ArduinoRoomba] Initializing ArduinoRoomba platform...
[2018-4-7 15:22:38] [ArduinoRoomba] Initializing platform accessory 'Staubsauger'...
[2018-4-7 15:22:38] [Apple TV] Initializing AppleTV platform...
[2018-4-7 15:22:38] [Apple TV] [INFO] Running Homebridge Apple TV Plugin version 1.0.2
[2018-4-7 15:22:38] [Apple TV] [INFO] Automatically discovering Apple TV's
[2018-4-7 15:22:38] [Config] Initializing config platform...
[2018-4-7 15:22:38] Loading 4 accessories...
[2018-4-7 15:22:38] [Melder Eingang] Initializing http-motion-sensor accessory...
[2018-4-7 15:22:38] [Automate Switch 1] Initializing DummySwitch accessory...
[2018-4-7 15:22:39] [Automate Switch 2] Initializing DummySwitch accessory...
[2018-4-7 15:22:39] [Automate Switch 3] Initializing DummySwitch accessory...
[2018-4-7 15:22:39] [cmdSwitch2] Initializing platform accessory 'Playstation'...
[2018-4-7 15:22:39] [cmdSwitch2] Initializing platform accessory '3D Drucker'...
[2018-4-7 15:22:39] [Melder Eingang] Motion sensor server listening on: http://<your ip goes here>:8301
[2018-4-7 15:22:39] Booth 1 is running on port 46193.
[2018-4-7 15:22:39] Zelt is running on port 46769.
[2018-4-7 15:22:39] Main Booth is running on port 42399.
[2018-4-7 15:22:39] Aussen 1 is running on port 35707.
[2018-4-7 15:22:39] Aussen 2 is running on port 40397.
[2018-4-7 15:22:39] Haupteingang is running on port 34273.
[2018-4-7 15:22:39] Studioeingang is running on port 40055.
[2018-4-7 15:22:44] [Config] Using Form Authentication
[2018-4-7 15:22:45] [Config] Console is listening on port 8080.
[2018-4-7 15:22:45] [Apple TV] [CONFIG ERROR] TV Next; No connected device could be found with a deviceID of "Apple TV".
[2018-4-7 15:22:45] [Apple TV] [CONFIG ERROR] Kamin; No connected device could be found with a deviceID of "Apple TV".
[2018-4-7 15:22:46] [MaxCube Platform] Connected to Max! Cube.
[2018-4-7 15:22:46] [cmdSwitch2] 3D Drucker is off.
[2018-4-7 15:22:46] [cmdSwitch2] Failed to determine Playstation state.
[2018-4-7 15:22:46] [cmdSwitch2] Could not detect any matching PS4 device

[2018-4-7 15:22:46] [MaxCube Platform] Initializing platform accessory 'Max! Link'...
[2018-4-7 15:22:46] [MaxCube Platform] Initializing platform accessory 'Fensterkontakt Osten (Stube)'...
[2018-4-7 15:22:46] [MaxCube Platform] Initializing platform accessory 'Osten (Aufnahmeraum)'...
[2018-4-7 15:22:46] [MaxCube Platform] Initializing platform accessory 'Fensterkontakt Osten 2 (Studio)'...
[2018-4-7 15:22:46] [MaxCube Platform] Initializing platform accessory 'Fensterkontakt Süden (Schlafzimmer)'...
[2018-4-7 15:22:46] [MaxCube Platform] Initializing platform accessory 'Osten (Studio)'...
[2018-4-7 15:22:46] [MaxCube Platform] Initializing platform accessory 'Süden (Büro)'...
[2018-4-7 15:22:46] [MaxCube Platform] Initializing platform accessory 'Fensterkontakt Osten 1 (Studio)'...
[2018-4-7 15:22:46] [MaxCube Platform] Initializing platform accessory 'Fensterkontakt Süden (Büro)'...
[2018-4-7 15:22:46] [MaxCube Platform] Initializing platform accessory 'Fußbodenheizung (Küche)'...
[2018-4-7 15:22:46] [MaxCube Platform] Initializing platform accessory 'Süden (Stube)'...
[2018-4-7 15:22:46] [MaxCube Platform] Initializing platform accessory 'Fensterkontakt Süden (Stube)'...
[2018-4-7 15:22:46] [MaxCube Platform] Initializing platform accessory 'Osten (Stube)'...
[2018-4-7 15:22:46] [MaxCube Platform] Initializing platform accessory 'Süden (Schlafzimmer)'...
Setup Payload:
X-HM://0023O8322383A
Scan this code with your HomeKit app on your iOS device to pair with Homebridge:
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
Or enter this code with your HomeKit app on your iOS device to pair with Homebridge:
                       
    ┌────────────┐     
    │ 122-48-442 │     
    └────────────┘     
                       
[2018-4-7 15:22:47] Homebridge is running on port 51826.

Edit: and for good measure heres without config-ui-x:

[2018-4-7 15:24:31] Registering platform 'homebridge-433-arduino.ArduinoRCSwitch'
[2018-4-7 15:24:31] ---
[2018-4-7 15:24:33] Loaded plugin: homebridge-apple-tv
[2018-4-7 15:24:33] Registering platform 'homebridge-apple-tv.AppleTV'
[2018-4-7 15:24:33] ---
[2018-4-7 15:24:34] Loaded plugin: homebridge-bravia
[2018-4-7 15:24:34] Registering platform 'homebridge-bravia.BraviaPlatform'
[2018-4-7 15:24:34] ---
[2018-4-7 15:24:36] Loaded plugin: homebridge-camera-ffmpeg
[2018-4-7 15:24:36] Registering platform 'homebridge-camera-ffmpeg.Camera-ffmpeg'
[2018-4-7 15:24:36] ---
[2018-4-7 15:24:36] Loaded plugin: homebridge-cmdswitch2
[2018-4-7 15:24:36] Registering platform 'homebridge-cmdswitch2.cmdSwitch2'
[2018-4-7 15:24:36] ---
[2018-4-7 15:24:37] Loaded plugin: homebridge-config-ui-x
[2018-4-7 15:24:37] Registering platform 'homebridge-config-ui-x.config'
[2018-4-7 15:24:37] ---
[2018-4-7 15:24:37] Loaded plugin: homebridge-dummy
[2018-4-7 15:24:37] Registering accessory 'homebridge-dummy.DummySwitch'
[2018-4-7 15:24:37] ---
[2018-4-7 15:24:37] Loaded plugin: homebridge-http-motion-sensor
[2018-4-7 15:24:37] Registering accessory 'homebridge-http-motion-sensor.http-motion-sensor'
[2018-4-7 15:24:37] ---
[2018-4-7 15:24:38] Loaded plugin: homebridge-milight
[2018-4-7 15:24:38] Registering platform 'homebridge-milight.MiLight'
[2018-4-7 15:24:38] ---
[2018-4-7 15:24:38] Loaded plugin: homebridge-platform-maxcube
[2018-4-7 15:24:38] Registering platform 'homebridge-platform-maxcube.MaxCubePlatform'
[2018-4-7 15:24:38] ---
[2018-4-7 15:24:38] Loaded plugin: homebridge-roomba-arduino
[2018-4-7 15:24:38] Registering platform 'homebridge-roomba-arduino.ArduinoRoomba'
[2018-4-7 15:24:38] ---
[2018-4-7 15:24:40] Loaded plugin: homebridge-videodoorbell
[2018-4-7 15:24:40] Registering platform 'homebridge-videodoorbell.Video-doorbell'
[2018-4-7 15:24:40] ---
[2018-4-7 15:24:40] Loaded config.json with 4 accessories and 9 platforms.
[2018-4-7 15:24:40] ---
[2018-4-7 15:24:40] Loading 9 platforms...
[2018-4-7 15:24:40] [cmdSwitch2] Initializing cmdSwitch2 platform...
[2018-4-7 15:24:40] [MiLight] Initializing MiLight platform...
[2018-4-7 15:24:40] [MiLight] Initializing platform accessory 'Spiegel'...
[2018-4-7 15:24:40] [MiLight] Initializing platform accessory 'Fenster'...
[2018-4-7 15:24:40] [MiLight] Initializing platform accessory 'Eingang'...
[2018-4-7 15:24:40] [MiLight] Initializing platform accessory 'Sofa'...
[2018-4-7 15:24:40] [MiLight] Initializing platform accessory 'Decke Vorne'...
[2018-4-7 15:24:40] [MiLight] Initializing platform accessory 'Decke Hinten'...
[2018-4-7 15:24:40] [MiLight] Initializing platform accessory 'Säulen Vorne'...
[2018-4-7 15:24:40] [MiLight] Initializing platform accessory 'Säulen Hinten'...
[2018-4-7 15:24:40] [Arduino RC Switch Platform] Initializing ArduinoRCSwitch platform...
[2018-4-7 15:24:40] [Arduino RC Switch Platform] Enabling one-arduino-mode using  /dev/ttyACM0
[2018-4-7 15:24:40] [Arduino RC Switch Platform] Initializing platform accessory 'Esstisch'...
[2018-4-7 15:24:40] [Arduino RC Switch Platform] Initializing platform accessory 'Ionisierer'...
[2018-4-7 15:24:40] [Arduino RC Switch Platform] Initializing platform accessory 'Spüle'...
[2018-4-7 15:24:40] [Arduino RC Switch Platform] Initializing platform accessory 'Waschbecken'...
[2018-4-7 15:24:40] [Arduino RC Switch Platform] Initializing platform accessory 'Nilpferd'...
[2018-4-7 15:24:40] [Arduino RC Switch Platform] Initializing platform accessory 'Igel'...
[2018-4-7 15:24:40] [Arduino RC Switch Platform] Initializing platform accessory 'Kommode'...
[2018-4-7 15:24:40] [Arduino RC Switch Platform] Initializing platform accessory 'Nachttisch'...
[2018-4-7 15:24:40] [Arduino RC Switch Platform] Initializing platform accessory 'Arbeitsplatte'...
[2018-4-7 15:24:40] [Arduino RC Switch Platform] Initializing platform accessory 'Flur'...
[2018-4-7 15:24:40] [Arduino RC Switch Platform] Initializing platform accessory 'Badezimmer'...
[2018-4-7 15:24:40] [Arduino RC Switch Platform] Initializing platform accessory 'Küche'...
[2018-4-7 15:24:40] [Arduino RC Switch Platform] Initializing platform accessory 'Büro'...
[2018-4-7 15:24:40] [Arduino RC Switch Platform] Initializing platform accessory 'Scene 1'...
[2018-4-7 15:24:40] [Arduino RC Switch Platform] Initializing platform accessory 'Scene 2'...
[2018-4-7 15:24:40] [Arduino RC Switch Platform] Initializing platform accessory 'Scene 3'...
[2018-4-7 15:24:40] [Arduino RC Switch Platform] Initializing platform accessory 'Scene 4'...
[2018-4-7 15:24:40] [Arduino RC Switch Platform] Initializing platform accessory 'Scene 5'...
[2018-4-7 15:24:40] [Arduino RC Switch Platform] Initializing platform accessory 'Scene 6'...
[2018-4-7 15:24:40] [Arduino RC Switch Platform] Initializing platform accessory 'Scene 7'...
[2018-4-7 15:24:40] [Arduino RC Switch Platform] Initializing platform accessory 'Scene 8'...
[2018-4-7 15:24:40] [Arduino RC Switch Platform] Initializing platform accessory 'Scene 9'...
[2018-4-7 15:24:40] [Arduino RC Switch Platform] Initializing platform accessory 'Scene 10'...
[2018-4-7 15:24:40] [Arduino RC Switch Platform] Initializing platform accessory 'Schlaf 1'...
[2018-4-7 15:24:40] [Arduino RC Switch Platform] Initializing platform accessory 'Schlaf 2'...
[2018-4-7 15:24:40] [Arduino RC Switch Platform] Initializing platform accessory 'Stube ON'...
[2018-4-7 15:24:40] [Arduino RC Switch Platform] Initializing platform accessory 'Stube OFF'...
[2018-4-7 15:24:40] [Arduino RC Switch Platform] Initializing platform accessory 'Ess ON'...
[2018-4-7 15:24:40] [Arduino RC Switch Platform] Initializing platform accessory 'Ess OFF'...
[2018-4-7 15:24:40] [Arduino RC Switch Platform] Initializing platform accessory 'Bad 1'...
[2018-4-7 15:24:40] [Arduino RC Switch Platform] Initializing platform accessory 'Bad 2'...
[2018-4-7 15:24:40] [Arduino RC Switch Platform] Initializing platform accessory 'Küche 1'...
[2018-4-7 15:24:40] [Arduino RC Switch Platform] Initializing platform accessory 'Küche 2'...
[2018-4-7 15:24:40] [Arduino RC Switch Platform] Initializing platform accessory 'Klingelknopf'...
[2018-4-7 15:24:40] [Camera-ffmpeg] Initializing Camera-ffmpeg platform...
[2018-4-7 15:24:40] [Video-doorbell] Initializing Video-doorbell platform...
[2018-4-7 15:24:40] [MaxCube Platform] Initializing MaxCubePlatform platform...
[2018-4-7 15:24:40] [MaxCube Platform] Try connecting to Max! Cube..
[2018-4-7 15:24:40] [BraviaPlatform] Initializing BraviaPlatform platform...
[2018-4-7 15:24:40] [BraviaPlatform] Initializing platform accessory 'Fernseher'...
[2018-4-7 15:24:40] [ArduinoRoomba] Initializing ArduinoRoomba platform...
[2018-4-7 15:24:40] [ArduinoRoomba] Initializing platform accessory 'Staubsauger'...
[2018-4-7 15:24:40] [Apple TV] Initializing AppleTV platform...
[2018-4-7 15:24:40] [Apple TV] [INFO] Running Homebridge Apple TV Plugin version 1.0.2
[2018-4-7 15:24:40] [Apple TV] [INFO] Automatically discovering Apple TV's
[2018-4-7 15:24:40] Loading 4 accessories...
[2018-4-7 15:24:40] [Melder Eingang] Initializing http-motion-sensor accessory...
[2018-4-7 15:24:40] [Automate Switch 1] Initializing DummySwitch accessory...
[2018-4-7 15:24:41] [Automate Switch 2] Initializing DummySwitch accessory...
[2018-4-7 15:24:41] [Automate Switch 3] Initializing DummySwitch accessory...
[2018-4-7 15:24:41] [cmdSwitch2] Initializing platform accessory 'Playstation'...
[2018-4-7 15:24:41] [cmdSwitch2] Initializing platform accessory '3D Drucker'...
[2018-4-7 15:24:41] [Melder Eingang] Motion sensor server listening on: http://<your ip goes here>:8301
[2018-4-7 15:24:41] Booth 1 is running on port 46007.
[2018-4-7 15:24:41] Zelt is running on port 46369.
[2018-4-7 15:24:41] Main Booth is running on port 41241.
[2018-4-7 15:24:41] Aussen 1 is running on port 38275.
[2018-4-7 15:24:41] Aussen 2 is running on port 46465.
[2018-4-7 15:24:41] Haupteingang is running on port 44073.
[2018-4-7 15:24:41] Studioeingang is running on port 43267.
[2018-4-7 15:24:42] [MaxCube Platform] Connected to Max! Cube.
[2018-4-7 15:24:42] [MaxCube Platform] Initializing platform accessory 'Max! Link'...
[2018-4-7 15:24:42] [MaxCube Platform] Initializing platform accessory 'Fensterkontakt Osten (Stube)'...
[2018-4-7 15:24:42] [MaxCube Platform] Initializing platform accessory 'Osten (Aufnahmeraum)'...
[2018-4-7 15:24:42] [MaxCube Platform] Initializing platform accessory 'Fensterkontakt Osten 2 (Studio)'...
[2018-4-7 15:24:42] [MaxCube Platform] Initializing platform accessory 'Fensterkontakt Süden (Schlafzimmer)'...
[2018-4-7 15:24:42] [MaxCube Platform] Initializing platform accessory 'Osten (Studio)'...
[2018-4-7 15:24:42] [MaxCube Platform] Initializing platform accessory 'Süden (Büro)'...
[2018-4-7 15:24:42] [MaxCube Platform] Initializing platform accessory 'Fensterkontakt Osten 1 (Studio)'...
[2018-4-7 15:24:42] [MaxCube Platform] Initializing platform accessory 'Fensterkontakt Süden (Büro)'...
[2018-4-7 15:24:42] [MaxCube Platform] Initializing platform accessory 'Fußbodenheizung (Küche)'...
[2018-4-7 15:24:42] [MaxCube Platform] Initializing platform accessory 'Süden (Stube)'...
[2018-4-7 15:24:42] [MaxCube Platform] Initializing platform accessory 'Fensterkontakt Süden (Stube)'...
[2018-4-7 15:24:42] [MaxCube Platform] Initializing platform accessory 'Osten (Stube)'...
[2018-4-7 15:24:42] [MaxCube Platform] Initializing platform accessory 'Süden (Schlafzimmer)'...
[2018-4-7 15:24:42] [cmdSwitch2] Failed to determine Playstation state.
[2018-4-7 15:24:42] [cmdSwitch2] Could not detect any matching PS4 device

[2018-4-7 15:24:45] [Apple TV] [INFO] Discovered Apple TV (Apple TV) at 192.168.2.113
[2018-4-7 15:24:45] [Apple TV] [INFO] Discovered Apple TV (Apple TV) at 192.168.2.113
[2018-4-7 15:24:45] [Apple TV] [INFO] Connecting to "Apple TV"
[2018-4-7 15:24:46] [cmdSwitch2] 3D Drucker is off.
[2018-4-7 15:24:46] [Apple TV] [INFO] Connected to "Apple TV"
[2018-4-7 15:24:46] [Apple TV] Initializing platform accessory 'TV Next'...
[2018-4-7 15:24:46] [Apple TV] Initializing platform accessory 'Kamin'...
Setup Payload:
X-HM://0023O8322383A
Scan this code with your HomeKit app on your iOS device to pair with Homebridge:
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
Or enter this code with your HomeKit app on your iOS device to pair with Homebridge:
                       
    ┌────────────┐     
    │ 122-48-442 │     
    └────────────┘     
                       
[2018-4-7 15:24:47] Homebridge is running on port 51826.

Edit2: Btw I did try changing the order and put the apple-tv plugin first and last but it doesn't seem to do anything.

@oznu
Copy link
Member

oznu commented Apr 9, 2018

My guess is the single threaded node.js runtime is being blocked by the loading of this plugin at startup, so the homebridge-apple-tv plugin is not receiving the response to the bonjour/mdns request to discover the Apple TV.

Homebridge-config-ui-x pulls in quite a few dependencies on startup using the standard require syntax, which blocks the runtime while it loads the files from disk. On a Raspberry Pi with rather slow disk I/O this is going to be much more observable compared to a conventional computer.

homebridge-apple-tv should either delay the discovery of Apple TVs or implement a "retry". The retry would be the most favourable approach since the discovery depends on Bonjour which is a UDP based protocol and does not guarantee message delivery.


I have published a test version of this plugin which would might want to try out:

npm install -g homebridge-config-ui-x@next

Without making any changes to your config the minor changes I made around dependency load order probably won't make a difference. What you can do though is adjust your config slightly:

Change the platform from config to config-fork.

        {
            "platform": "config-fork",
            "name": "Config",
            "port": 8080,
            "sudo": true,
            "theme": "blue",
            "temp": "/sys/class/thermal/thermal_zone0/temp",
            "restart": "sudo systemctl restart homebridge",
            "log": "/var/log/homebridge.log",
            "linux": {
                "shutdown": "sudo shutdown now",
                "restart": "sudo reboot now"
            }
        }

This will tell homebridge-config-ui-x to run the web server and ui in a separate thread to the main homebridge process. It might not help much on a single core Raspberry Pi, but on a quad core Raspberry Pi 3 it should make a big difference.

@normen
Copy link
Author

normen commented Apr 9, 2018

Yeah, I noticed that config-ui-x increases the load time a lot. It is a RasPi3 in my case and yes, this change makes my homebridge setup discover the Apple TV with config-ui-x enabled.

In general the startup of Homebridge is much faster now, before config-ui-x would always warn me that the server takes a long time to start ^^

@oznu
Copy link
Member

oznu commented Apr 9, 2018

Great, thanks for testing. I'm going to run this test version for the next few days to make sure everything is ok before publishing it. Let me know if you encounter any quirks.

If it works well I might make this the default behaviour in the next major version.

@palasinio
Copy link

This multithreading thing sounds great.

@normen
Copy link
Author

normen commented Apr 9, 2018

Yeah, and it seems to work great, my homebridge server has been running for the last few hours with me playing around in config-ui-x, updating plugins etc. The whole homebridge system seems to be a lot snappier - don't know if thats possible.

@oznu
Copy link
Member

oznu commented Apr 10, 2018

I've pushed up a new version to the next tag.

npm install -g homebridge-config-ui-x@next

Before restarting homebridge change config-fork back to config.

@normen
Copy link
Author

normen commented Apr 10, 2018

works too!

@oznu
Copy link
Member

oznu commented Apr 10, 2018

Thanks. I'll try this on a single core raspberry pi some time in the next few days. If the performance is still acceptable I will push this change out to everyone. People using the oznu/homebridge docker container have been running this plugin as a separate process since I took over the project, so I'm fairly comfortable rolling this out to all users.

@oznu oznu mentioned this issue Apr 12, 2018
@oznu
Copy link
Member

oznu commented Apr 12, 2018

This has been published to the latest tag.

https://github.com/oznu/homebridge-config-ui-x/blob/master/CHANGELOG.md#350-2018-04-12

@DarKOrange75
Copy link

I have made a fresh install of Homebridge with AppleTV plugin and Config-ui-x and the latter is still preventing the appletv plugin from discovering the apple tv, so why is this ticket closed?

@mafyata
Copy link

mafyata commented Jun 19, 2019

Ask this at apple tv plugin’s page.

@DarKOrange75
Copy link

already asked: lprhodes/homebridge-apple-tv#9 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants