Page 1 of 1

For those using the Lidl motion sensor(SOLVED)

Posted: Monday 16 May 2022 21:33
by Bospieper
Hi,
I have the following problem. In my house I have several Lidl motion sensors mainly to switch lights for a period of time.
Regularly some sensors stay's in a "On" situation in the domoticz enviroment. I can see it in the app list where the icon of the sensor stays red.
The only thing that works to get the sensor in de normal state is to remove the device in the app list and then reset the sensor. In domoticz the sensor then added as a new device with the state "Off". You can imagine that when this happens often your device counter in the app list is running up in nummers. For example I have a 100 devices and the counter is currently at 315 all becouse off sensors witch are deleted and then new added.
My question is: is there another way to reset manualy or by script, in domoticz, the device?
I think that the problem is that the reset from the device somehow not in domoticz is processed. The consequence for scripting is that once in the "On "state other future movements are not detected.

Re: For those using the Lidl motion sensor

Posted: Monday 16 May 2022 22:10
by waltervl
Check the gateway user interface (probably zigbee2mqtt?). Is it there still updated? The gateway is communicating with the device so there the reconnect should be executed. Domoticz will follow automatically.

Re: For those using the Lidl motion sensor

Posted: Tuesday 17 May 2022 8:17
by Bospieper
Hi Waltervl,
If the Gateway is causing the problem then all my sensors should showing the same behavior. I have several Zigbee devices but only the motion sensors are showing this behavior.

Re: For those using the Lidl motion sensor

Posted: Tuesday 17 May 2022 8:51
by waltervl
Losing connection or not being updated is mostly caused by the gateway. So first to check the gateway if the sensor is updated there. If not then it is a gateway or zigbee network issue. If it is updating in Gateway UI but not in Domoticz then it is a communication issue or Domoticz issue.

What is the gateway? Zigate, Deconz, Zigbee2MQTT (plugin or AutoDiscover)?

Re: For those using the Lidl motion sensor

Posted: Wednesday 18 May 2022 19:54
by Bospieper
Hi Waltervl,
The gateway is updated by sensor movement, domoticz not. I am using Zigbee2mqtt Plugin v 3.1.0-beta.
Grtz. Piet

Re: For those using the Lidl motion sensor

Posted: Thursday 19 May 2022 11:30
by waltervl
Then you should check with the plugin forum topic viewtopic.php?t=23607 or make a github issue in the plugin repository https://github.com/stas-demydiuk/domoti ... gin/issues
You can also consider using the MQTT Autodiscover gateway instead of the plugin https://www.domoticz.com/wiki/Zigbee2MQ ... todiscover

Re: For those using the Lidl motion sensor

Posted: Friday 20 May 2022 8:47
by Bospieper
Hi Waltervl,
I'll give it a try :)

Re: For those using the Lidl motion sensor(SOLVED)

Posted: Sunday 31 July 2022 18:14
by Bospieper
Solved the problem by manually editing the domoticz database.

Re: For those using the Lidl motion sensor(SOLVED)

Posted: Monday 01 August 2022 12:40
by waltervl
?? What did you change then?

Re: For those using the Lidl motion sensor(SOLVED)

Posted: Monday 05 September 2022 9:43
by Bospieper
Hi Walterv,
I've changed the Nvalue and Svalue from 1 to 0. I compare these values with the ones with the motion sensors normally working.

Re: For those using the Lidl motion sensor(SOLVED)

Posted: Friday 09 September 2022 12:55
by julienb
What is the model of the sensors you are using ? I just bought one, it appears as a TY0202, and is recognized as a Door Unit by default, which obviously seems wrong.

I just can't get it to work correctly, even after having reconfigured it to a motion sensor, the input value stays at « Off », and nothing appears in domoticz log.

Note: i'm using Domoticz-Zigbee plugin with a Zigate.

Re: For those using the Lidl motion sensor(SOLVED)

Posted: Friday 09 September 2022 17:23
by bl34
Hi,
I have just installed one today and it took several attemps to get it working in Domoticz. This is with version 6.2.145 of the ZigBeeforDomoticZ plugin.
The sensor did appear in DZ as a motion sensor after I enabled 'Accept new Hardware Devices' in DZ setup and started pairing in the plugin gui,
but the state stayed always off in DZ even after the red led on the sensor switched on and off as expected.
Below the messages found in the plugin log, resulting in no change in DZ:

Code: Select all

Decode004D V2 - Device Annoucement: NwkId: ef14 Ieee: 2c1165fffe819cc0 MacCap: 80 ReJoin: None LQI: 6b NewDevice: False
------------ > Existing device ShortId New: ef14 ShortId Old: ef14
device_annoucementv2 - Nwkid: ef14 Status: inDB
------------ > No Rejoin Flag seen, droping
I ended up cleaning the device from DZ and retried the pairing (2 times) to finally see the sensor reported on or off in DZ.
When everything is OK you should see messages as below when the sensor detects movements :

Code: Select all

Zigate: UpdateDevice - (Zigate - TY0202_Motion-2c1165fffe819cc0-01) 1:On
Zigate: UpdateDevice - (Zigate - TY0202_Tamper-2c1165fffe819cc0-01) 1:Tamper
Hope this helps.

Re: For those using the Lidl motion sensor(SOLVED)

Posted: Friday 09 September 2022 22:33
by julienb
Thanks. So i probably need to switch to the beta6 branch. I looked for TY0202 in the rc-6.3 branch without finding anything, but it seems it is indeed supported by the beta branch.

Re: For those using the Lidl motion sensor(SOLVED)

Posted: Sunday 11 September 2022 17:19
by julienb
Ok, so i got it working by just cherry picking the two relevant commits from beta branch. Detected and working fine.

One more question: I'm trying to use it as an automatic light (presence -> light on, no presence -> light off). The problem is that even if i stay in the room, i get an "off" event after around 30 seconds, and then another one about 30 seconds later. And during that period, no movement can wake the light on again (it does not trigger the red light of the detector). So that makes it quite unusable as an automatic light detection.

How do you configure them so that you don't have this issue ?

Re: For those using the Lidl motion sensor(SOLVED)

Posted: Monday 12 September 2022 13:21
by bl34
I see the same behavior with 2 'Off' states reported in Domoticz. I guess this is the difference between a motion sensor (this sensor) and an occupancy sensor.
The only parameter I found is for controlling the time the 'on' status last after a motion is detected.
This can be set in Domoticz in the 'off delay' field (per device) or in the zigate gui with parameter 'Delay in sec to reset motion detection' (global for all motion sensors).
After this timer expires the sensor reports an Off state. The Off state stays until there is no more motion detected. If so, a 2nd Off state is reported 50-60s after the first one.
Further On state will only be reported after the 2nd Off state. Kind of strange behaviour but all my researches on internet tell the same story.
So bottom line the motion sensor works with one-minute intervals at best.

Re: For those using the Lidl motion sensor(SOLVED)

Posted: Tuesday 13 September 2022 7:50
by julienb
Ok, so it seems that « ON » can be used to trigger events, but obviously « OFF » is not a reliable event. Thanks for the confirmation.

Re: For those using the Lidl motion sensor(SOLVED)

Posted: Wednesday 14 September 2022 15:25
by jake
julienb wrote: Sunday 11 September 2022 17:19 Ok, so i got it working by just cherry picking the two relevant commits from beta branch. Detected and working fine.

One more question: I'm trying to use it as an automatic light (presence -> light on, no presence -> light off). The problem is that even if i stay in the room, i get an "off" event after around 30 seconds, and then another one about 30 seconds later. And during that period, no movement can wake the light on again (it does not trigger the red light of the detector). So that makes it quite unusable as an automatic light detection.

How do you configure them so that you don't have this issue ?
I have a virutal motion sensor added that I can keep 'on' for a much longer time. The advantage is that the actual motion sensor can be set to a short reaction time, which makes it useful for other purposes than just keeping the light on. This is the dzvents script that I used to control that 2nd, virtual sensor:

Code: Select all

return {
	active = true,
		on = {
			devices = {'Woonkamer Motion'}
			},

	execute = function(domoticz, device)
	local motionWoonkamerDetected = domoticz.devices('Motion_Woonkamer_detected')
	
		if device.state == 'On' then
			if motionWoonkamerDetected.state == 'On' then
				motionWoonkamerDetected.cancelQueuedCommands()
			else
				motionWoonkamerDetected.switchOn()
			end
			domoticz.log ('Motioned detected switch is switched ON by woonkamer motion')
		elseif device.state == 'Off' then
			motionWoonkamerDetected.switchOn().checkFirst().forMin(30)
			motionWoonkamerDetected.switchOff().checkFirst().afterMin(30)
		end
    end
}