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 4 5

Author Topic: Fun with Flags  (Read 1879 times)

racerfern

  • Hero Member
  • *****
  • Helpful Post Rating: 5
  • Posts: 257
Re: Fun with Flags
« Reply #15 on: December 30, 2018, 05:02:11 PM »

@alzy - Can you post a screenshot of your main screen please?
Here's mine without any real things, just the way it was created when I installed it. Difference being that I renamed and reconfigured the second switch from the left to be an on/off virtual module. Click the "settings" icon in the upper right corner if you have a similar screen, but either way, upload your screenshot.
Screenshot reduced to 50%
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 #16 on: December 30, 2018, 05:27:59 PM »

Alzy take some time and view the videos petera posted in the HG help section. The one on macro creation shows how to utilize virtual modules.
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 #17 on: December 30, 2018, 05:49:47 PM »

Tuicemen,

Thanks for the help! I tried that days ago but the link doesn't work.So useless. I can change an already created virtual module to some other function but how do I create a new one? I find this HG to not be at all intuitive and sparsely documented. I appreciate all the developers have done to create this great piece of software but I personally find it very hard to learn. B:(

Racerfern, my home screen is the same as yours except for a few x10 modules I have created. I appreciate the help. But a truly useful users manual would really help someone who has never used HG before ( like me) Sorry but I am extremely frustrated with Hg right now. i am not unappreciative just extremely frustrated!
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 #18 on: December 30, 2018, 06:07:30 PM »

There is all kinds of documentation for HG and lots of helpful you tube videos. The video posted here for me so you may wish to use a different browser..
« Last Edit: February 03, 2019, 05:43:05 PM by Tuicemen »
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

Find extra info @ My forum

bkenobi

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 18
  • Posts: 1727
Re: Fun with Flags
« Reply #19 on: January 02, 2019, 12:10:56 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.

The interface is just a display for what HG is doing behind the scenes but is not necessarily "real time".  IOW, HG is doing what it's supposed to do VERY quickly but the display updates very slowly relative to the processing.  As a result, you will likely see a delay between you clicking "turn on a light" and the display showing an illuminated light bulb icon.  If the light is sitting right next to you and you click "ON", the light will turn on in less than a second (the same time as it would take with AHP or a remote based on the speed of the X10 standard).

The one thing I did notice with HG compared to AHP is that if you turn on a series of modules, AHP can turn them on quicker.  AHP seems to be able to send the sequence:

A1
A2
A3
A ON

Whereas HG will send

A1
A ON
A2
A ON
A3
A ON

Each command takes around 0.4 seconds so the first one will result in all lights being turned on within 1.6 seconds (4 x 0.4) versus the last light turning on with HG in 2.4 seconds (6 x 0.4).  Either way, the web interface will probably not have updated until after the light is on.

bkenobi

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 18
  • Posts: 1727
Re: Fun with Flags
« Reply #20 on: January 02, 2019, 12:20:03 PM »

Oh, and as for flags...they are really a dumb concept  :'

Flags were a way to make AHP do things that the programmers didn't allow because they "forgot" to include a mechanism to actually perform logic correctly.  I ditched AHP a LONG time ago because it was terrible for performing logic.  I initially used AHP API and an AutoIt script to implement my Advanced Smart Lights script (called something different at the time).  It was really easy to do in the script but impossible to do in AHP directly.

If you stop looking at the lack of flags as a drawback and consider what you want to do overall, you will realize that you don't need them.  That said, you can do something similar by creating a parameter that can be accessed by everything.  I don't recommend that unless you know you need it as it might clutter things up.

alzy

  • Hero Member
  • *****
  • Helpful Post Rating: 5
  • Posts: 355
Re: Fun with Flags
« Reply #21 on: January 02, 2019, 04:19:13 PM »

I have found flags very useful in my AHP setup!
Logged

alzy

  • Hero Member
  • *****
  • Helpful Post Rating: 5
  • Posts: 355
Re: Fun with Flags
« Reply #22 on: January 02, 2019, 04:25:59 PM »

And having an equivalent here makes it simpler for me to port my 52 macros to HG.
Logged

bkenobi

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 18
  • Posts: 1727
Re: Fun with Flags
« Reply #23 on: January 03, 2019, 09:01:31 AM »

You only have 52 macros because AHP is terrible for logical programming.

alzy

  • Hero Member
  • *****
  • Helpful Post Rating: 5
  • Posts: 355
Re: Fun with Flags
« Reply #24 on: January 03, 2019, 09:49:48 AM »

I understand but that's not the point. I knowwwww u are an "expert" but i just need a simple way to port data so get off ur high horse!
Logged

alzy

  • Hero Member
  • *****
  • Helpful Post Rating: 5
  • Posts: 355
Re: Fun with Flags
« Reply #25 on: January 03, 2019, 09:53:08 AM »

Please...
Logged

petera

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 19
  • Posts: 1094
Re: Fun with Flags
« Reply #26 on: January 03, 2019, 10:32:16 AM »

I understand but that's not the point. I knowwwww u are an "expert" but i just need a simple way to port data so get off ur high horse!

Bkenobi never purported to being an expert in HG. What he has done though is spent the time and effort learning about the strength of HG and is indicating that it's structure negates the need for your old school macros and timers with one well written and logically structured script/program.

Unless you have alternative avenues for seeking knowledge about HG I really advise against alienating any other experienced HG users. Just a little politeness goes a long way.
Logged

bkenobi

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 18
  • Posts: 1727
Re: Fun with Flags
« Reply #27 on: January 03, 2019, 11:08:56 AM »

I understand the frustration of learning some new system that is different than what you are familiar with.  In fact, when I selected HG, I was picking it because it was the best option of what was available that fit all of my needs.  It is not the best programming environment IMO, but at the time it was far superior to everything else that was available that met my needs.  I am certainly not an expert, but based on those in this forum I suppose I'm probably close to that (though Gene is here, so I think I dropped quite a bit recently  :').

I have a minor in computer science, but only program periodically as a "hobby".  It's really just to get things working that I find no other solution for.  The code I posted at GitHub is not all mine but I made sufficient modifications to it to make it worth archiving for others.  In fact, my "Advanced Smart Lights" code is based on Gene's "Smart Lights" which he then updated to what is currently available (possibly spurred by my code, who knows).

The point is, I couldn't find something I wanted and so I learned just enough to get it working the way I wanted.  All I was suggesting is that AHP is really a terrible language that takes tons of macros interwoven together to make even simple things work.  If pseudo-code can be written to do a task then it can be implemented in other languages.  You will have a very difficult time converting AHP macros to any other HA system because of how convoluted it is IMO.  You could certainly prove me wrong and I'm fine with that, but I personally would recommend considering what you actually want to do rather than directly porting it to HG or any other system.   >!

alzy

  • Hero Member
  • *****
  • Helpful Post Rating: 5
  • Posts: 355
Re: Fun with Flags
« Reply #28 on: January 03, 2019, 11:22:29 AM »

bkenobi, Thanks for your insights. I  am just trying to reduce the pain of changing HA programs. I appreciate your advice and will consider same. Thanks! :)%
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 #29 on: February 04, 2019, 10:03:43 AM »

Just for fun I decided to play with creating a Fun with Flags program. For those that just must have something like this, it is possible to create this with out using an X10 address or any other protocols address HG may be configured with.
Also unlike AHP this isn't limited to 16 flags, you can have as many on/off flags as you wish Unless HG has a limit on devices.
I'm still playing with the code but I do have something working. ;)
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

Find extra info @ My forum
Pages: 1 [2] 3 4 5
 

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