Please login or register.

Login with username, password and session length
Pages: [1] 2

Author Topic: Help with macro script  (Read 4116 times)

edjal

  • Sr. Member
  • ****
  • Helpful Post Rating: 0
  • Posts: 115
Help with macro script
« on: May 19, 2019, 02:42:44 PM »

  I am switching from AHP to Home Genie and I am trying to duplicate a couple of AHP macros. I am a complete newbie to HG and I have no experience with programmers languages so I am trying to setup macros using HG macro program wizard scripts.
  I have setup a schedule in HG to turn on Ext pole lamp x10A4@ 8:30am and off at 11pm. Note the lamp has light sensor so is not actually on but 125v socket is on so that I have power outdoors during these hours scheduled

The macros I would like to develop would go like this: (Macro Driveway Alert):  from 8:30 am till 10:55pm if motion sensor X10 B2 senses motion activate x10 B1 chime.

Next: (Ext Pole Light Macro): from the hours between 11pm and 8:25am if motion sensor X10 B2 senses motion turn on Ext pole light X10A4 delay 5 minutes then X10 A4 Off

please note the chime B1 would not activate during the active Ext Pole Light Macro.

 Is there someone on this site that would be willing to help me develop these HG Macros? I would greatly appreciate it
Logged

bkenobi

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 24
  • Posts: 2080
Re: Help with macro script
« Reply #1 on: May 20, 2019, 01:55:51 AM »

I'd recommend looking at the smart lights app.

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 282
  • Posts: 10493
  • I don't work for X10, I use it successfuly!
Re: Help with macro script
« Reply #2 on: May 20, 2019, 07:50:21 AM »

I'd recommend looking at the smart lights app.
I was going to recommend looking at your advanced smart lights addon bkenobi over the smart lights as it is a little easier for a newbie to figure out.

The chime macro can be created with a wizard script using the capture  in the trigger click capture and press B2 on a palm pad to capture the raw RF (20 70 8F 10 EF ) and then set before 8:30 and after 22:55 times.



Logged
Please Read Topic:
General Forum Etiquette
Before you post!

bkenobi

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 24
  • Posts: 2080
Re: Help with macro script
« Reply #3 on: May 20, 2019, 12:12:04 PM »

Either would work.  Since OP is just doing simple "turn light on with motion, off after delay", the basic version included with HG would work.  Using mine would work too in the same way and would allow for more flexibility should more be wanted down the road.

edjal

  • Sr. Member
  • ****
  • Helpful Post Rating: 0
  • Posts: 115
Re: Help with macro script
« Reply #4 on: May 21, 2019, 12:16:16 AM »

 Thank you both for your input. My mini SDs will be here Friday hopefully then I can figure  out HG. Right now I cant even seem to set my widgets on the dashboard to link up I have a driveway sensor widget that I want to control driveway alert but driveway alert does not respond no matter how I configure. Im assuming I have ti Have RPi and mini SDs setup before program will operate on the Dashboard
Logged

bkenobi

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 24
  • Posts: 2080
Re: Help with macro script
« Reply #5 on: May 21, 2019, 11:55:50 AM »

HG will work 100% on any system that can run Mono (with a compatible version).  I ran HG on a laptop for testing before I had my RPi and it worked very well.  If you can't get things working on the Windows machine (I'm assuming that's what it is), you will not likely have better luck on the RPi since it's setup is identical.  Waiting for the final hardware is ok, but you will have to fix the setup at some point.

edjal

  • Sr. Member
  • ****
  • Helpful Post Rating: 0
  • Posts: 115
Re: Help with macro script
« Reply #6 on: May 21, 2019, 12:36:32 PM »

 Thank you so much for your Reply I have been tinkering with HG for about 2 weeks now on my win 10 pc  I feel like I'm shoveling sand against the tide. If you would give me an example on how to link 2 modules I created in a x10 group 1. Driveway Sensor X10 B2 2. Driveway alert X10 B1. How do I program Driveway Alert to respond to Driveway Sensor on the dashboard. Your help would be so much appreciated
Logged

bkenobi

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 24
  • Posts: 2080
Re: Help with macro script
« Reply #7 on: May 21, 2019, 05:30:50 PM »

