Please login or register.

Login with username, password and session length
Advanced search  

News:

The X10Hub (PiX10Hub) is here! Created by the Community, for the Community.:)% #:)

Poll

Do you see a possible use for Flags in HG?

Yes
No
Maybe

Pages: [1] 2 3 ... 5

Author Topic: Fun with Flags  (Read 1878 times)

alzy

  • Hero Member
  • *****
  • Helpful Post Rating: 5
  • Posts: 355
Fun with Flags
« on: December 29, 2018, 01:51:32 PM »

Is there a way to set a "flag" like in AHP and have the flag state be a condition  for a macro execution? B:(
Logged

petera

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 19
  • Posts: 1092
Re: Fun with Flags
« Reply #1 on: December 29, 2018, 07:11:24 PM »

Is there a way to set a "flag" like in AHP and have the flag state be a condition  for a macro execution? B:(

Not being an AHP user are you trying to achieve an "If this then that" scenario. Maybe you could outline exactly what you are trying to do so you could be pointed in the right direction.. Virtual Devices and Events play a large part in the operation of logic in HG.
Logged

alzy

  • Hero Member
  • *****
  • Helpful Post Rating: 5
  • Posts: 355
Re: Fun with Flags
« Reply #2 on: December 29, 2018, 07:33:43 PM »

In AHP you can make a flag being set a condition for a macro to run. For instance AI being triggered may activate a device and also set a flag, say flag 1. Then there could be a macro which say is triggered by D1  but executes only if flag one has been set. A flag can be set by one x10 command and reset by another x10 command of a different address.
Logged

petera

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 19
  • Posts: 1092
Re: Fun with Flags
« Reply #3 on: December 29, 2018, 08:12:31 PM »

In AHP you can make a flag being set a condition for a macro to run. For instance AI being triggered may activate a device and also set a flag, say flag 1. Then there could be a macro which say is triggered by D1  but executes only if flag one has been set. A flag can be set by one x10 command and reset by another x10 command of a different address.

Yes that's all achieved with scripts. They are very powerful but very simple to construct. Just open one of the programs, say the Advanced Smart Lights and have a look at the how it is laid out. Most of the logic you will require is already there.
Logged

alzy

  • Hero Member
  • *****
  • Helpful Post Rating: 5
  • Posts: 355
Re: Fun with Flags
« Reply #4 on: December 30, 2018, 09:19:51 AM »

Looked at that and its all gobbledygook to me. Can u direct me to some detailed help page somewhere? Its so much easier in AHP!

Thanks.
Logged

petera

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 19
  • Posts: 1092
Re: Fun with Flags
« Reply #5 on: December 30, 2018, 12:18:57 PM »

Looked at that and its all gobbledygook to me. Can u direct me to some detailed help page somewhere? Its so much easier in AHP!

Thanks.

If that looked like gobbledygook maybe just stick to the macros and wizard scripts. I've posted a few videos earlier but the macro recorder is quite versatile https://m.youtube.com/watch?v=zwqJ3YeqOTc
Logged

alzy

  • Hero Member
  • *****
  • Helpful Post Rating: 5
  • Posts: 355
Re: Fun with Flags
« Reply #6 on: December 30, 2018, 12:29:27 PM »

Can't need flags. B:(
Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 265
  • Posts: 9469
  • I don't work for X10, I use it successfuly!
    • Tuicemen Software
Re: Fun with Flags
« Reply #7 on: December 30, 2018, 01:07:27 PM »

Can't need flags. B:(
Actually you only think you need flags. AHP was limited to the number of conditions in a smart macro, flags were created to workaround that limitation. I'm not sure if HG has a limit of conditions for a macro as I've yet to hit that wall.
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

Find extra info @ My forum

alzy

  • Hero Member
  • *****
  • Helpful Post Rating: 5
  • Posts: 355
Re: Fun with Flags
« Reply #8 on: December 30, 2018, 01:10:52 PM »

Well i don't know how to code a flag in HG.  And documentation seems sparse on the topic.B:(
Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 265
  • Posts: 9469
  • I don't work for X10, I use it successfuly!
    • Tuicemen Software
Re: Fun with Flags
« Reply #9 on: December 30, 2018, 01:20:50 PM »

You don't need to code a flag.
you simply add the condition that set the flag in AHP so if  you had A3 On set a flag and A3 Off cleared it then in the condition of the macro you add device A3 = on
If you had the condition B3 had to be on and B4 had to be off add them both
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

Find extra info @ My forum

alzy

  • Hero Member
  • *****
  • Helpful Post Rating: 5
  • Posts: 355
Re: Fun with Flags
« Reply #10 on: December 30, 2018, 01:25:00 PM »

But that's not the same thing. A flag stays set until reset. A3 can be reset by an off command. So if it is turned off before the macro runs that requires to know it was triggered on at some point it no workie. B:(
Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 265
  • Posts: 9469
  • I don't work for X10, I use it successfuly!
    • Tuicemen Software
Re: Fun with Flags
« Reply #11 on: December 30, 2018, 01:53:32 PM »

Ok try this.
Think of flags as a house code that your not using In AHP when you set a flag turn on that module, when you clear a flag turn off that module. Then in a macro that would normally watch a flag you watch that module since these modules are not realy used you put them in a separate group (called Flags) so if you manually wish to clear them you can. This was how flags originally came about.
there may be other ways to do this In HG as I'm just new to it.
However it may also make for a good option so I'll move this thread to the wish list.
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

Find extra info @ My forum

alzy

  • Hero Member
  • *****
  • Helpful Post Rating: 5
  • Posts: 355
Re: Fun with Flags
« Reply #12 on: December 30, 2018, 01:57:57 PM »

Yes, I could reserve house code F for Flags! LOL. That sounds like it would work and a lot better than writing a script. :)% and yes put it on the wish list.
Logged

racerfern

  • Hero Member
  • *****
  • Helpful Post Rating: 5
  • Posts: 257
Re: Fun with Flags
« Reply #13 on: December 30, 2018, 04:20:13 PM »

I installed HG on my main PC to fool around and get a feel for what to expect. I see where there are virtual devices that can easily be set as on/off to be used as "flags".

However, when I switched the virtual device from off to on or vice versa, HG does not immediately display the change. Instead I get a spinning arrow. I have to click Home > Dashboard and wait an inordinate amount of time. This can't be normal. Comments or thoughts appreciated.
Logged

alzy

  • Hero Member
  • *****
  • Helpful Post Rating: 5
  • Posts: 355
Re: Fun with Flags
« Reply #14 on: December 30, 2018, 04:45:39 PM »

I see there is a program for virtual modules but i have no idea how to run it and create a module!
Logged
Pages: [1] 2 3 ... 5
 

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