deCONZ - Official thread

I bought some Sylvania Smart Home 72569 LIGHTIFY under-cabinet lighting, and added them to deCONZ.

So far so good, they show up as the following, inside the HA integrations page:

LIGHTIFY Conv Under Cabinet TW
by OSRAM

I can turn them on/off from HA. However HA shows me a color wheel. These light are only color temperature controlled, not RGB.

I can set the color temperature on them perfectly if I use the light.turn_on service and set the kelvin attribute, so I know HA is talking to deCONZ about color temp just fine.

So my question is, why is HA showing a color wheel when that’s unsupported, and not showing the color temperature slider when that is supported?

Is this something configured wrong on my end? A deCONZ bug, or a HA bug?

I’ll be happy to report the bug in the right place, i just want to make sure I’m not doing something wrong first.

Also, I don’t see anything about supported features in the entity registry file or device registry file for this light, so I’m not even sure how HA is seeing and storing what the supported features are…

Hard to say. If you can enable debug for deconz component and find the data about your device and share it here we can find out. :+1:

Anyone using deconz running the Hass beta track?

With 0.94 (most likely) beta a rewrite of the deconz backend on how attributes for all devices are changed, it is a significant change but shouldn’t really affect behaviour (if I did everything right). And I’d like to catch possible errors during beta, I’ve written tests and ran it myself but I don’t have all devices or all use cases.

Cheers
/R

How can I enable the color picker for my Philips color bulbs? I have only the brightness slider.

If you turn it on does not appear?

:see_no_evil: thanks.

I am wondering if anyone came across this issue with Xiaomi Aqara Vibration sensor:

It “works” when I move the sensor, however the vibration detection is pretty much non-existent.
I can tap directly on the sensor enclosure, or place it on top of my washing machine while it’s spinning to no avail.

Apparently this device supports “sensitivity” attribute, but I can’t see/set it in deCONZ/Phoscon gateway add-on. I have found the the issue report for deCONZ REST API that supposedly allows to set it via the following command:

curl -H 'Content-Type: application/json' -X PUT -d '{"sensitivity": 1}' http://yourIP/api/yourKEY/sensors/yourSensorID/config

Source: https://github.com/dresden-elektronik/deconz-rest-plugin/issues/1396

According to the above link, Sensitivity is from 1 to 21 where 1 is the most sensitive.

I am not sure if this can be used in case of hassio & deCONZ add-on.
I attempted to set the sensitivity via states and service_data JSON, but I don’t think it did anything at all. It would be great if I could somehow get the current setting of this attribute.

I suppose I could run it as a shell command, but no idea what the “yourKEY” is, or where to get it (is that the gwid?), as well as if the “yourSensorID” is the device ID from hassio - “binary_sensor.vibration_6” in my case?

Any ideas?

I have same issue, and I’d basically forgotten about setting the sensitivity. So thanks for pointing me to that thread!

I haven’t done this yet, but YourKey is the deconz API key, if you’ve no idea on this you should be able to find it in your HA config dir/.storage/core.config_entities.

The sensor id you should be able to get by doing a GET /api/apikey/sensors and finding it in the returned list of sensors.

Edit: Just done this, and it worked.

sensor id is available in entity_registry

The rest API wants the internal numeric id, not the semi friendly one from the registry. The id of mine is 35, for instance, and that’s not in the entity registry.

Ok, that can be found in the logs if enabling debug for deconz component.

You can actually use the unique id as well, but now you have two ways

Thank you for pointing me in the right direction!

To check the current setting I executed this command:
curl http://{hassio_ip}:{phoscon_port}/api/{api_key}/sensors/{sensor_id}

Which gave me (among other things) the following information:
"manufacturername":"LUMI","modelid":"lumi.vibration.aq1","sensitivity":11,"sensitivitymax":21
This means that by default the sensitivity is roughly in the middle.

To change it I ran the following command (as per the source):
curl -H 'Content-Type: application/json' -X PUT -d '{"sensitivity": 1}' http://{hassio_ip}:{phoscon_port}/api/{api_key}/sensors/{sensor_id}/config

The setting has been updated (confirmed with the first command).

Then, I have performed some tests like tapping the sensors enclosure and knocking on the desk the sensor was on, but it only seems to register the accidental motion rather than vibration - when I knocked so hard it jumped slightly :smiley:

I will still have to test it on the washing machine again, but it looks like this can’t be used as a door “knocking” sensor even with the sensitivity set to 1.

1 Like

Are you sure that 1 is the most sensitive ? I though it was the opposite: 21 is the most sensitive.

I was wondering the same thing, especially after noticing the “sensitivitymax”:21 attribute in my settings.
The only other sensitivity reference I found is the following code by @Koenkk:

/* Note when send the command to set sensitivity, press button on the device to make it wakeup*/
DJT11LM_vibration_sensitivity: {
    key: 'sensitivity',
    attr: ['level'],
    convert: (value, message) => {
        const lookup = {
            'low': 0x15,
            'medium': 0x0B,
            'high': 0x01,
        };

So these hex values are 21 for low, 11 for medium and 1 for high.

Source: https://github.com/Koenkk/zigbee-shepherd-converters/pull/74/files#diff-3e0c275bd41af699153bf59d8dda4a2a

1 Like

Can you tell how you flash it? I have the cc2531 stick with zigbee2mqtt flashed already

I used the Cable and debugger (https://www.zigbee2mqtt.io/getting_started/what_do_i_need.html) and then flashed the router fw from here: https://github.com/Koenkk/Z-Stack-firmware/tree/master/router/CC2531/bin

1 Like

I am getting ‘NoneType’ object has no attribute ‘api’ error when trying to call deconz.device_refresh service.

Wed Jun 05 2019 23:05:57 GMT+0100 (British Summer Time)
'NoneType' object has no attribute 'api'
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/websocket_api/commands.py", line 121, in handle_call_service
    connection.context(msg))
  File "/usr/local/lib/python3.7/site-packages/homeassistant/core.py", line 1141, in async_call
    self._execute_service(handler, service_call))
  File "/usr/local/lib/python3.7/site-packages/homeassistant/core.py", line 1163, in _execute_service
    await handler.func(service_call)
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/deconz/__init__.py", line 121, in async_refresh_devices
    groups = set(gateway.api.groups.keys())
AttributeError: 'NoneType' object has no attribute 'api'

I have upgraded to the add-on to the newest version, restarted hassio and the add-on.

It might not be related to the update, just my instance of hassio, but I am unsure where to start, as all deCONZ connected devices are working correctly, I just want to refresh them.
If I remember correctly deCONZ 2.05.65 is supposed to fix the Xiaomi sensors battery status issues.

Can anyone assist?

Ok, something is awry with the get master gateway method.

could you try specifying the bridgeid, it would be the string of numbers you see in the integrations pane

I’ve attempted to do that, but again, no joy (unless I am formatting the JSON data incorrectly):
2019-06-05%2023_26_07-Home%20Assistant%20-%20Opera

Error:

Wed Jun 05 2019 23:25:57 GMT+0100 (British Summer Time)
'0212EFFFF040769'
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/websocket_api/commands.py", line 121, in handle_call_service
    connection.context(msg))
  File "/usr/local/lib/python3.7/site-packages/homeassistant/core.py", line 1141, in async_call
    self._execute_service(handler, service_call))
  File "/usr/local/lib/python3.7/site-packages/homeassistant/core.py", line 1163, in _execute_service
    await handler.func(service_call)
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/deconz/__init__.py", line 119, in async_refresh_devices
    gateway = hass.data[DOMAIN][call.data[CONF_BRIDGEID]]
KeyError: '0212EFFFF040769'

Both paths works for me @Viggen