Zigbee For Domoticz plugin - presence sensors settings

Xiaomi, Ikea TRÅDFRI, Philips Hue and more.

Moderator: leecollings

JanZorz
Posts: 85
Joined: Thursday 09 January 2020 13:14
Target OS: Linux
Domoticz version:
Contact:

Zigbee For Domoticz plugin - presence sensors settings

Post by JanZorz »

I believe that @pipiche might have some more info on this...

I installed Tuya TS0225 presence sensor and I can see in the user manual that there are many settings that you could set if using the original Tuya app and gateway (probably), including the sensitivity, modes of detection and so on.

I also read that Zigbee2mqtt implemented some sort of setting up zigbee devices, but I can't find anything in Zigbee For Domoticz Plugin. Any idea?

I'll not switch to Zigbee2MQTT in production just because of that feature...

Any thoughts?

Cheers, Jan
User avatar
waltervl
Posts: 5389
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Zigbee For Domoticz plugin - presence sensors settings

Post by waltervl »

Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
pipiche
Posts: 1996
Joined: Monday 02 April 2018 20:33
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: France
Contact:

Re: Zigbee For Domoticz plugin - presence sensors settings

Post by pipiche »

I have recently bring the this Motion into the plugin, and honestly I did the minimum integration, because I was not able to test it.

here after are the documented Data Point, and only the Motion info is currently handled.

Code: Select all

        "01": { "store_tuya_attribute": "motion", "EvalExp": "int(value == 0)", "DomoDeviceFormat": "str"},
        "02": { "store_tuya_attribute": "LargeMotionDetectionSensitivity" },
        "04": { "store_tuya_attribute": "LargeMotionDetectionDistance" },
        "65": { "store_tuya_attribute": "MotionState" },
        "66": { "store_tuya_attribute": "FadingTime" },
        "68": { "store_tuya_attribute": "MediumMotionDetectionDistance" },
        "69": { "store_tuya_attribute": "MediumMotionDetectionSensitivity" },
        "6a": { "store_tuya_attribute": "Illuminance" },
        "6b": { "store_tuya_attribute": "Indicator" },
        "6c": { "store_tuya_attribute": "SmallDetectionDistance" },
        "6d": { "store_tuya_attribute": "SmallDetectionSensitivity" }
So in short there are some work to do , if you are willing to test it (as I don't have the device) this could be a way
Zigbee for Domoticz plugin / RPI3B+ / Electrolama ZZH-P / 45 devices

If the plugin provides you value, you can support me with a donation Paypal.

Wiki is available here.

Zigbee for Domoticz FAQ
JanZorz
Posts: 85
Joined: Thursday 09 January 2020 13:14
Target OS: Linux
Domoticz version:
Contact:

Re: Zigbee For Domoticz plugin - presence sensors settings

Post by JanZorz »

pipiche wrote: Thursday 18 January 2024 18:41 I have recently bring the this Motion into the plugin, and honestly I did the minimum integration, because I was not able to test it.

here after are the documented Data Point, and only the Motion info is currently handled.

Code: Select all

        "01": { "store_tuya_attribute": "motion", "EvalExp": "int(value == 0)", "DomoDeviceFormat": "str"},
        "02": { "store_tuya_attribute": "LargeMotionDetectionSensitivity" },
        "04": { "store_tuya_attribute": "LargeMotionDetectionDistance" },
        "65": { "store_tuya_attribute": "MotionState" },
        "66": { "store_tuya_attribute": "FadingTime" },
        "68": { "store_tuya_attribute": "MediumMotionDetectionDistance" },
        "69": { "store_tuya_attribute": "MediumMotionDetectionSensitivity" },
        "6a": { "store_tuya_attribute": "Illuminance" },
        "6b": { "store_tuya_attribute": "Indicator" },
        "6c": { "store_tuya_attribute": "SmallDetectionDistance" },
        "6d": { "store_tuya_attribute": "SmallDetectionSensitivity" }
So in short there are some work to do , if you are willing to test it (as I don't have the device) this could be a way
Sure, I'm willing to test it. Do you have any more documentation about the parameters?
What's the difference between LargeMotionDetectionSensitivity, MediumMotionDetectionSensitivity and SmallDetectionSensitivity? Is this to set sensivity for different sizes objects? The values should be from 0 to 9, 0 being "diasabled"?

I set it to this for a test:

Parameters : {'Disabled': 0, 'LargeMotionDetectionSensitivity': 6, 'MediumMotionDetectionSensitivity': 4, 'SmallDetectionSensitivity': 2}

Let's see what happens...

Cheers, Jan
pipiche
Posts: 1996
Joined: Monday 02 April 2018 20:33
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: France
Contact:

Re: Zigbee For Domoticz plugin - presence sensors settings

Post by pipiche »

You didn’t get , as said nothing is implemented
Zigbee for Domoticz plugin / RPI3B+ / Electrolama ZZH-P / 45 devices

If the plugin provides you value, you can support me with a donation Paypal.

Wiki is available here.

Zigbee for Domoticz FAQ
JanZorz
Posts: 85
Joined: Thursday 09 January 2020 13:14
Target OS: Linux
Domoticz version:
Contact:

Re: Zigbee For Domoticz plugin - presence sensors settings

Post by JanZorz »

pipiche wrote: Thursday 18 January 2024 21:25 You didn’t get , as said nothing is implemented
Ok, if you implement it I'm willing to test it. Next week I'm on a trip abroad, but after that, I can do the tests.

Cheers, Jan
pipiche
Posts: 1996
Joined: Monday 02 April 2018 20:33
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: France
Contact:

Re: Zigbee For Domoticz plugin - presence sensors settings

Post by pipiche »

sound as a plan
Zigbee for Domoticz plugin / RPI3B+ / Electrolama ZZH-P / 45 devices

If the plugin provides you value, you can support me with a donation Paypal.

Wiki is available here.

Zigbee for Domoticz FAQ
JanZorz
Posts: 85
Joined: Thursday 09 January 2020 13:14
Target OS: Linux
Domoticz version:
Contact:

Re: Zigbee For Domoticz plugin - presence sensors settings

Post by JanZorz »

pipiche wrote: Friday 19 January 2024 15:59 sound as a plan
Hi,

I'm back home and can do the tests tomorrow, did you maybe have time to implement this change?

My plugin version is currently 7.1.007 [3.185]

Cheers, Jan
pipiche
Posts: 1996
Joined: Monday 02 April 2018 20:33
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: France
Contact:

Re: Zigbee For Domoticz plugin - presence sensors settings

Post by pipiche »

do you have any documentation, which can help me to understand those different parameters ?

I need to understand what does mean

SmallDetectionDistance vs. Medium vs. Large and what is the parameter ?
Zigbee for Domoticz plugin / RPI3B+ / Electrolama ZZH-P / 45 devices

If the plugin provides you value, you can support me with a donation Paypal.

Wiki is available here.

Zigbee for Domoticz FAQ
pipiche
Posts: 1996
Joined: Monday 02 April 2018 20:33
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: France
Contact:

Re: Zigbee For Domoticz plugin - presence sensors settings

Post by pipiche »

I just pushed 3.197 where TuyaFadingTime is enabled
For the rest, I need to understand what are those values and how they work with the device
Zigbee for Domoticz plugin / RPI3B+ / Electrolama ZZH-P / 45 devices

If the plugin provides you value, you can support me with a donation Paypal.

Wiki is available here.

Zigbee for Domoticz FAQ
pipiche
Posts: 1996
Joined: Monday 02 April 2018 20:33
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: France
Contact:

Re: Zigbee For Domoticz plugin - presence sensors settings

Post by pipiche »

Woudl appreciate if you could drop here an export.json :

WeUI > Tools > Plugin Raw Devices
Zigbee for Domoticz plugin / RPI3B+ / Electrolama ZZH-P / 45 devices

If the plugin provides you value, you can support me with a donation Paypal.

Wiki is available here.

Zigbee for Domoticz FAQ
JanZorz
Posts: 85
Joined: Thursday 09 January 2020 13:14
Target OS: Linux
Domoticz version:
Contact:

Re: Zigbee For Domoticz plugin - presence sensors settings

Post by JanZorz »

pipiche wrote: Saturday 27 January 2024 10:12 Woudl appreciate if you could drop here an export.json :

WeUI > Tools > Plugin Raw Devices
Export attached. The presence sensor device id is 28, ZDeviceName: "Presence sensor - Kopalnica".

Does that help?

Cheers, Jan
Attachments
export-zigbee.json.zip
(26.95 KiB) Downloaded 60 times
pipiche
Posts: 1996
Joined: Monday 02 April 2018 20:33
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: France
Contact:

Re: Zigbee For Domoticz plugin - presence sensors settings

Post by pipiche »

Thanks for all.

Can you kindly switch to a particular branch tuya-motion-radar-parameters (aligned on 7.1.008)

Code: Select all

git pull
git checkout tuya-motion-radar-parameters
git pull
sudo python3 -m pip install -r requirements.txt --upgrade
You might have to use the

Code: Select all

sudo
command on the

Code: Select all

git
one if you have some access rights issues

The defined/default parameters are:

Code: Select all

{
    "TuyaFadingTime": 2,
    "SmallDetectionSensitivity": 1,
    "MediumMotionDetectionSensitivity": 1,
    "LargeMotionDetectionSensitivity": 1,
    "SmallDetectionDistance": 0,
    "MediumMotionDetectionDistance": 8,
    "LargeMotionDetectionDistance": 1
}
Have fun and let me know how it goes. Probably the best is of course to do it one by one. When you change a parameter the change is not necessarly immediate. Check eventually the plugin log, you should see some messages like
2024-01-30 20:37:14,229 INFO :b'sanity_check_of_param TuyaFadingTime, 60'
2024-01-30 20:37:14,231 INFO :b'sanity_check_of_param TuyaFadingTime 60'
2024-01-30 20:37:14,232 INFO :b'ts0601_actuator - requesting TuyaFadingTime 60'
2024-01-30 20:37:14,233 INFO :b'ts0601_actuator - requesting TuyaFadingTime 110 60'
2024-01-30 20:37:14,236 INFO :b'ts0601_dt4_tuya_command - 40ff 01 110 60'
Zigbee for Domoticz plugin / RPI3B+ / Electrolama ZZH-P / 45 devices

If the plugin provides you value, you can support me with a donation Paypal.

Wiki is available here.

Zigbee for Domoticz FAQ
JanZorz
Posts: 85
Joined: Thursday 09 January 2020 13:14
Target OS: Linux
Domoticz version:
Contact:

Re: Zigbee For Domoticz plugin - presence sensors settings

Post by JanZorz »

pipiche wrote: Tuesday 30 January 2024 20:43
Have fun and let me know how it goes. Probably the best is of course to do it one by one. When you change a parameter the change is not necessarly immediate. Check eventually the plugin log, you should see some messages like

2024-01-30 20:37:14,229 INFO :b'sanity_check_of_param TuyaFadingTime, 60'
2024-01-30 20:37:14,231 INFO :b'sanity_check_of_param TuyaFadingTime 60'
2024-01-30 20:37:14,232 INFO :b'ts0601_actuator - requesting TuyaFadingTime 60'
2024-01-30 20:37:14,233 INFO :b'ts0601_actuator - requesting TuyaFadingTime 110 60'
2024-01-30 20:37:14,236 INFO :b'ts0601_dt4_tuya_command - 40ff 01 110 60'
Hey,

Switched to the yuya-motion-radar-parameters branch and got this in the log:

Code: Select all

2024-01-31 12:44:14,639 INFO    :b"ts0601_response - unknow dp d250 0b 4 01 {'01': {'store_tuya_value': 'motion', 'EvalExp': 'int(value
== 0)', 'DomoDeviceFormat': 'str'}, '65': {'store_tuya_value': 'MotionState'}, '6a': {'store_tuya_value': 'Illuminance'}, '6b': {'store_
tuya_value': 'Indicator'}, '66': {'store_tuya_value': 'fading_time', 'action_type': 'TuyaFadingTime'}, '02': {'store_tuya_value': 'Large
MotionDetectionSensitivity', 'action_type': 'LargeMotionDetectionSensitivity'}, '04': {'store_tuya_value': 'LargeMotionDetectionDistance
', 'action_type': 'LargeMotionDetectionDistance'}, '68': {'store_tuya_value': 'MediumMotionDetectionDistance', 'action_type': 'MediumMot
ionDetectionDistance'}, '69': {'store_tuya_value': 'MediumMotionDetectionSensitivity', 'action_type': 'MediumMotionDetectionSensitivity'
}, '6c': {'store_tuya_value': 'SmallDetectionDistance', 'action_type': 'SmallDetectionDistance'}, '6d': {'store_tuya_value': 'SmallDetec
tionSensitivity', 'action_type': 'SmallDetectionSensitivity'}}"
2024-01-31 12:44:14,640 INFO    :b'tuya_response - Model: TS0225 UNMANAGED Nwkid: d250/01 dp: 0b data type: 4 data: 01'
I'll check if the sensor still works :) :) :)

Cheers, Jan
pipiche
Posts: 1996
Joined: Monday 02 April 2018 20:33
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: France
Contact:

Re: Zigbee For Domoticz plugin - presence sensors settings

Post by pipiche »

The logs sound ok, they are many data points provided by this device, and someone of them are unknown
Zigbee for Domoticz plugin / RPI3B+ / Electrolama ZZH-P / 45 devices

If the plugin provides you value, you can support me with a donation Paypal.

Wiki is available here.

Zigbee for Domoticz FAQ
JanZorz
Posts: 85
Joined: Thursday 09 January 2020 13:14
Target OS: Linux
Domoticz version:
Contact:

Re: Zigbee For Domoticz plugin - presence sensors settings

Post by JanZorz »

pipiche wrote: Wednesday 31 January 2024 13:28 The logs sound ok, they are many data points provided by this device, and someone of them are unknown
The sensor still works, I'll play with the settings in the evening.

While we are at it - I also got the Sonoff SNZB-06P presence sensor now in my network that is not properly implemented yet in the plugin (according to https://zigbee.blakadder.com/Sonoff_SNZB-06P.html)

Attaching the Plugin Raw Devices export file, the new device is the last one, 37 - in case you would like to implement it ;)

Cheers and thnx, Jan
Attachments
export-snzb-06p.json.zip
(26.85 KiB) Downloaded 56 times
pipiche
Posts: 1996
Joined: Monday 02 April 2018 20:33
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: France
Contact:

Re: Zigbee For Domoticz plugin - presence sensors settings

Post by pipiche »

Yes, I know and I'm working on that one as well, but on a different branch.
So I suggest that we finished the 1st one and then we can move to the Sonoff. However would be interested to know what is not working properly ?
Zigbee for Domoticz plugin / RPI3B+ / Electrolama ZZH-P / 45 devices

If the plugin provides you value, you can support me with a donation Paypal.

Wiki is available here.

Zigbee for Domoticz FAQ
JanZorz
Posts: 85
Joined: Thursday 09 January 2020 13:14
Target OS: Linux
Domoticz version:
Contact:

Re: Zigbee For Domoticz plugin - presence sensors settings

Post by JanZorz »

pipiche wrote: Wednesday 31 January 2024 15:38 Yes, I know and I'm working on that one as well, but on a different branch.
So I suggest that we finished the 1st one and then we can move to the Sonoff. However would be interested to know what is not working properly ?
Sensor is sitting on my desk in front of me and despite the fact that I'm here majority of the time it switches on for about 30 seconds every 15 minutes or so. That's not the expected behaviour. It should be on majority of the time as I'm sitting righ in front of it.

See the two attached screenshots.

I tried to change the sensitivity with double press of a button to 1,2 and 3, but there's no change.

I don't know if it's the sensor or zigbee driver - but something is off. I did not include it with Sonoff gateway and app yet, it's fresh from the box, I just added it to the Zigbee network in Domoticz. Is it the default setting that is broken?

Cheers, Jan
Screenshot 2024-01-31 at 16.56.30.png
Screenshot 2024-01-31 at 16.56.30.png (20.95 KiB) Viewed 1367 times
Screenshot 2024-01-31 at 16.56.51.png
Screenshot 2024-01-31 at 16.56.51.png (82.58 KiB) Viewed 1367 times
pipiche
Posts: 1996
Joined: Monday 02 April 2018 20:33
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: France
Contact:

Re: Zigbee For Domoticz plugin - presence sensors settings

Post by pipiche »

could be related that the plugin use the Motion and not the Presence.

I don't have the device myself, and the other user I started the integration for is not responding anymore
Zigbee for Domoticz plugin / RPI3B+ / Electrolama ZZH-P / 45 devices

If the plugin provides you value, you can support me with a donation Paypal.

Wiki is available here.

Zigbee for Domoticz FAQ
JanZorz
Posts: 85
Joined: Thursday 09 January 2020 13:14
Target OS: Linux
Domoticz version:
Contact:

Re: Zigbee For Domoticz plugin - presence sensors settings

Post by JanZorz »

pipiche wrote: Wednesday 31 January 2024 17:24 could be related that the plugin use the Motion and not the Presence.

I don't have the device myself, and the other user I started the integration for is not responding anymore
Can you add those changes to yuya-motion-radar-parameters branch and I'll tell you if it works?

Cheers, Jan
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests