Hi folks,
I need some coding help please. I’m trying to send a message that states whether the garage door is up or down when motion is detected by the tilt sensor.
This is as far as I have got. Can anyone help me out getting the ArmedTripped variable value into the message (ideally as up/down rather than 0 or 1)
if (GTripped == “1” ) then
luup.call_action(“urn:richardgreen:serviceId:VeraAlert1”, “SendAlert”, {Message = “Garage door is Up at {DateTime(CurrentTime,%A %B %d, %Y at %H:%M)}”, Recipients = “me”}, 16)
else
luup.call_action(“urn:richardgreen:serviceId:VeraAlert1”, “SendAlert”, {Message = “Garage door is Down at {DateTime(CurrentTime,%A %B %d, %Y at %H:%M)}”, Recipients = “me”}, 16)
if (GTripped == “1” ) then
luup.call_action(“urn:richardgreen:serviceId:VeraAlert1”, “SendAlert”, {Message = “Garage door is Up at {DateTime(CurrentTime,%A %B %d, %Y at %H:%M)}”, Recipients = “me”}, 16)
else
luup.call_action(“urn:richardgreen:serviceId:VeraAlert1”, “SendAlert”, {Message = “Garage door is Down at {DateTime(CurrentTime,%A %B %d, %Y at %H:%M)}”, Recipients = “me”}, 16)
end[/code]