I generally use C# code for anything more than a list of module actuations. It sounds like you want something simple like "turn A1 on if A2 turns on" and then "turn A1 off when A2 turns off".  You could use a wizard script.  You could also just use the advanced smart lights code to do this though it's more robust than you really need.

edjal

  • Sr. Member
  • ****
  • Helpful Post Rating: 0
  • Posts: 115
Re: Help with macro script
« Reply #8 on: May 21, 2019, 05:47:41 PM »

 The problem I'm having is I apparently don't know how to develop the script properly as they wont work for me for some reason That's why Im hoping for an example to follow.   I want Module "Driveway Motion Sensor X10 B2" to Turn On "Driveway Alert X10 B1 when motion sensed from b2 This would be so helpful to me To have an example to follow.
Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 282
  • Posts: 10493
  • I don't work for X10, I use it successfuly!
Re: Help with macro script
« Reply #9 on: May 21, 2019, 06:35:45 PM »

@edjalyou stated your moving from AHP to HG, is AHP installed? Since these two programs use different drivers conflicts will develop which may prevent things from working correctly.
Also which X10 interface are you using?
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

edjal

  • Sr. Member
  • ****
  • Helpful Post Rating: 0
  • Posts: 115
Re: Help with macro script
« Reply #10 on: May 21, 2019, 06:54:34 PM »

AHP is installed and running on a different computer "My Laptop".   The interface is a CM15a. I have not yet downloaded the RPi image.  I have installed HG on "My Desktop"
Logged

Brian H

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 305
  • Posts: 13256
Re: Help with macro script
« Reply #11 on: May 22, 2019, 06:03:14 AM »

Is the CM15A the same one you where using for AHP?

When I was using the PiX10Hub one of the tips with a CM15A. Was clear its memory and set all the Transceived House Codes to None. I found HG set the used House Codes it was using.
Logged

edjal

  • Sr. Member
  • ****
  • Helpful Post Rating: 0
  • Posts: 115
Re: Help with macro script
« Reply #12 on: May 22, 2019, 10:19:05 AM »

 Thank you for your reply.  The Cm15 running AHP is the only one I have and it is presently using AHP software setup on my laptop. I am trying to figure out how to configure HG software on my desktop. My desktop does not have AHP on it. At this point the RPi is not in service yet. Once I figure out how to configure HG software I will clear memory on CM15 and link it to the RPi. An example of mine I added a module X10 A2 named it Furnace went into scheduler and setup a schedule on at given dates 8am off at 9am. when I watch the furnace icon on the Dashboard at time an event is supposed to happen the icon does not indicate it has responded to either the on or the off command from the schedule.  Another module I setup I named it Pole Light same problem does not respond to schedule, But if I click the on indicator of the icon to on it remains lit for a few seconds and then switches to off. When this happens a message in upper R corner of dashboard flashes colored lights then turns off pole light. I have no idea what is controlling pole light or how to change it. So I guess I really need some basic help with HG software.  Any help would be appreciated.  Thank you
Logged

edjal

  • Sr. Member
  • ****
  • Helpful Post Rating: 0
  • Posts: 115
Re: Help with macro script
« Reply #13 on: May 22, 2019, 10:33:55 AM »

 I have to to make a correction to my last post The pole light I mentioned the module is X10 A4 and when I turn it on manually after a few seconds in the upper r corner of the dashboard it flashes "smart lightsA4 Pole Light switched off"  then flashes "Dashboard pole light level 0.00"   I have no Idea what is controlling it.   Once the pole light is off it remains that way and does not switch itself to on.
Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 282
  • Posts: 10493
  • I don't work for X10, I use it successfuly!
Re: Help with macro script
« Reply #14 on: May 22, 2019, 10:41:25 AM »

Since you have a schedule for the pole light setup in HG it is likely that is what is switching it.
Using HG in virtual mode (with no Cm15 interface connected) may also be what is causing weird results.
Logged
Please Read Topic:
General Forum Etiquette
Before you post!
Pages: [1] 2
 

X10.com | About X10 | X10 Security Systems | Cameras| Package Deals
© Copyright 2014-2016 X10.com All rights reserved.