Page 1 of 1

siemens byron pir

Posted: Tuesday 02 February 2016 12:00
by amz4u2nv
Hi Guys,
I've just bought some siemens PIR sensors and am trying to get them to work with my lights -
I am using the scripts on the wiki - https://www.domoticz.com/wiki/Smart_Lua_Scripts

I've noticed that the motion sensor status is always on, there is no where in the script that turns it off.
So when the script has the following -
tc=next(devicechanged)

If the status for the pir doesn't change - then it doesn't get through the code, because there's nothing in the script to change it from on to off.
Please help, can't seem to get it to work.
PIR is being picked up and sends a on status, but the script doesn't seem to be running.

Thanks

Re: siemens byron pir

Posted: Tuesday 02 February 2016 13:06
by Westcott
Yes, I have similar ones.
Although the status doesn't change, the ON event fires when it is triggered -

if (devicechanged['Porch motion'] == 'On') then

I use this explicit test to set a virtual/dummy switch that switches itself off after a few seconds.

Re: siemens byron pir

Posted: Tuesday 02 February 2016 17:41
by simonrg
Check that you have the naming of all the devices exactly as set out in the wiki (spelling, capitalisation etc.). If that doesn't help then try some print statements to see where it is getting stuck.

Re: siemens byron pir

Posted: Wednesday 03 February 2016 7:52
by NietGiftig
The off status is accomplished by another script in the same wiki smart lua scripts.
You need 2 scripts, a device and a time script.
Device for on, time for off