I've got two Konnected devices that are only sometimes detected by Home Assistant. I usually have to reboot Home Assistant 2 or 3 times before the devices are found, then they work perfectly for days until I have to reboot, when it may or may not need to be restarted 2 or 3 times again.
I'm running Home Assistant in a Docker container on my unRAID system. The same issue was present when running it in a Docker container on my old Ubuntu server.
I've tried leaving it over an hour to detect them, but it never does.
I'm suspecting the Home Assistant is to blame here, since the two different Konnected devices are both having the same issue at the same time. Home Assistant is 0.73.1, both Konnecteds are 2.2.1.
Here are the Home Assistant logs, first for a boot that did not detect them, then a successful one. They're less than a minute apart, but like I said, I've left it for quite a while and they are never detected.
2018-07-13 16:43:15 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: domain=homeassistant, service=turn_off> 2018-07-13 16:43:15 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: domain=homeassistant, service=turn_on> 2018-07-13 16:43:15 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: domain=homeassistant, service=toggle> 2018-07-13 16:43:15 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: domain=homeassistant, service=stop> 2018-07-13 16:43:15 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: domain=homeassistant, service=restart> 2018-07-13 16:43:15 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: domain=homeassistant, service=check_config> 2018-07-13 16:43:15 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: domain=homeassistant, service=reload_core_config> 2018-07-13 16:43:15 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: domain=persistent_notification, service=create> 2018-07-13 16:43:15 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: domain=persistent_notification, service=dismiss> 2018-07-13 16:43:15 INFO (MainThread) [homeassistant.bootstrap] Home Assistant core initialized 2018-07-13 16:43:15 INFO (MainThread) [homeassistant.loader] Loaded history from homeassistant.components.history 2018-07-13 16:43:15 INFO (MainThread) [homeassistant.loader] Loaded recorder from homeassistant.components.recorder 2018-07-13 16:43:15 INFO (MainThread) [homeassistant.loader] Loaded http from homeassistant.components.http 2018-07-13 16:43:15 INFO (MainThread) [homeassistant.loader] Loaded frontend from homeassistant.components.frontend 2018-07-13 16:43:15 INFO (MainThread) [homeassistant.loader] Loaded api from homeassistant.components.api 2018-07-13 16:43:15 INFO (MainThread) [homeassistant.loader] Loaded websocket_api from homeassistant.components.websocket_api 2018-07-13 16:43:15 INFO (MainThread) [homeassistant.loader] Loaded system_log from homeassistant.components.system_log 2018-07-13 16:43:15 INFO (MainThread) [homeassistant.loader] Loaded logger from homeassistant.components.logger 2018-07-13 16:43:15 INFO (MainThread) [homeassistant.setup] Setting up logger 2018-07-13 16:43:15 WARNING (MainThread) [homeassistant.components.http] You have been advised to set http.api_password. 2018-07-13 16:43:37 DEBUG (SyncWorker_7) [homeassistant.components.konnected] Discovered a new Konnected device: {'host': '192.168.1.13', 'port': 13463, 'ssdp_description': 'http://192.168.1.13:13463/Device.xml', 'name': 'Konnected', 'model_name': 'Konnected', 'model_number': '2.2.1', 'serial': '5463192', 'manufacturer': 'konnected.io', 'udn': 'uuid:8f655392-a778-4fee-97b9-4825918535c98', 'upnp_device_type': 'urn:schemas-konnected-io:device:Security:1'} 2018-07-13 16:43:37 DEBUG (SyncWorker_8) [homeassistant.components.konnected] Discovered a new Konnected device: {'host': '192.168.1.6', 'port': 9674, 'ssdp_description': 'http://192.168.1.6:9674/Device.xml', 'name': 'Konnected', 'model_name': 'Konnected', 'model_number': '2.2.0', 'serial': '1674609', 'manufacturer': 'konnected.io', 'udn': 'uuid:8f655392-a778-4fee-97b9-4825918198d71', 'upnp_device_type': 'urn:schemas-konnected-io:device:Security:1'} 2018-07-13 16:43:38 INFO (SyncWorker_7) [homeassistant.components.konnected] Initialized Konnected device 84f3eb535c98 2018-07-13 16:43:38 INFO (SyncWorker_8) [homeassistant.components.konnected] Initialized Konnected device dc4f22198d71 2018-07-13 16:43:38 DEBUG (SyncWorker_7) [homeassistant.components.konnected] Configuring Konnected device 84f3eb535c98 2018-07-13 16:43:38 DEBUG (SyncWorker_8) [homeassistant.components.konnected] Configuring Konnected device dc4f22198d71 2018-07-13 16:43:38 DEBUG (SyncWorker_7) [homeassistant.components.konnected] Set up sensor North Garage Door (initial state: None) 2018-07-13 16:43:38 DEBUG (SyncWorker_8) [homeassistant.components.konnected] Set up sensor Front Door (initial state: None) 2018-07-13 16:43:38 DEBUG (SyncWorker_7) [homeassistant.components.konnected] Set up sensor Side Door Lock (initial state: True) 2018-07-13 16:43:38 DEBUG (SyncWorker_8) [homeassistant.components.konnected] Set up sensor Back Door (initial state: None) 2018-07-13 16:43:38 DEBUG (SyncWorker_7) [homeassistant.components.konnected] Set up sensor South Garage Door (initial state: None) 2018-07-13 16:43:38 DEBUG (SyncWorker_8) [homeassistant.components.konnected] Set up sensor Garage Entry Door (initial state: None) 2018-07-13 16:43:38 DEBUG (SyncWorker_7) [homeassistant.components.konnected] Set up actuator North Garage Door Relay (initial state: None) 2018-07-13 16:43:38 DEBUG (SyncWorker_8) [homeassistant.components.konnected] Set up sensor Computer Room Windows (initial state: None) 2018-07-13 16:43:38 DEBUG (SyncWorker_7) [homeassistant.components.konnected] Storing data in hass.data[konnected]: {'client': <konnected.Client object at 0x1511e9cac128>, 'binary_sensors': {1: {'type': 'garage_door', 'name': 'North Garage Door', 'state': None}, 2: {'type': 'lock', 'name': 'Side Door Lock', 'state': True}, 6: {'type': 'garage_door', 'name': 'South Garage Door', 'state': None}}, 'switches': {5: {'name': 'North Garage Door Relay', 'state': None, 'activation': 'low'}}, 'host': '192.168.1.13', 'port': 13463} 2018-07-13 16:43:38 DEBUG (SyncWorker_8) [homeassistant.components.konnected] Set up sensor Kitchen Window (initial state: None) 2018-07-13 16:43:38 DEBUG (SyncWorker_7) [homeassistant.components.konnected] 84f3eb535c98: desired sensor config: [{'pin': 1}, {'pin': 2}, {'pin': 6}] 2018-07-13 16:43:38 DEBUG (SyncWorker_8) [homeassistant.components.konnected] Set up sensor Nook Window (initial state: None) 2018-07-13 16:43:38 DEBUG (SyncWorker_7) [homeassistant.components.konnected] 84f3eb535c98: current sensor config: [{'pin': 1}, {'pin': 2}, {'pin': 6}] 2018-07-13 16:43:38 DEBUG (SyncWorker_8) [homeassistant.components.konnected] Storing data in hass.data[konnected]: {'client': <konnected.Client object at 0x1511e8168e48>, 'binary_sensors': {1: {'type': 'door', 'name': 'Front Door', 'state': None}, 2: {'type': 'door', 'name': 'Back Door', 'state': None}, 5: {'type': 'door', 'name': 'Garage Entry Door', 'state': None}, 6: {'type': 'window', 'name': 'Computer Room Windows', 'state': None}, 7: {'type': 'window', 'name': 'Kitchen Window', 'state': None}, 9: {'type': 'window', 'name': 'Nook Window', 'state': None}}, 'switches': {}, 'host': '192.168.1.6', 'port': 9674} 2018-07-13 16:43:38 DEBUG (SyncWorker_7) [homeassistant.components.konnected] 84f3eb535c98: desired actuator config: [{'pin': 5, 'trigger': 0}] 2018-07-13 16:43:38 DEBUG (SyncWorker_8) [homeassistant.components.konnected] dc4f22198d71: desired sensor config: [{'pin': 1}, {'pin': 2}, {'pin': 5}, {'pin': 6}, {'pin': 7}, {'pin': 9}] 2018-07-13 16:43:38 DEBUG (SyncWorker_7) [homeassistant.components.konnected] 84f3eb535c98: current actuator config: [{'trigger': 0, 'pin': 5}] 2018-07-13 16:43:38 DEBUG (SyncWorker_8) [homeassistant.components.konnected] dc4f22198d71: current sensor config: [{'pin': 1}, {'pin': 2}, {'pin': 5}, {'pin': 6}, {'pin': 7}, {'pin': 9}] 2018-07-13 16:43:38 DEBUG (SyncWorker_7) [homeassistant.components.konnected] 84f3eb535c98: desired api endpoint: http://192.168.1.21:8123/api/konnected 2018-07-13 16:43:38 DEBUG (SyncWorker_8) [homeassistant.components.konnected] dc4f22198d71: desired actuator config: [] 2018-07-13 16:43:38 DEBUG (SyncWorker_8) [homeassistant.components.konnected] dc4f22198d71: current actuator config: [] 2018-07-13 16:43:38 DEBUG (SyncWorker_8) [homeassistant.components.konnected] dc4f22198d71: desired api endpoint: http://192.168.1.21:8123/api/konnected 2018-07-13 16:43:38 DEBUG (SyncWorker_7) [homeassistant.components.konnected] 84f3eb535c98: current api endpoint: http://192.168.1.21:8123/api/konnected 2018-07-13 16:43:38 DEBUG (SyncWorker_8) [homeassistant.components.konnected] dc4f22198d71: current api endpoint: None 2018-07-13 16:43:38 DEBUG (SyncWorker_8) [homeassistant.components.konnected] pushing settings to device dc4f22198d71 2018-07-13 16:43:48 WARNING (MainThread) [homeassistant.setup] Setup of wemo is taking over 10 seconds.
Any help appreciated.
Is the discovery component loading in the instances when Konnected doesn't show up? Because Hass doesn't have any persistent state between reboots, Konnected needs to be re-discovered on every reboot, so it relies on the discovery component loading. This should automatically happen but I don't see it in the log that you posted above.
I believe discovery should be loading every time. There's no issue with my Belkin WeMo switches being detected each time, though it might take a minute or two for them to show up.
I can easily reproduce this problem, is there a logging level I should set to get a better log for you?
I take it back. There's definitely something hanging up discovery. It seems it's just a matter of whether or not Konnected gets discovered before that or not.
Thanks for giving me a push in the right direction, and thanks for the great project!
I see the same using hassio. I have another issue as well using an add-on board, that I am creating a post for.
I'm experiencing the same issue. Sometimes my Konnected zones show up in Home Assistant, but usually, they don't. I have 3 other devices visible to HA - an Apple TV, a Yamaha receiver, and a Google Home. Only the Google Home shows up consistently. I pulled its power plug and restarted HA, and saw my Apple TV, but my receiver is not showing up. I plugged the Google Home back in, and it shows up readily.
I solved my issue by looking at the logs for the discovery service, and found that my WeMo switches seemed to be causing some issues and hanging discovery. I factory reset all of them and added them to my network again. After that, Konnected always gets detected, though sometimes it takes 4 or 5 minutes.
I'm having this issue as well. Often Konnected does not show up after HA restart and takes 2-10 restarts to get them to show up. I was originally on a ubuntu server running HA in a python virtual environment. Rather than spending a lot of time troubleshooting that I decided to move to a dedicated Raspberry Pi running Hassio. I figured that would be more standard. I'm now running a fresh clean install of Hassio however I'm still having this same issue. Here is my system log after restart when the Konnected sensors did not show up:
Tom, the system log isn't going to tell you anything useful in this case. You want to be looking at the home-assistant.log in /config.
Use the SSH add-on to access your Hass.io instance via command line and tail the home-assistant.log during boot.
Here is the home-assistant.log
Hi Tom,
Not sure why, but what I have noticed is that is I reboot with "hassio ho reboot" sometimes things don't get discovered when the system comes up. If I reboot via the hassio panel it is consistent. At times the discovery can take 20 to 30 seconds after the other devices are added and visible in the default panel.
I just got everything finally wired yesterday, as there were many odd things with the wiring from when the alarm was terminated by the company that originally installed everything in this pre-wired house. What version of hassio are your running? I am on 0.73.1 currently and seems to be detecting everything well.
I always use the hassio panel for reboots as well. I have the latest hassio (HA 0.74.2) that I clean flashed yesterday to eliminate an other variables. Only thing I've done is add samba to grab the logs. I also getting this log error 11 times a minute. If I unplug the Konnected boards then the error goes away
I also followed this guide and flashed release v2.2.3 to my devices to ensure I was on the latest firmware.
I get the same messages, so I don't think that has anything to do with the discovery issues: