[quote=“shallowearth, post:14, topic:194524”]Sorry Quixote, way more info needed. What are you trying to do exactly? you shouldn’t have to use any LUA code for disarm, stay, or away, but If you want LUA code debugged you should post it.
Also what security system are you using?[/quote]
Yes, of course. Sorry for my vagueness.
I’m using an Elk M1, and I want to have announcements on my mobile phone using email messages sent to me which are then transformed into texts and read aloud by my phone using an Android app called eNotify.
I can manage most of that, but the problem is triggering those messages based on alarm system events.
Here is one scenario:
I walk to my front door and disarm the system from “Stay Instant”, open the door and exit, arming the system using a system I have outside my front door. I receive an alert telling me that the system is “Armed Away”. I will receive a text if the front door is opened while the system is armed in any state. Returning home I disarm the system (receive a text), enter and set the system to “Armed Stay Instant”. In this case, the system differentiates between the two armed states and sends no text indicating that the system has been armed.
So far I’ve been trying to use the built-in triggers presented with scene creation (eg. - “Partition 1: Area 1 is Armed”), Sending “Smtp Notification Custom action” with the plugin as an action and some snippets of Lua like this entered into the Lua code section of the 3rd step of scene creation:
local allow = true
local status = luup.variable_get(“urn:micasaverde-com:serviceId:AlarmPartition2”,“DetailedArmMode”,6)
return ((status == “Ready”) == allow)
I’m using the states “Ready”, “Armed”, and “StayInstant”.
I hope that’s more clear. Please let me know if I’ve left anything out.