Problem with Nexa LMDT-609 motion sensor

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
Docc
Posts: 22
Joined: Saturday 02 May 2015 8:38
Target OS: Raspberry Pi / ODroid
Domoticz version: 2.3530
Location: Sweden
Contact:

Problem with Nexa LMDT-609 motion sensor

Post by Docc »

I have an Rfx and a Pi2 and are trying to get this sensor to work but it wont re-trigger an on event.
When i hock up the rfx to rfxmng I can see the sensor sending On events every time it detects movement but when using it in Domoticz I only get one.
I am using the example scripts "Motion detector 30 minute time-out (presence detection)" found hear:
https://www.domoticz.com/wiki/Event_script_examples

Any suggestions as to what I might be doing wrong or any known issues with this sensor?
DaaNMaGeDDoN
Posts: 55
Joined: Thursday 23 October 2014 19:01
Target OS: Linux
Domoticz version: beta
Location: Eindhoven, the Netherlands
Contact:

Re: Problem with Nexa LMDT-609 motion sensor

Post by DaaNMaGeDDoN »

Sorry i cannot help: what do you mean exactly when you say "you only get one" in domoticz?
Maybe this is the same thing: viewtopic.php?f=6&t=3601 ?
Docc
Posts: 22
Joined: Saturday 02 May 2015 8:38
Target OS: Raspberry Pi / ODroid
Domoticz version: 2.3530
Location: Sweden
Contact:

Re: Problem with Nexa LMDT-609 motion sensor

Post by Docc »

When movement is detected, this script is triggered:

Code: Select all

-- script_device_Movement-DownstBathroom.lua
local motion_detector = 'Movement-DownstBathroom'
local status_switch = 'Badrum-Nere-Spottar'
 
commandArray = {}

