Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome Bug Reports
 PowerHome Messageboard : PowerHome Bug Reports
Subject Topic: ph_getinsteonlevel; delay needed? Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
smarty
Super User
Super User
Avatar

Joined: May 21 2006
Location: United States
Online Status: Offline
Posts: 728
Posted: January 01 2007 at 20:26 | IP Logged Quote smarty

I use a Insteon trigger to fire a macro that checks the local brighness level whenever there is ANY Insteon change. The change could happen via a remote command (touchscreen), or a local (manual) level change.

When changing the level maually, I have found that I must add a 0.8 sec wait when I use the "ph_getinsteonlevel" command in order for it to return the right brightness level.
If I do not add this wait, PH returns a value that is only part way to the brighness level that I manually changed the light to.

What I find odd is that I can see my trigger first fire the macro when I start the manual change, and then it fires again (as it should) when I stop the manual insteon change. So, my trigger and macro (to check and update the local level) runs twice. You would think the last run of the macro (the one that fired on the Stop Manual Change) would report back the proper Insteon level that the device was brightened to. It doesn't, UNLESS you add the 0.8 sec wait.

Is this a bug, or Insteon shortcoming, or a function of how PH queues up the macro run order?

In order to NOT slow my system down by this 0.8s sec wait when I press my touchscreens, I have set up another trigger that only fires on the Insteon incoming "Stop Manaul Change" message (for manual changes only). This trigger then calls a macro with the 0.8 sec wait. At least this way, my remote commans (and feedback) are not slowed down (only my manual ones are). Hope this makes sense.

__________________
Elk - Insteon - BlueIris - DMC1 - PowerHome - XLobby - HA_Bridge w/Dots - Brultech
Back to Top View smarty's Profile Search for other posts by smarty
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: January 17 2007 at 22:48 | IP Logged Quote dhoward

Steve,

I know exactly what you're talking about and it's kind of an Insteon shortcoming.

When you press and hold a switch, you get a start manual change command as you've found. When you let up on the switch, a Stop manual change command is sent but the new brightness level that is reached is not a part of that command. So what PowerHome does automatically for you is generate a status request command to retrieve the current brightness level (it does this not only for the switch that manually dimmed but also for every device that may be linked as a group). This is why you get the correct level only after the 0.8 second delay. It is taking PowerHome (and Insteon) a certain amount of time to request the current status and have that level reported back. It would have been nice if the stop manual change command reported new level but unfortunately it doesnt (there is room for it however in command 2 so I don't know why this wasnt implemented).

Dave.
Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum