Fun with Flags

Started by alzy, December 29, 2018, 01:51:32 PM

Previous topic - Next topic

alzy

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

petera

Quote from: alzy 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:(

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.

alzy

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.

petera

Quote from: alzy 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.

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.

alzy

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.

petera

Quote from: alzy 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.

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

alzy


Tuicemen

Quote from: alzy on December 30, 2018, 12:29: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.
Please Read Topic:
General Forum Etiquette
Before you post!

alzy

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

Tuicemen

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
Please Read Topic:
General Forum Etiquette
Before you post!

alzy

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:(

Tuicemen

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.
Please Read Topic:
General Forum Etiquette
Before you post!

alzy

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.

racerfern

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.

alzy

I see there is a program for virtual modules but i have no idea how to run it and create a module!