HomeGenie Forum

Automation Program Plugins and Wizard Scripting => Help => Topic started by: mrrrl2 on January 07, 2015, 01:14:34 AM

Title: Passing Variable from Trigger code to Program code
Post by: mrrrl2 on January 07, 2015, 01:14:34 AM
Is this possible? I want to trigger off of multiple lights turning on (different times), then pass the module (Light) name to the program code which will email with the correct name of the light that just turned on. This way I have only one program for all lights rather then one light, one program.

Can I use a case statement and pass the name via a variable or am I barking up the wrong tree in complexity and should just do a separate program for each light? Talking about 5-10 lights.

On another note, it took me several hours to get gmail to work, but ended up having to allow "Access for less secure apps" on the gmail account. I am still using SSL and port 587 but it now works.
Title: Re: Passing Variable from Trigger code to Program code
Post by: mvdarend on January 07, 2015, 07:25:33 AM
One option is to use the PushingBox App for this. Configure -> Automation -> Messaging and Social.

You could easily modify the PushingBox App to send emails instead of using the push service.

Here is an example (http://www.homegenie.it/forum/index.php?topic=603.0) of a modified PushingBox App to use another service, Pushalot. And this one uses Pushover (http://www.homegenie.it/forum/index.php?topic=442.0).
Title: Re: Passing Variable from Trigger code to Program code
Post by: Gene on January 07, 2015, 08:04:24 AM
Another option could be the Messaging And Social->Alcatel One Touch app that uses checkbox instead of input box.
You can find some bit of documentation about "features" here:
http://www.homegenie.it/docs/automation_advanced.php (http://www.homegenie.it/docs/automation_advanced.php)

g.
Title: Re: Passing Variable from Trigger code to Program code
Post by: mvdarend on January 07, 2015, 07:12:40 PM
Another option could be the Messaging And Social->Alcatel One Touch app that uses checkbox instead of input box.
You can find some bit of documentation about "features" here:
[url]http://www.homegenie.it/docs/automation_advanced.php[/url] ([url]http://www.homegenie.it/docs/automation_advanced.php[/url])

I didn't realize that. I've now changed the PushingBox code, much better. :)