Page 1 of 1

Siemens PIRs not working with Lua script

Posted: Thursday 05 November 2015 12:13
by Jaspernet
Hi All,

I have two Siemens PIRs. The ones that use the Byron protocol.

I have done a fair bit of reading up and I am aware that they never send a "not detected" etc.

Preferring to stick to LUA as block sometimes fails, I have followed this https://www.domoticz.com/wiki/Smart_Lua_Scripts.

The files are names as stated in the above wiki and are in the LUA folder and I have checked that scripts etc are not disabled.

My PIR is setup using a dummy called "PIRConservatory" and my light is a LightwafRF learned switch called "Conservatory" However,I cannot get them to work for the life of me. I have found several mentions of these PIRS and a post regarding the LUA but still no good.
I am a former Network Manager and am now an Interface deisgner for IT systems so I have a small amount of technical know how. I can only assume i am doing something so ridiculously wrong I cant see it.

Please can someone tell me how I am being so thick and how to rectify it (no killl yourself comments please ;)

Apologies for starting a new post but the old ones were not helping and I didn't get a reply (perhaps its too much of an old topic)

Many thanks in anticipation,

Shaun

Re: Siemens PIRs not working with Lua script

Posted: Friday 06 November 2015 17:37
by Jaspernet
Anyone?

Re: Siemens PIRs not working with Lua script

Posted: Friday 06 November 2015 23:54
by markk
Not sure the Dummy is named correctly. I have light called "Hallwaylight"' PIR called "PIRsr3Hallwaylight, dummy called "Dummy-Hallwaylight". When the PIR is triggered and the dummy is on the Hallway light will come on and go off 3 minutes after the PIR was last triggered.

Re: Siemens PIRs not working with Lua script

Posted: Sunday 08 November 2015 19:27
by Jaspernet
Hi markk,

Thank you so much. I haven't tried yet but appreciate the response. I will report back if I have success.

Thanks again,

Shaun

Re: Siemens PIRs not working with Lua script

Posted: Sunday 08 November 2015 22:51
by Jaspernet
Hi again all (especially markk if you're about!),

Big thanks for moving me forward with this and sorry to ask for your knowledge again.

The light now turns off (sometimes! I think I need to wave in front of the PIR when i turn it on using the remote for the script to work?) but I cant get it to turn on using the script.

My exact details are now:

Dummy = Dummy-Conservatory (No virtual sensors set - tried also with "switch")
PIR = PIRsr3Conservatory. (Tried motion sensor and on/off)
Lamp = (Trained with LightwaveRF remote) named "Conservatory"

The Scripts I have are from the Wiki - https://www.domoticz.com/wiki/Smart_Lua_Scripts (I am using the bottom of the two Dummy Examples about a third down the page for the "script_device_pirs") and the time script is from the same page - (second script example right at the top) and the only on I saw for turning lights off.

Again, really sorry I am asking for help again but this is driving me nuts! Everyone else seems to have it working from what I can see but I am falling behind the rest of the class?

Anything from the above you can see I am doing wrong? - is there any chance you could post your scripts that work for you?

Re: Siemens PIRs not working with Lua script

Posted: Sunday 08 November 2015 22:53
by Jaspernet
Sorry - should have put in the last message. Might it be that the dummy isn't on? I haven't changed any setting for the dummy.

Thanks a million,

Shaun

Re: Siemens PIRs not working with Lua script

Posted: Monday 09 November 2015 18:43
by simonrg
Jaspernet wrote:My exact details are now:
Dummy = Dummy-Conservatory (No virtual sensors set - tried also with "switch")
PIR = PIRsr3Conservatory. (Tried motion sensor and on/off)
Lamp = (Trained with LightwaveRF remote) named "Conservatory"
I guess my first question is does the script from the wiki work for a setting where you don't need any Dummy - i.e. change your PIR to PIRar3Conservatory.

All the dummy switch does is allow you to effectively activate or deactivate the PIR - so if the Dummy-Conservatory is "On" then the PIR will turn the light on, if Dummary-Conservatory is "Off" then the PIR will do nothing.

For your specifics, then your Siemen's PIR should be recognised by Domoticz as PIRsr3Conservatory, your light called Conservatory has been recognised by Domoticz from being programmed from your LightwaveRF remote. If Dummy-Conservatory is "On" then waving in front of the PIR will turn on Conservatory, if Dummy-Conservatory is "Off" then waving in front of the PIR will have no effect on Conservatory.

Pressing the remote directly will just turn the light on and off as normal, but if you then walk in front of the PIR, then after 3 minutes after last PIR activation the light will go out despite switch on having been done via the remote.

Re: Siemens PIRs not working with Lua script

Posted: Wednesday 11 November 2015 20:16
by Jaspernet
Thank you Simon,

I am not able to test at the moment as I am away on business but will try when I get back.

Your help is appreciated.

Kind regards,

Shaun