dresden-elektronik / deconz-rest-plugin

deCONZ REST-API plugin to control ZigBee devices
BSD 3-Clause "New" or "Revised" License
1.9k stars 498 forks source link

Issues in setting Philps Hue Outdoor Sensor SML004 sensitivity #7711

Closed mariomaz87 closed 5 months ago

mariomaz87 commented 5 months ago

Does the issue really belong here?

Is there already an existing issue for this?

Describe the bug

I'm trying to change the sensitivity of my Philips Hue Outdoor Motion Sensor, version SML004. Using the Deconz UI I can see that Sensitivity is 0. The ID of the attribute is 0x0030 and it's the same ID of "Physical Contact Occupied to Unoccupied" attribute. If I try to change the sensitivity using Hue Essential or HA developers tool with command:

service: deconz.configure data: entity: binary_sensor.presence_17 field: /config data: sensitivity: 2

I see that Physical Contact Occupied to Unoccupied attribute changes to 2, while Sensitivity is always 0.

Steps to reproduce the behavior

In HA Developer Tools, Services:

service: deconz.configure data: entity: binary_sensor.presence_17 field: /config data: sensitivity: 2

Expected behavior

Change Sensitivity attribute to specified value

Screenshots

Screenshot from 2024-04-18 21-51-29

Environment

deCONZ Logs

No response

Additional context

No response

ebaauw commented 5 months ago

As you can see from the screenshot, they messed up general.xml and defined another set of manufacturer-specific attributes with the same IDs (0x0030 and 0x0031) as the Hue attributes. You need to delete these, or move the Hue-specific attributes before them, for the GUI to handle the Hue-specific attributes correctly.

mariomaz87 commented 5 months ago

As you can see from the screenshot, they messed up general.xml and defined another set of manufacturer-specific attributes with the same IDs (0x0030 and 0x0031) as the Hue attributes. You need to delete these, or move the Hue-specific attributes before them, for the GUI to handle the Hue-specific attributes correctly.

Thanks. Is this something I can do in the GUI? Do I have to change some configuration file? Thanks!

ebaauw commented 5 months ago

You need to edit general.xml and restart deCONZ. Typically it's in /usr/share/deCONZ/zcl/. Best to make a backup, but it's also restored when re-installing deCONZ.

mariomaz87 commented 5 months ago

I'm using docker so I think it's a little bit different. I copied the file from the docker container, using docker cp, to a local folder, I removed the whole section for "Physical Contact Configuration" and copied the file back in the container, I rebooted but if I log with VNC I still see the same old configuration. I double checked and the general.xml is the updated one.

EDIT: after another reboot now I have the new configuration in the GUI: Screenshot from 2024-04-19 14-22-32

But if I try to lower the sensitivity below 2 (1 for example) no motion is detected. As if 2 is the lowest possible setting, but I don't know if this is the case.

ebaauw commented 5 months ago

Sensitivity is from 0 (least sensitive) to the value of Sensitivity max, 4 (most sensitive).

You have the delay set to 90s, so the sensor wouldn't detect any new motion 90s after first detecting motion. I think it resets automatically after a couple of minutes.

You might want to set usertest (in Basic cluster), so the sensor blinks green when it detects motion, and, I think, skips any delays.

mariomaz87 commented 5 months ago

Thanks. I'm already using usertest and I confirm it skips any delays. Any sensitivity setting below 2 prevents the sensor from detecting any movement. 2, 3, and 4 work as expected increasing the sensitivity, but with 1 and 0 the sensor stops working. I remember that while using the Hue hub it was possibile to set the sensitivity from 1 to 5, so it's a little bit strange that in Deconz I only have 3 useful settings.

ebaauw commented 5 months ago

This has nothing to do with deCONZ; sensitivity is handled by the sensor itself.

Mimiix commented 5 months ago

In that case I'm closing this issue.