Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome General
 PowerHome Messageboard : PowerHome General
Subject Topic: Insteon Motion Sensor multiple ON/OFFs Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
jpcurcio
Senior Member
Senior Member
Avatar

Joined: April 01 2007
Location: United States
Online Status: Offline
Posts: 119
Posted: February 23 2009 at 21:01 | IP Logged Quote jpcurcio

I set up an Insteon motion sensor in my garage to turn
on and off the lights when I get home (my garage is two
cars deep x one car wide, and I like the extra light
when backing in). I have two separate light switches.

I set up a trigger when the motion sensor turns "on",
and then execute a macro that turns on the two separate
switches (garageA and garageB). I notice that for each
"on", I get multiple "on" commands sent to each switch;
typically 3, but maybe more. Likewise, when it times
out, I trigger on the group 2 command and execute an
"off" macro, and I get multiple "off" command sent as
well.

Both switches are newly installed devices, so it's not a
legacy thing. What is happening here? Is this a
hardware or software problem? Do I need a closer access
point (it is literally about four feet above the sensor,
through one floor)?
Back to Top View jpcurcio's Profile Search for other posts by jpcurcio
 
BeachBum
Super User
Super User
Avatar

Joined: April 11 2007
Location: United States
Online Status: Offline
Posts: 1880
Posted: February 23 2009 at 22:55 | IP Logged Quote BeachBum

You actually get 3 ons 2 being the ON and the other being a Group Cleanup. This is normal. What I do is set a global ON if 1 occurs so the next are ignored. Maybe Lee will respond with a more elegant way of explaining what is happening.

__________________
Pete - X10 Oldie
Back to Top View BeachBum's Profile Search for other posts by BeachBum
 
grif091
Super User
Super User


Joined: March 26 2008
Location: United States
Online Status: Offline
Posts: 1357
Posted: February 24 2009 at 00:28 | IP Logged Quote grif091

What release of PH are you running specifically?   You should be on 2.1b.   What did you code in the Macro to turn On/Off each garageX switch? A Direct message or a Group message. A Group message sequence is made up of two messages, a Group Broadcast On/Off followed by a Group Cleanup Direct On/Off for each responder in the Group. The Group Broadcast is not retried but the Group Cleanup Direct is retried if a garageX switch(s) does not ACK the command. Up to three retries are possible. Post the Event Log and Insteon Raw Log so we interpret the events and Insteon traffic taking place. Sounds like you are seeing a command being retried to garageA and garageB. If commands are being retried for both switches you could have a phase coupling problem. You could have noise or signal attenuation problem at the computer caused by a PC or UPS power supply requiring a FilterLinc. If the garage is far away an Access Point in the garage may help. Just too many possibilities. Post the Event Log and the Insteon Raw Log so we can tell what is actually happening.

__________________
Lee G
Back to Top View grif091's Profile Search for other posts by grif091
 
BeachBum
Super User
Super User
Avatar

Joined: April 11 2007
Location: United States
Online Status: Offline
Posts: 1880
Posted: February 24 2009 at 08:36 | IP Logged Quote BeachBum

Lee, my Motion Sensor sends 2 Group In commands followed by a Group Cleanup thus causing 3 firings of the Group In trigger for the Motion Sensor. The Flag on the 1st one is 199 and the Flag on the 2nd is 195. This is not unique to my situation as I have another Motion Sensor on a different circuit behaving he same way. If you are triggering off of this it will cause double macros thus multiple commands to be sent. I gate the triggers so I only fire the macro once.

__________________
Pete - X10 Oldie
Back to Top View BeachBum's Profile Search for other posts by BeachBum
 
grif091
Super User
Super User


Joined: March 26 2008
Location: United States
Online Status: Offline
Posts: 1357
Posted: February 24 2009 at 09:00 | IP Logged Quote grif091

Thanks Pete, that helps. From the original post it sounds like multiple outbound commands are being seen for each inbound command, with the number of outbound commands being variable. There was no mention of multiple inbound commands although that may well explain the situation except for the varying number of outbound commands. The Event and Raw Log traces should confirm exactly what is happening. Should be easy to solve if it is the same scenario you have.

__________________
Lee G
Back to Top View grif091's Profile Search for other posts by grif091
 
BeachBum
Super User
Super User
Avatar

Joined: April 11 2007
Location: United States
Online Status: Offline
Posts: 1880
Posted: February 24 2009 at 09:17 | IP Logged Quote BeachBum

Do you have any documentation that explains the 2 flags. In the PH trace the only difference between the 1st two are the flags.

__________________
Pete - X10 Oldie
Back to Top View BeachBum's Profile Search for other posts by BeachBum
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: February 24 2009 at 09:54 | IP Logged Quote dhoward

Some of the repeats could be that the device is sending multiple Group on/off commands. I know that the RemoteLinc (another Insteon RF device) will send the appropriate group control command 2 or 3 times with each button press. In Pete's case, since the flags are different, it sounds as if the second incoming group in is probably just a repeat. The first 4 bits of the flag is the max hops and remaining hops count. The upper 4 bits controls the type of Insteon message.

As usual, several different ways to combat this. Probably the easiest is to just temporarily disable the trigger for a few seconds when a command is received. I like to do this with a generic macro that can be re-used for any trigger. I'll detail this below...

I call the macro TRIGDISABLE.

Code:

10 Formula Immediate ph_disabletrigger(ph_getvar_s(2,1))
20 Wait ph_getvar_n(1,1)
30 Formula Immediate ph_enabletrigger(ph_getvar_s(2,1))


Whenever a trigger is fired, the ID of the trigger will be placed into the [TEMP1] variable. In line 10 of the macro, we can see that we will disable the trigger in the [TEMP1] var. Line 20 then waits for the amount of seconds contained within the [LOCAL1] var. If we call the macro from the trigger action with a ph_macroparm function, we can place this variable delay in the [LOCAL1] var. Line 30 then just re-enables the trigger after the wait time has expired.

So, with this type of problem, we should be able to get by with a wait time of about 5 seconds. So on the Group In trigger, we can make the action:

ph_macroparm("TRIGDISABLE",5,0,0,0,0) + whatever other action you really want to perform.

The TRIGDISABLE macro will fire, immediately disable the trigger, start to wait, then fire whatever other action you wanted to perform (such as turning lights on/off). When the Wait expires, the trigger is re-enabled.