logging = true
 d = otherdevices
 device = ""
 for i, v in pairs(devicechanged) do
   if (#device == 0 or #i < #device) then device = i end
 end
 if (logging) then print("Triggered by " .. device .. " now " .. d[device]) end
 
if devicechanged[motion_detector] then

	print('Movement-DownstBathroom = ' .. otherdevices[motion_detector])

	if otherdevices[motion_detector] == 'On' then
		commandArray[status_switch]='Set Level 100'
		commandArray['Variable:nomotionCounter'] = '0'
		print('Lights on and resetting nomotionCounter')
 	end
end

return commandArray
That works fine for turning on the lamp paired with "status_switch"

I also have this timer script:

Code: Select all

-- script_time_DownBath.lua
 
local motion_detector = 'Movement-DownstBathroom'
local nomotion_uservar = 'nomotionCounter'
local status_switch = 'Badrum-Nere-Spottar'
 
commandArray = {}
 
no_motion_minutes = tonumber(uservariables[nomotion_uservar])
 
print('motion_detector = ' .. otherdevices[motion_detector])
print('status_switch = ' .. otherdevices[status_switch])
 
if ((otherdevices[status_switch] == 'On' or otherdevices[status_switch] == 'Set Level') and otherdevices[motion_detector] == 'Off') then
	no_motion_minutes = no_motion_minutes + 1
else 
	no_motion_minutes = 0	
end 

if (otherdevices[motion_detector] == 'On') then
	no_motion_minutes = 0	
end
 
if no_motion_minutes > 4 then 
 	commandArray[status_switch]='Off'
	no_motion_minutes = 0	
end

commandArray['Variable:' .. nomotion_uservar] = tostring(no_motion_minutes)
print('Variable:' .. nomotion_uservar .. ' = ' .. tostring(no_motion_minutes))
 
return commandArray
This starts counting and turns off the light paired with "status_switch" after 5 min.
But, during the time it is lit, I don't get any events from the motion detector so it will never reset the counter variable :-(
DaaNMaGeDDoN
Posts: 55
Joined: Thursday 23 October 2014 19:01
Target OS: Linux
Domoticz version: beta
Location: Eindhoven, the Netherlands
Contact:

Re: Problem with Nexa LMDT-609 motion sensor

Post by DaaNMaGeDDoN »

Thanks for sharing the scripts, that clarifies a bit.
Do you see statements in the log for other devices, like "LUA: Triggered by <somedevice>" and not the "Movement-DownstBathroom"?
When you goto setup->devices choose 'all devices', filter for 'Movement-DownstBathroom' does that device actually exist? (sorry have to ask).
And if it does, do you see the last seen timestamp change (refresh by clicking 'all devices') when you trigger the pir?
Does it show when you filter for used devices?

Could it perhaps be a perception issue?
I can image you run rfxmgr on your windows pc and have the pir nearby for testing.
Then you put the trxrfx back on the Pi that is somewhere else i can imagine.

Let's concentrate on the device being seen by the rfx and domoticz registering that.
Docc
Posts: 22
Joined: Saturday 02 May 2015 8:38
Target OS: Raspberry Pi / ODroid
Domoticz version: 2.3530
Location: Sweden
Contact:

Re: Problem with Nexa LMDT-609 motion sensor

Post by Docc »

DaaNMaGeDDoN wrote:Thanks for sharing the scripts, that clarifies a bit.
Do you see statements in the log for other devices, like "LUA: Triggered by <somedevice>" and not the "Movement-DownstBathroom"?
Yes, I see the Log event for the movement when first turning on the light, but during the time it is counting down there are no new events coming in from the sensor.
I have the settings on the sensor for "Auto off time" set to 5 sec and I get the off event, but after that, no more on events
DaaNMaGeDDoN wrote:When you goto setup->devices choose 'all devices', filter for 'Movement-DownstBathroom' does that device actually exist? (sorry have to ask).
And if it does, do you see the last seen timestamp change (refresh by clicking 'all devices') when you trigger the pir?
Does it show when you filter for used devices?
Yes, the device is in there :-) and the time stamp is the first On, or the auto Off event.
No movement events in the log between the Auto-Off and the timeout :-(
Only the time script counting...
DaaNMaGeDDoN wrote:Could it perhaps be a perception issue?
At this point, I'm ready to believe anything ;-)
DaaNMaGeDDoN wrote:I can image you run rfxmgr on your windows pc and have the pir nearby for testing.
Then you put the trxrfx back on the Pi that is somewhere else i can imagine.
No, the PIR is stuck to the wall in the bathroom
Yes, I run rfxmng on my win7 PC, 5 meters from the PIR.
When it's connected to the Pi, it's only 3m from the PIR

I have the PIR setup as a motion sensor in Domoticz but have also tried changing it to a Switch, makes no difference :-(
DaaNMaGeDDoN
Posts: 55
Joined: Thursday 23 October 2014 19:01
Target OS: Linux
Domoticz version: beta
Location: Eindhoven, the Netherlands
Contact:

Re: Problem with Nexa LMDT-609 motion sensor

Post by DaaNMaGeDDoN »

It looks like you know what you are doing!
So it seems it picks up on the first " on" and "off" signal, but there are no new on/off signals being picked up by domoticz, but in rfxmgr you DO see those new signals....thats very strange indeed!
There are no on or off delays set on the device within domoticz? No slave/master settings on the device?

Now i come to think of it I had similar issues with ARC type pirs, i have about 4 in use at the moment. but the behavior was also visible in the rfxmgr, with you thats not the case....
The behavior was the similar: after a while if a pir would send an "On" signal and then wouldnt change to off or on a new trigger. I remember i had to play with the settings on the pirs themselves before they would work correctly, taking out a battery in between changes and eventually set it back to the settings i need and then it would work again for a while.
Maybe update the rfx firmware just to be sure....because that issue seem to have gone for me. Sometimes signals have a sequence counter, i like to think with the new firmware the sequence is ignored.
I am currently on firmware 248
Domoticz is on the previous stable currently (but i will move to the newest beta today): 2.2563

I have one here (spare) that works good, its an ARC type pir. Set to code=yl, learn=set and of course some kind of address code.
Maybe if you remove the device, take out the batteries, set it to another address, check if you have set the code (if possible) then put learn to OFF, put in the batteries again, press the learn button in domoticz, and switch learn to "ON", it works? Of course if you have it stuck in the bathroom wall thats a bit of a hassle but i cant see another way.

On the reception: what is in between is also a big factor, a nearby sensor with a (metal) doorstand in the way and the reception drops dramatically. The signal waves dont seem to bounce walls as good as wifi. Sometimes moving the rfxtrx just a little makes a huge difference....anyway thats just IF the reception is an issue, but that would explain the difference between what you see in the rfxmgr.
As said i have a couple and had that issue, but it doesnt happen for me anymore, check if you are running the same firmware, i put my money there.

Sidenote, sometimes when the rfxmgr is sending out a signal it misses a signal from the pir. So what happens sometimes when i walk out of a room and press a wallswitch that unassigns presence for that room (and domoticz starts sending out the corresponding scene commands) the pir times out on movement in the meantime, sends the off signal and domoticz thinks it is still on forever. I resolved that by some clever scripting that uses the "UpdateDevice" command on moments i a sure the pir should not report any movement...but maybe thats interessting after you fixed this.
Docc
Posts: 22
Joined: Saturday 02 May 2015 8:38
Target OS: Raspberry Pi / ODroid
Domoticz version: 2.3530
Location: Sweden
Contact:

Re: Problem with Nexa LMDT-609 motion sensor

Post by Docc »

Thanks for all your tips DaaNMaGeDDoN!
I updated to firmware 248 and Domoticz 2.3530, no change.
I removed the batteries in the PIR, and changed them to new fresh ones, no change.
I removed the antenna and exchanged it for a 1/4 wave hanging out of the PIR.
After changing the antenna it actually worked if close enough to the rfxcom so I figured it might be a power problem.
Hocked it up to a power supply and set it to 3V, nothing, 3.2, nothing and 3.4V, still no change
So I changed the PIR to a new one and now it seams to work, fingers x-ed...
DaaNMaGeDDoN
Posts: 55
Joined: Thursday 23 October 2014 19:01
Target OS: Linux
Domoticz version: beta
Location: Eindhoven, the Netherlands
Contact:

Re: Problem with Nexa LMDT-609 motion sensor

Post by DaaNMaGeDDoN »

Nice guide for cancelling out the issue this thread has become :)
Hope that was it, happy to be of help.
TAA
Posts: 5
Joined: Sunday 13 April 2014 11:14
Target OS: Windows
Domoticz version: 3.8799
Contact:

Re: Problem with Nexa LMDT-609 motion sensor

Post by TAA »

I've had same kind of issues. The LMDT-609 would not re-trigger no matter what kind of set up I used. It would trigger a switch, then after the set timeout on switch, or stop delay in Domoticz it would turn off the switch. After that it would re-trigger immediately after. I also use the RFXtrx.
Just yesterday I went to Setup - Devices and set the LMDT as unused before removing it altogheter from Domoticz. Then I added it back in to Domoticz again, and after that it has behaved as expected. Very strange, but seems to have worked. I should add that I've upgraded both Domotixz and RFXtrx firmware several times since I added the LMDT-609 for the first time aswell.
Domoticz Beta 3.8799 on Windows10 with RFXtrx433 USB, firmware 94 and Aeotec Z-stick gen 5
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest