Jump to content

alway and notifications


rana

Recommended Posts

Posted

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

Posted

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

Posted

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

Posted

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 '

Posted

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.

Guest
This topic is now closed to further replies.

×
×
  • Create New...