Another way to handle this would be to declare a Virtual Insteon device (these are Insteon devices whose address starts with V such as VX.XX.XX). Use the Links tab to add the virtual Insteon as a responder to the motion sensor (You MUST also have an actual responder to the motion sensor such as the PLM or another device...without a real Insteon device as a responder, the motion sensor wont send a group command and the virtual responder won't work). A link to a virtual device does not actually create a link in any device's internal database. Its just a representation within PowerHome.

With the virtual "linked" to the Motion sensor, it will now track on/off based upon the motion sensor sending its group commands. You can now create a "Insteon Device Chg" trigger on the virtual device and use the "[TEMP9] <> [TEMP10]" formula in the boolean field to make the trigger only fire a single time. The virtual Insteon is a handy little technique for tracking the status of Insteon devices for other than the main group.

You should also be able to do the "Insteon Device Chg" trigger directly on the Motion sensor itself without the virtual but I wanted to highlight the virtual technique so you could use this for groups other than 1 such as the light/dark sensor on the motion sensor and the battery low.

HTH,

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

Joined: April 11 2007
Location: United States
Online Status: Offline
Posts: 1880
Posted: February 24 2009 at 10:37 | IP Logged Quote BeachBum

Thanks for the explanation. I like the idea of using a generic macro as it cuts down the number of times one has to code the trigger. I currently do it this way:

IF ({GATE_MOTION_1} = 1, 0, ph_setglobal_s("GATE_MOTION_1", "1") +1)

But that means one has to code a global and flip it off when on. I also am going to play with the Virtual Insteon device concept. This never ends on to the Sand Box to play..


__________________
Pete - X10 Oldie
Back to Top View BeachBum's Profile Search for other posts by BeachBum
 
BeachBum
Super User
Super User
Avatar

Joined: April 11 2007
Location: United States
Online Status: Offline
Posts: 1880
Posted: February 24 2009 at 11:13 | IP Logged Quote BeachBum

News from the Sand Box… I tried the Generic disabling the trigger. The problem is the trigger fires twice before the macro comes off the queue. So the trigger disables twice but too late. On to Vitual.

__________________
Pete - X10 Oldie
Back to Top View BeachBum's Profile Search for other posts by BeachBum
 
grif091
Super User
Super User


Joined: March 26 2008
Location: United States
Online Status: Offline
Posts: 1357
Posted: February 24 2009 at 12:08 | IP Logged Quote grif091

The 199 (0xC7) and 195 (0xC3) are both Group Broadcast messages (0xCx). The difference is in the number of Hops Left. I'm wondering if this is a case where both Access Points receive the RF signal from the motion sensor and both APs send a Group Broadcast message. Would be an interesting test to unplug the AP that is on the opposite 120v leg to the PLM (leaving the AP active on the same 120v leg as the PLM) and see if only one Group Broadcast message is received.

__________________
Lee G
Back to Top View grif091's Profile Search for other posts by grif091
 
BeachBum
Super User
Super User
Avatar

Joined: April 11 2007
Location: United States
Online Status: Offline
Posts: 1880
Posted: February 24 2009 at 12:27 | IP Logged Quote BeachBum

That’s a good thought and I don’t think it would matter on which leg they are on. I’ll unplug one of them and see what happens.

Got the Generic to work after following the instructions to the “T”. The macro you would normally call has to coded in the Action as a ph_macro( ).

EDIT: I spoke too soon. The Generic still does not work. Unplugged 1 AP and still got 2 Group Ins.

Edited by BeachBum - February 24 2009 at 12:32


__________________
Pete - X10 Oldie
Back to Top View BeachBum's Profile Search for other posts by BeachBum
 
grif091
Super User
Super User


Joined: March 26 2008
Location: United States
Online Status: Offline
Posts: 1357
Posted: February 24 2009 at 12:49 | IP Logged Quote grif091

I was concerned that a message from an AP on the opposite phase to the PLM might not make it back to the PLM when phase coupling was lost with one of the APs unplugged.

__________________
Lee G
Back to Top View grif091's Profile Search for other posts by grif091
 
jpcurcio
Senior Member
Senior Member
Avatar

Joined: April 01 2007
Location: United States
Online Status: Offline
Posts: 119
Posted: February 24 2009 at 14:19 | IP Logged Quote jpcurcio

grif091 wrote:
What release of PH are you running
specifically?   You should be on 2.1b.   What did you
code in the Macro to turn On/Off each garageX switch? A
Direct message or a Group message. A Group message
sequence is made up of two messages, a Group Broadcast
On/Off followed by a Group Cleanup Direct On/Off for
each responder in the Group. The Group Broadcast is not
retried but the Group Cleanup Direct is retried if a
garageX switch(s) does not ACK the command. Up to three
retries are possible. Post the Event Log and Insteon
Raw Log so we interpret the events and Insteon traffic
taking place. Sounds like you are seeing a command
being retried to garageA and garageB. If commands are
being retried for both switches you could have a phase
coupling problem. You could have noise or signal
attenuation problem at the computer caused by a PC or
UPS power supply requiring a FilterLinc. If the garage
is far away an Access Point in the garage may help.
Just too many possibilities. Post the Event Log and the
Insteon Raw Log so we can tell what is actually
happening.


I am running 2.1b. My macro is simple, for now, just to
prove concept before attempting anything in-depth. I
simply use ph_insteon() to turn on the lights. I did
the same thing for the motion sensor group 2 commands to
turn them off.

If I get home at a reasonable hour tonight, I will grab
the event log and raw log.

Thanks...

-John
Back to Top View jpcurcio's Profile Search for other posts by jpcurcio
 
grif091
Super User
Super User


Joined: March 26 2008
Location: United States
Online Status: Offline
Posts: 1357
Posted: February 24 2009 at 14:43 | IP Logged Quote grif091

Thanks, that information adds to the possibility that there is a communication problem back to the two garage switches. The ph_insteon uses a Direct command (single command sequence). Also being on 2.1b eliminates the two different bugs (one at 2.1, one at 2.1a) that were causing valid command responses to be retried.

Writing this post did make me think of one thing. Maybe the command to the second switch is going on the powerline at the same the first switch is sending back an ACK. Could try adding a Wait 1 (second) between the two commands, particularly if they are being issued from a single Macro line. Can't add the Wait in a single formula. Macro would have three lines, ph_insteon for switch A, Wait 1, ph_insteon for switch B.

Or just post back the Event and Raw logs and we can see what is actually happening.


Edited by grif091 - February 24 2009 at 14:44


__________________
Lee G
Back to Top View grif091's Profile Search for other posts by grif091
 
BeachBum
Super User
Super User
Avatar

Joined: April 11 2007
Location: United States
Online Status: Offline
Posts: 1880
Posted: February 24 2009 at 15:29 | IP Logged Quote BeachBum

Lee, I tried Dave’s suggestions but to no avail. Maybe my pea brain doesn’t think in the same bits and bytes. The links I have with the Motion Sensor is PLM group 1 & 3 as Responders. The only way I was able to control the double macros from firing was to gate the trigger. Since John is on 2.1b I’ll bet on the same scenario I have.

__________________
Pete - X10 Oldie
Back to Top View BeachBum's Profile Search for other posts by BeachBum
 
grif091
Super User
Super User


Joined: March 26 2008
Location: United States
Online Status: Offline
Posts: 1357
Posted: February 24 2009 at 15:37 | IP Logged Quote grif091

Very possible, Pete. Hard to reconcile that with the multiple and varying number of outbound commands in response to an inbound Group Broadcast. Looking forward to what the traces show.

__________________
Lee G
Back to Top View grif091's Profile Search for other posts by grif091
 
jpcurcio
Senior Member
Senior Member
Avatar

Joined: April 01 2007
Location: United States
Online Status: Offline
Posts: 119
Posted: February 24 2009 at 21:36 | IP Logged Quote jpcurcio

OK, how's this for a possible explanation:

I noticed that I have multiple triggers being sent by the motion sensor, so I looked and realized that I don't have a responder set up for the MS. Therefore, while PH2 can pick up the trigger, there is nothing on the line to acknowledge that the signal was received. Therefore, the MS is sending multiple commands.

Might this be what is happening?

Also, how the heck do I set a file name for the output log? I can't find it anywhere.
Back to Top View jpcurcio's Profile Search for other posts by jpcurcio
 
grif091
Super User
Super User


Joined: March 26 2008
Location: United States
Online Status: Offline
Posts: 1357
Posted: February 24 2009 at 22:00 | IP Logged Quote grif091

PowerHome Explorer, Setup, Controllers, Setting contains the log file definition for the Raw Log.

According to Dave and Pete, the motion sensor is sending two Group Broadcast commands and they are linked to the PLM. That is why the discussion of how to avoid multiple trigger actions when these multiple Group Broadcast messages are received. These commands are not ACKed because they are not sent to any specific device. The following Group Cleanup Direct is sent to a specific device address and there must be at least a Controller of link record in the motion sensor for this command to flow as that is where the Insteon address of the responder is stored. If the responder device does not have a corresponding Responder to link record, no ACK will flow back. Normally the PLM must have a Responder to link record for the PLM to be passing messages from the motion sensor to PH. If the PLM is not ACKing the Group Cleanup Direct this would cause the motion sensor to repeat the Group Cleanup Direct command.


__________________
Lee G
Back to Top View grif091's Profile Search for other posts by grif091
 
jpcurcio
Senior Member
Senior Member
Avatar

Joined: April 01 2007
Location: United States
Online Status: Offline
Posts: 119
Posted: February 24 2009 at 22:13 | IP Logged Quote jpcurcio

Thanks, Lee... got it. My GF tells me we're not going out tonight as planned, so I'll try to get a log together after I make dinner.
Back to Top View jpcurcio's Profile Search for other posts by jpcurcio
 
BeachBum
Super User
Super User
Avatar

Joined: April 11 2007
Location: United States
Online Status: Offline
Posts: 1880
Posted: February 24 2009 at 22:29 | IP Logged Quote BeachBum

“Also, how the heck do I set a file name for the output log? I can't find it anywhere.”

If that is what you are looking for try Setup-Controllers-PLM-Settings and you’ll see Echo Log File.


__________________
Pete - X10 Oldie
Back to Top View BeachBum's Profile Search for other posts by BeachBum
 

Page of 2 Next >>
  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