May 13, 201313 yr What is the best way to code this situation? When I’m away and a switch is turned on or off to send me a notification. I’m hoping I don’t have to program each switch individually. I’m sure there is a better and easier way of doing this
May 13, 201313 yr you just list them all with an or between them. One program, all the switches listed. if control switch_1 is switched on or control switch_1 is switched off or control switch_2 is switched on or control switch_3 is switched off etc etc
May 15, 201313 yr Author here is my code but its now working the way i wanted it to If $OCCUPIED is 0 or Status 'Motion Sensors / Laundry Motion Sensors-Sensor' is On or Control 'Backyard1' is switched On or Control 'Backyard1' is switched Off or Control 'Backyard2' is switched On or Control 'Backyard2' is switched Off or Control 'Front Door' is switched On or Control 'Front Door' is switched Off or Control 'Master Bath Room' is switched On or Control 'Master Bath Room' is switched Off Then Send Notification to 'TXT MSG All' content 'home is OCCUPIED ' Else - No Actions - (To add one, press 'Action') The problem is i get msg when i'm at home. i was hoping to get msg when im alway not all the time
May 15, 201313 yr This is only a guess since the content of the variable is not described. If $OCCUPIED is 0 And ( or Status 'Motion Sensors / Laundry Motion Sensors-Sensor' is On or Control 'Backyard1' is switched On or Control 'Backyard1' is switched Off or Control 'Backyard2' is switched On or Control 'Backyard2' is switched Off or Control 'Front Door' is switched On or Control 'Front Door' is switched Off or Control 'Master Bath Room' is switched On or Control 'Master Bath Room' is switched Off ) Then Send Notification to 'TXT MSG All' content 'home is OCCUPIED '
May 16, 201313 yr Like LeeG, I am also unsure how your variable is controlled. Is it an integer or state variable? How does it change value? You say I believe you are on the right track, however.
May 16, 201313 yr Author thank you LeeG that worked The state variable is updated by my router. im running this proximity script http://forum.universal-devices.com/viewtopic.php?f=51&t=9854&hilit=proximity