Hi @kkossev - wondering if you got further with adding this reporting time parameter to your 4 in 1 driver? I have the sensor in my bathroom. I’d like to turn on real time reporting when it is triggered my motion. Then I’ll use the humidity reading to turn on and off the fan when someone has a shower. Right now temp/humidity/Lum only update every 5 minutes which is too slow for this application…
I started working on the Tiya 4-in-1 reporting time period and the good news is that I managed to configure it to report every 10 seconds!
> Line 1: dev:38222023-03-28 23:52:38.040 info TS0202 _TZ3210_zmy9hjay humidity is 24 % RH
> Line 4: dev:38222023-03-28 23:52:28.628 info TS0202 _TZ3210_zmy9hjay humidity is 24 % RH
> Line 7: dev:38222023-03-28 23:52:19.195 info TS0202 _TZ3210_zmy9hjay humidity is 24 % RH
> Line 13: dev:38222023-03-28 23:52:09.838 info TS0202 _TZ3210_zmy9hjay humidity is 24 % RH
> Line 16: dev:38222023-03-28 23:52:00.387 info TS0202 _TZ3210_zmy9hjay humidity is 24 % RH
> Line 22: dev:38222023-03-28 23:51:52.193 info TS0202 _TZ3210_zmy9hjay humidity is 23 % RH
> Line 25: dev:38222023-03-28 23:51:50.992 info TS0202 _TZ3210_zmy9hjay temperature is 32.2 °C
> Line 28: dev:38222023-03-28 23:51:41.581 info TS0202 _TZ3210_zmy9hjay humidity is 23 % RH
> Line 37: dev:38222023-03-28 23:51:30.204 info TS0202 _TZ3210_zmy9hjay Illuminance is 417 Lux
> Line 39: dev:38222023-03-28 23:51:29.018 info TS0202 _TZ3210_zmy9hjay humidity is 23 % RH
> Line 45: dev:38222023-03-28 23:51:19.607 info TS0202 _TZ3210_zmy9hjay temperature is 32.7 °C
> Line 51: dev:38222023-03-28 23:51:03.993 info TS0202 _TZ3210_zmy9hjay humidity is 23 % RH
> Line 54: dev:38222023-03-28 23:50:51.438 info TS0202 _TZ3210_zmy9hjay humidity is 23 % RH
> Line 57: dev:38222023-03-28 23:50:48.299 info TS0202 _TZ3210_zmy9hjay Illuminance is 422 Lux
> Line 59: dev:38222023-03-28 23:50:46.328 info TS0202 _TZ3210_zmy9hjay humidity is 23 % RH
> Line 62: dev:38222023-03-28 23:50:45.130 info TS0202 _TZ3210_zmy9hjay temperature is 33.2 °C
> Line 65: dev:38222023-03-28 23:50:41.986 info TS0202 _TZ3210_zmy9hjay humidity is 24 % RH
> Line 68: dev:38222023-03-28 23:50:38.875 info TS0202 _TZ3210_zmy9hjay humidity is 24 % RH
> Line 71: dev:38222023-03-28 23:50:35.740 info TS0202 _TZ3210_zmy9hjay humidity is 24 % RH
> Line 74: dev:38222023-03-28 23:50:32.607 info TS0202 _TZ3210_zmy9hjay humidity is 24 % RH
> Line 77: dev:38222023-03-28 23:50:29.463 info TS0202 _TZ3210_zmy9hjay humidity is 24 % RH
> Line 80: dev:38222023-03-28 23:50:26.341 info TS0202 _TZ3210_zmy9hjay humidity is 25 % RH
> Line 83: dev:38222023-03-28 23:50:23.189 info TS0202 _TZ3210_zmy9hjay humidity is 25 % RH
> Line 86: dev:38222023-03-28 23:50:21.210 info TS0202 _TZ3210_zmy9hjay Illuminance is 427 Lux
> Line 88: dev:38222023-03-28 23:50:20.019 info TS0202 _TZ3210_zmy9hjay humidity is 26 % RH
The next steps for T/H reporting are 1 minute, 2, minutes, etc..
Hope to have the time to finish a new version ready for testing in the next few days.
Fantastic stuff! Interesting as the manual says you can only configure it in 5 min intervals but if you set it to 0 then it’s “real time”. Look forward to trying out your new code and thanks for all your efforts!
Hi @kkossev - this works well. It would be good to be able to change the reporting time parameter from a rule so I could alter it to the 10 second interval only when presence is detected.
Hi @kkossev - I installed the latest driver and I see the reportingTime4in1 parameter under SetPar. Question - do you know how to set this new parameter from a rule? I tried to use a custom action for the Motion sensor device but I’m not sure I can set the value as SetPar has multiple different attributes and the Rule only appears to let me set a value or String for SetPar. So I can set SetPar to “reportingTime4in1” but I can’t seem to set the value of that. Seems like I would be able set it it if it was on its own as an attribute rather than under SetPar?
Here’s the warning log of me trying to set it from a rule to 5 minute updates:
[warn]/logs#)EnsuiteMulti setPar: parameter reportingTime4in1,5 must be one of these : [--- Select ---, reportingTime4in1, radarSensitivity, detectionDelay, fadingTime, minimumDistance, maximumDistance]
You need to define 2 parameters of a type String - the first one is the parameter to change (reportingTime4in1) and the second one is the reporting interval as a minutes number (or 0 for 10 seconds period)