more G-Labs products

Author Topic: How do I run a program within a program using Wizard?  (Read 1348 times)

November 28, 2015, 10:53:49 PM
Read 1348 times

Acorlin

  • **
  • Information
  • Jr. Member
  • Posts: 44
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
« Last Edit: November 28, 2015, 11:00:32 PM by Acorlin »

November 29, 2015, 12:38:44 AM
Reply #1

jshan

  • ***
  • Information
  • Full Member
  • Posts: 71
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.

November 29, 2015, 12:49:12 AM
Reply #2

Acorlin

  • **
  • Information
  • Jr. Member
  • Posts: 44
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

November 29, 2015, 09:02:58 AM
Reply #3

Jens

  • *****
  • Information
  • Global Moderator
  • Posts: 211
Hi Jshan,


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

Cheers
Jens

November 29, 2015, 09:27:22 PM
Reply #4

Acorlin

  • **
  • Information
  • Jr. Member
  • Posts: 44
Jens--
Thank you very much. It worked great!
Alan

December 01, 2015, 04:26:14 PM
Reply #5

jshan

  • ***
  • Information
  • Full Member
  • Posts: 71