Page 1 of 1

how to change the status of a sensor ?

Posted: Monday 16 May 2016 18:53
by jmleglise
Hi,

I have a magnetic door sensor PT2262 (RFXCOM - lighting 4) that only send On.

I would like to change its status with a LUA script. How to do that in LUA ? (I don't want to use the Off delay option of the interface.)

I have tried : commandArray['MailBox']='Off' and 'Closed' without success.



My use case is : My Mailbox switches On when receiving mails and returns Off at midnight.

Re: how to change the status of a sensor ?

Posted: Monday 16 May 2016 20:45
by commodore white
Hi. Quite a few sensors exhibit that behaviour. Best use the door sensor to change the state of dummy device and base your logic the the dummy device. Change the dummy device state as your heart desires.

What has ..
My use case is : My Mailbox switches On when receiving mails and returns Off at midnight.
... got to do with anything?

Re: how to change the status of a sensor ?

Posted: Monday 16 May 2016 21:26
by jmleglise
I use this door sensor to detect the delivery of regular mail. And I want it to stay on, all the day until I reset it at the end of the day.