Siemens PIRs not working with Lua script

Moderator: leecollings

Post Reply
Jaspernet
Posts: 7
Joined: Sunday 05 January 2014 17:00
Target OS: Windows
Domoticz version:
Location: UK and Republic of Ireland
Contact:

Siemens PIRs not working with Lua script

Post 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
Last edited by ThinkPad on Thursday 05 November 2015 13:58, edited 1 time in total.
Reason: Made topictitle a bit more clear, moved to 'Scripts' subforum
Like attracts like - stay positive.
Jaspernet
Posts: 7
Joined: Sunday 05 January 2014 17:00
Target OS: Windows
Domoticz version:
Location: UK and Republic of Ireland
Contact:

Re: Siemens PIRs not working with Lua script

Post by Jaspernet »

Anyone?
Like attracts like - stay positive.
markk
Posts: 267
Joined: Tuesday 14 January 2014 14:50
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Siemens PIRs not working with Lua script

Post 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.
Running Domoticz on Pi3 with RFXtrx433e. LWRF power sockets and dimmer switches. Integrated my existing wirefree alarm PIRs and door contacts with domoticz. Geofencing with Pilot. Harmony Hub. Tado for Heating. Now playing with mysensors.
Jaspernet
Posts: 7
Joined: Sunday 05 January 2014 17:00
Target OS: Windows
Domoticz version:
Location: UK and Republic of Ireland
Contact:

Re: Siemens PIRs not working with Lua script

Post 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
Like attracts like - stay positive.
Jaspernet
Posts: 7
Joined: Sunday 05 January 2014 17:00
Target OS: Windows
Domoticz version:
Location: UK and Republic of Ireland
Contact:

Re: Siemens PIRs not working with Lua script

Post 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?
Like attracts like - stay positive.
Jaspernet
Posts: 7
Joined: Sunday 05 January 2014 17:00
Target OS: Windows
Domoticz version:
Location: UK and Republic of Ireland
Contact:

Re: Siemens PIRs not working with Lua script

Post 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
Like attracts like - stay positive.
simonrg
Posts: 329
Joined: Tuesday 16 July 2013 22:54
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8807
Location: North East England
Contact:

Re: Siemens PIRs not working with Lua script

Post 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.
Raspberry Pi 2 B - 2A@5V PSU - Raspbian + Domoticz + RFXtrx(89), LightwaveRF House(dimmers, sockets, wireless/mood switches), Owl CM113, 4 LaCross Temp / Humidity Sensors, 4 Siemens PIR, Smappee, Solaredge, ESP8266
Jaspernet
Posts: 7
Joined: Sunday 05 January 2014 17:00
Target OS: Windows
Domoticz version:
Location: UK and Republic of Ireland
Contact:

Re: Siemens PIRs not working with Lua script

Post 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
Like attracts like - stay positive.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests