Summary of the problem: The lights I have successfully connected in deCONZ/Phoscon App remain “Unavailable” in Hass io and cannot be controlled with e.g. light.turn_on service. However I can control the lights from the Phoscon App and I can even activate deCONZ scenes from Hass io. However, the individual light dont connect correctly to Hass io.
I am totally new to the home automation stuff, and have now been trying to set up my first ever home automation project (wakeup lights). I am not sure if I have skipped some critical step, just misunderstood how the whole system should work, or have I ran in to a bug. However it is not working for me now.
My setup is:
- Raspberry Pi 3B+
- Hass io image (Home Assistant 0.85.1)
- ConBee Zigbee USB Gateway plugged in to the Raspberry
- deCONZ from the Hass io add-on store (Version 2.05.54 / 1/4/2019, Firmware 260B0500)
- Innr smart candles (RB 245-2)
- (+ Philips Hue Dimmer Switch)
So far I have successfully done the following steps:
- Installed and ran the Hass io on my Raspberry.
- Installed and ran the deCONZ add-on on Hass io, (set “device”: “/dev/ttyUSB0” and started the add-on),
- Entered the Phoscon App-webpage, connected my lights and dimmer switch to it, and created some scenes. I can now in the Phoscon App turn lights on and off and also control the brightness of the lights. Also controlling lights through the scenes works.
- In Hass io, I have done the integration of the deCONZ add-on by doing these steps:
- Click: Configuration>Set up a new integration>deCONZ Zigbee gateway>Configure
- Give to the prompt ip 127.0.0.1 and port 9880
- In Phoscon App opened the gateway for new connections by clicking: Hamburger menu>Settings>Gateway>Advanced>Authenticate App
- The Hass io then connected “succesfully” to the deCONZ, and I can see all my lights and scenes in home assistant Overview-view.
So that sounds good, but unfortunately both of the lights and the light group all show “Unavailable” next to them. Also they dont seem to react at all to commands I try to send directly to them from home assistant. E.g. using Developer tools>Services to run the service light.turn_on on group entitity light.bedroom_lights (or only one light: light.wakeup_1) does nothing. However, it seems that HA is connected somehow to the deCONZ as in the same interface running service scene.turn_on on entitity scene.bedroom_lights_bedroom_lights_on succesfully turns on the lights!
I have tried to debug this and I have thus enabled the deCONZ logging by adding to configuration.yaml the following lines:
# enable logging
logger:
default: info
logs:
pydeconz: debug
homeassistant.components.deconz: debug
So I did a test now by running first the light.turn_on service as decribed above (nothing happens) and then running the scene.turn_on service (lights get turned on). In the log this looks like this:
2019-01-18 00:39:28 DEBUG (MainThread) [pydeconz.websocket] Websocket starting
2019-01-18 00:39:28 DEBUG (MainThread) [pydeconz.websocket] Websocket starting
2019-01-18 00:39:28 DEBUG (MainThread) [pydeconz.websocket] Reconnecting to deCONZ in 15.
2019-01-18 00:39:43 DEBUG (MainThread) [pydeconz.websocket] Websocket starting
2019-01-18 00:39:43 DEBUG (MainThread) [pydeconz.websocket] Websocket starting
2019-01-18 00:39:43 DEBUG (MainThread) [pydeconz.websocket] Reconnecting to deCONZ in 15.
2019-01-18 00:39:48 DEBUG (MainThread) [pydeconz.utils] Sending {'data': '{}'} to http://127.0.0.1:9880/api/13C3D14D25/groups/1/scenes/1/recall
2019-01-18 00:39:48 DEBUG (MainThread) [pydeconz.utils] HTTP request response: [{'success': {'id': '1'}}]
2019-01-18 00:39:58 DEBUG (MainThread) [pydeconz.websocket] Websocket starting
2019-01-18 00:39:58 DEBUG (MainThread) [pydeconz.websocket] Websocket starting
2019-01-18 00:39:58 DEBUG (MainThread) [pydeconz.websocket] Reconnecting to deCONZ in 15.
So the call to the light.turn_on service does not show any activity in the log and I think the HA is not even trying to send any command to deCONZ as the lights are “Unavailable”. The scene.turn_on call seems to work as supposed. Also, I dont know if that is part of the problem or normal behaviour, but that “Websocket starting” and “Reconnecting to deCONZ in 15.” keeps repeating in the log all the time.
So dear Home Assistant/deCONZ gurus out there, what is the problem? Why is the HA seeing my lights being unavailable and not be able to control them?
FYI, here is still the log details showing log after the deconz.device_refresh call:
2019-01-18 00:53:24 DEBUG (MainThread) [pydeconz.utils] Sending {} to http://127.0.0.1:9880/api/13C3D14D25
2019-01-18 00:53:24 DEBUG (MainThread) [pydeconz.utils] HTTP request response: {...}
2019-01-18 00:53:24 DEBUG (MainThread) [pydeconz] {'config': {'UTC': '2019-01-17T22:53:24',
'apiversion': '1.16.0',
'backup': {'errorcode': 0, 'status': 'idle'},
'bridgeid': '00212EFFFF02F369',
'datastoreversion': '60',
'devicename': 'RaspBee',
'dhcp': True,
'factorynew': False,
'fwversion': '0x260b0500',
'gateway': '172.30.33.1',
'internetservices': {'remoteaccess': 'disconnected'},
'ipaddress': '172.30.33.0',
'linkbutton': False,
'localtime': '2019-01-18T00:53:24',
'mac': '02:42:ac:1e:21:00',
'modelid': 'deCONZ',
'name': 'Phoscon-GW',
'netmask': '255.255.254.0',
'networkopenduration': 60,
'panid': 10711,
'portalconnection': 'disconnected',
'portalservices': False,
'portalstate': {'communication': 'disconnected',
'incoming': False,
'outgoing': False,
'signedon': False},
'proxyaddress': 'none',
'proxyport': 0,
'replacesbridgeid': None,
'rfconnected': True,
'starterkitid': '',
'swupdate': {'checkforupdate': False,
'devicetypes': {'bridge': False,
'lights': [],
'sensors': []},
'notify': False,
'text': '',
'updatestate': 0,
'url': ''},
'swupdate2': {'autoinstall': {'on': False, 'updatetime': ''},
'bridge': {'lastinstall': '%cI',
'state': 'allreadytoinstall'},
'checkforupdate': False,
'install': False,
'lastchange': '',
'lastinstall': '',
'state': 'allreadytoinstall'},
'swversion': '2.5.54',
'timeformat': '12h',
'timezone': 'Etc/GMT-2',
'uuid': '7be1b32b-b022-4d0a-a5b0-1360c2a2ed57',
'websocketnotifyall': True,
'websocketport': 8080,
'whitelist': {'13C3D14D25': {'create date': '2019-01-16T21:39:22',
'last use date': '2019-01-17T22:53:24',
'name': 'pydeconz'},
'2492C5858C': {'create date': '2019-01-16T20:34:59',
'last use date': '2019-01-16T20:35:02',
'name': 'pydeconz'},
'42A277B60D': {'create date': '2019-01-15T20:10:07',
'last use date': '2019-01-15T20:37:39',
'name': 'pydeconz'},
'4B5DD00D11': {'create date': '2019-01-16T20:43:55',
'last use date': '2019-01-16T21:35:38',
'name': 'pydeconz'},
'7634D682A2': {'create date': '2019-01-16T18:22:17',
'last use date': '2019-01-16T18:22:23',
'name': 'pydeconz'},
'91B652B409': {'create date': '2019-01-15T21:13:37',
'last use date': '2019-01-15T21:13:51',
'name': 'pydeconz'},
'A854700700': {'create date': '2019-01-15T20:07:07',
'last use date': '2019-01-17T22:53:19',
'name': 'Phoscon#B1920x969'},
'AC37BBB6A4': {'create date': '2019-01-16T19:13:09',
'last use date': '2019-01-16T19:51:57',
'name': 'pydeconz'}},
'zigbeechannel': 15},
'groups': {'1': {'action': {'bri': 190,
'colormode': 'hs',
'ct': 0,
'effect': 'none',
'hue': 0,
'on': True,
'sat': 127,
'scene': '1',
'xy': [0, 0]},
'devicemembership': [],
'etag': 'bc6785fc21c479cea384f9d868eb6abb',
'id': '1',
'lights': ['1', '2'],
'name': 'bedroom_lights',
'scenes': [{'id': '1',
'lightcount': 2,
'name': 'bedroom_lights_on',
'transitiontime': 0},
{'id': '2',
'lightcount': 2,
'name': 'bedroom_lights_off',
'transitiontime': 0},
{'id': '3',
'lightcount': 2,
'name': 'bedroom_lights_level1',
'transitiontime': 0},
{'id': '4',
'lightcount': 2,
'name': 'bedroom_lights_level2',
'transitiontime': 10},
{'id': '5',
'lightcount': 2,
'name': 'bedroom_lights_level3',
'transitiontime': 10},
{'id': '6',
'lightcount': 2,
'name': 'bedroom_lights_level4',
'transitiontime': 10}],
'state': {'all_on': True, 'any_on': True},
'type': 'LightGroup'},
'11241': {'action': {'bri': 127,
'colormode': 'hs',
'ct': 0,
'effect': 'none',
'hue': 0,
'on': False,
'sat': 127,
'scene': None,
'xy': [0, 0]},
'devicemembership': ['2'],
'etag': '4986ba6e53bb55f3baee4a641b3ceb8a',
'id': '11241',
'lights': [],
'name': 'RWL021 3',
'scenes': [],
'state': {'all_on': False, 'any_on': False},
'type': 'LightGroup'}},
'lights': {'1': {'etag': 'bc6785fc21c479cea384f9d868eb6abb',
'hascolor': False,
'manufacturername': 'innr',
'modelid': 'RB 245',
'name': 'light_bedroom_1',
'state': {'alert': 'none',
'bri': 252,
'on': True,
'reachable': True},
'swversion': '2.0',
'type': 'Dimmable light',
'uniqueid': '00:15:8d:00:02:f4:0e:3c-01'},
'2': {'etag': 'bc6785fc21c479cea384f9d868eb6abb',
'hascolor': False,
'manufacturername': 'innr',
'modelid': 'RB 245',
'name': 'light_bedroom_2',
'state': {'alert': 'none',
'bri': 252,
'on': True,
'reachable': True},
'swversion': '2.0',
'type': 'Dimmable light',
'uniqueid': '00:15:8d:00:02:f6:04:e6-01'}},
'resourcelinks': {'1': {'classid': 3001,
'description': 'Resourcelink for switch rule',
'links': ['/groups/1',
'/sensors/00:17:88:01:04:0b:db:30-02-fc00',
'/rules/1'],
'name': 'opt_on',
'owner': 'A854700700',
'recycle': False,
'type': 'Link'},
'2': {'classid': 3002,
'description': 'Resourcelink for switch rule',
'links': ['/groups/1',
'/sensors/00:17:88:01:04:0b:db:30-02-fc00',
'/rules/2'],
'name': 'opt_off',
'owner': 'A854700700',
'recycle': False,
'type': 'Link'}},
'rules': {'1': {'actions': [{'address': '/groups/1/action',
'body': {'on': True},
'method': 'PUT'}],
'conditions': [{'address': '/sensors/00:17:88:01:04:0b:db:30-02-fc00/state/buttonevent',
'operator': 'eq',
'value': '1002'},
{'address': '/sensors/00:17:88:01:04:0b:db:30-02-fc00/state/lastupdated',
'operator': 'dx'}],
'created': '2019-01-15T20:50:57',
'etag': '607ce1bbdaa5fc00b85c42087beda759',
'lasttriggered': '2019-01-17T21:04:00',
'name': 'Rule ON',
'owner': 'A854700700',
'periodic': 0,
'status': 'enabled',
'timestriggered': 2},
'2': {'actions': [{'address': '/groups/1/action',
'body': {'on': False},
'method': 'PUT'}],
'conditions': [{'address': '/sensors/00:17:88:01:04:0b:db:30-02-fc00/state/buttonevent',
'operator': 'eq',
'value': '4002'},
{'address': '/sensors/00:17:88:01:04:0b:db:30-02-fc00/state/lastupdated',
'operator': 'dx'}],
'created': '2019-01-15T20:51:09',
'etag': '6017865f516f75d699eebe825a1dedd1',
'lasttriggered': '2019-01-17T22:39:46',
'name': 'Rule OFF',
'owner': 'A854700700',
'periodic': 0,
'status': 'enabled',
'timestriggered': 6}},
'scenes': {},
'schedules': {},
'sensors': {'1': {'config': {'configured': True,
'on': True,
'sunriseoffset': 30,
'sunsetoffset': -30},
'etag': 'af294dca63cd65efa24770e02ceddc79',
'manufacturername': 'Philips',
'modelid': 'PHDL00',
'name': 'Daylight',
'state': {'dark': True,
'daylight': False,
'lastupdated': '2019-01-17T22:32:54',
'status': 100},
'swversion': '1.0',
'type': 'Daylight',
'uniqueid': '00:21:2e:ff:ff:02:f3:69-01'},
'2': {'config': {'battery': 100,
'group': '11241',
'on': True,
'reachable': True},
'ep': 2,
'etag': '8f8a1c56f9bf8d4b3e23663e86bb0c8b',
'manufacturername': 'Philips',
'mode': 1,
'modelid': 'RWL021',
'name': 'controller_bedroom',
'state': {'buttonevent': 4002,
'lastupdated': '2019-01-17T22:39:46'},
'swversion': '5.45.1.17846',
'type': 'ZHASwitch',
'uniqueid': '00:17:88:01:04:0b:db:30-02-fc00'}}}