HomeGenie Forum

General Category => Troubleshooting and Support => Topic started by: Acorlin on November 28, 2015, 10:53:49 PM

Title: How do I run a program within a program using Wizard?
Post by: Acorlin on November 28, 2015, 10:53:49 PM
I have two programs that on their own run fine. I put one of them within the other using Wizard and the second one ( to send an email) never runs.
I have looked through the forum and must have missed if a previous person had a similar question about this.

The second program that works on its own but not within the first program is the test email program I picked off the forum by jshan "1016-Send_Test_E-Mail.hgx. "The first program turns on a desk switch when the garage door sensor is tripped and turns it off 10 seconds later.
The Wizard Program editor page looks like this--

#0001 HomeAutomation.Zwave/2                                 Desk switch               Control.On  1
#0002 HomeAutomation.lHomeGenie.Automation/1002  Send Test E-Mail        Control.On  1
#0003 HomeAutomation.HomeGenie?Automation                                           Program Pause  10
#0004 HomeAutomation.ZWave/2                                Desk switch                Control.Off  0

The program turns the desk light on and off as it should it does not send the email. When used on its own the email program works all the time. I have moved line #0002 as above to line #0004 with the same results
Any assistance to point me in the correct direction I would really appreciate.
Thanks,
Alan
Title: Re: How do I run a program within a program using Wizard?
Post by: jshan on November 29, 2015, 12:38:44 AM
I believe the issue is that the send test email program is not looking for a Control.On.  I had a similar issue with another program (to reboot my raspberry) that I could not get to run from the wizard - I posted the question but did not get a response.  So I re-wrote the reboot program (see attached) to respond to the Control.On - basically I just wrapped the program code in a WebServiceCallReceived procedure, checking for Control.On.  You could edit the trigger and program sections of the send test email program to include this feature.  Hopefully, someone else will respond with a better solution.
Title: Re: How do I run a program within a program using Wizard?
Post by: Acorlin on November 29, 2015, 12:49:12 AM
Thank you for the reply. The programing is a little over my head at this point. However I am trying to catch up as quickly as I can.

I am not sure I know what to do with the code you made available to me.

Your "test email" program saved me a lot of time and I thank you for that.
Alan
Title: Re: How do I run a program within a program using Wizard?
Post by: Jens on November 29, 2015, 09:02:58 AM
Hi Jshan,


you could use program run followed by the program ID inside a wizard script.

Cheers
Jens
Title: Re: How do I run a program within a program using Wizard?
Post by: Acorlin on November 29, 2015, 09:27:22 PM
Jens--
Thank you very much. It worked great!
Alan
Title: Re: How do I run a program within a program using Wizard?
Post by: jshan on December 01, 2015, 04:26:14 PM
Thank you Jens!