LIFX Bridge Plugin (Beta) - Harmony Hub integration!

User avatar
FlyingDiver
Posts: 7326
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: LIFX Bridge Plugin (Beta) - Harmony Hub integration!

Post by FlyingDiver »

Ah. See the sequence number at the end of the line? The Hub is sending out repeated commands for some reason. I think I can tweak the plugin to ignore repeats.
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
popcorn-in-sac
Posts: 11
Joined: Wed Nov 09, 2016 2:53 pm

Re: LIFX Bridge Plugin (Beta) - Harmony Hub integration!

Post by popcorn-in-sac »

I did notice that. They are all marked as sequence 31. It does seem like just ignoring the duplicate ones would be the solution. Because it's fairly random, I'm guessing this is actually a bug of some sort on the Logitech side. I know they do some type of sending multiple commands on the IR side (from what I've read), but no mention of this being deliberate on the WiFi/API side.

Thanks again Joe
User avatar
FlyingDiver
Posts: 7326
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: LIFX Bridge Plugin (Beta) - Harmony Hub integration!

Post by FlyingDiver »

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
popcorn-in-sac
Posts: 11
Joined: Wed Nov 09, 2016 2:53 pm

Re: LIFX Bridge Plugin (Beta) - Harmony Hub integration!

Post by popcorn-in-sac »

I'm getting an error when the plug-in starts. It then stops.

Code: Select all

Nov 10, 2016, 10:53:53 AM
  Stopping plugin LIFX Bridge (pid 2590)
  LIFX Bridge                     Shutting down LIFX Bridge
  Stopped plugin LIFX Bridge
  Upgrading plugin LIFX Bridge to newer version 0.2.3 (previous version moved to trash)
  Loading plugin "LIFX Bridge 0.2.3"
  Starting plugin "LIFX Bridge 0.2.3" (pid 2605)
  LIFX Bridge Error               Error in plugin execution InitializeMain:

Traceback (most recent call last):
IndentationError: ('unexpected indent', ('plugin.py', 56, 2, '\t\tself.refreshDeviceList()\n'))

  Stopping plugin "LIFX Bridge 0.2.3" (pid 2605)
  Stopped plugin "LIFX Bridge 0.2.3"

Nov 10, 2016, 10:54:13 AM
  Disabling plugin "LIFX Bridge 0.2.3"
  Enabling plugin "LIFX Bridge 0.2.3"
  Starting plugin "LIFX Bridge 0.2.3" (pid 2609)
  LIFX Bridge Error               Error in plugin execution InitializeMain:

Traceback (most recent call last):
IndentationError: ('unexpected indent', ('plugin.py', 56, 2, '\t\tself.refreshDeviceList()\n'))

  Stopping plugin "LIFX Bridge 0.2.3" (pid 2609)
  Stopped plugin "LIFX Bridge 0.2.3"
User avatar
FlyingDiver
Posts: 7326
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: LIFX Bridge Plugin (Beta) - Harmony Hub integration!

Post by FlyingDiver »

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
popcorn-in-sac
Posts: 11
Joined: Wed Nov 09, 2016 2:53 pm

Re: LIFX Bridge Plugin (Beta) - Harmony Hub integration!

Post by popcorn-in-sac »

I'm seeing many more debug messages. Mostly references to duplicate or out of order sequences. I'm also using the Harmony iOS app, and even just switching between "LIFX" bulbs in the app, I'm seeing many of these sequence messages....not coming from any button-press actions.

I did try some actual lighting actions, and what I've included below shows an action. It also seems to indicate that duplicate commands were received, in sequence 76 I believe. In any event, this didn't drive duplicate Indigo/Insteon actions.

Code: Select all

 LIFX Bridge Debug               LightSetPower command is for device: Family Room - Movie Mode, payload = [('Power', 65535), ('Duration', 1000)]
  LIFX Bridge                     Set on state of device 1261709392 to 65535
  Action Group                    Family Room - Movie Mode
  Virtual Devices                 sent "Family Room - Movie Mode" on
  Sent INSTEON                    "PowerLinc Interface" on (scene 3 - Family Room - Movie)
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 74
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 75
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 74
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 75
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 74
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 75
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 74
  Sent INSTEON                    "Family Room - Floor Lamp" on (scene 3 cleanup)
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 75
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 76
  Sent INSTEON                    "Family Room - Table Lamps" on (scene 3 cleanup)
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 74
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 75
  Sent INSTEON                    "Entry Way - Entry Lights" on (scene 3 cleanup)
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 74
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 75
  Sent INSTEON                    "Family Room - Entry KeypadLinc (No Load)" on (scene 3 cleanup)
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 76
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 74
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 75
  Sent INSTEON                    "Hallway (Kitchen) - Kitchen Overhead Lights" on (scene 3 cleanup)
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 74
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 75
  Sent INSTEON                    "Dining Room (Kitchen) - KeypadLinc (No Load)" on (scene 3 cleanup)
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 76
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 74
  Sent INSTEON                    "Dining Room (Kitchen) - Dining Overhead Light" on (scene 3 cleanup)
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 75
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 74
  Sent INSTEON                    "Entry Way - Hallway Overhead Lights" on (scene 3 cleanup)
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 75
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 74
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 75
  Sent INSTEON                    "Hallway (Bedroom) - Hallway Overhead Lights" on (scene 3 cleanup)
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 74
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 75
  Sent INSTEON                    "Hallway (Kitchen) - Hallway Overhead Lights" on (scene 3 cleanup)
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 74
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 75
  Sent INSTEON                    "Hallway (Mark Office) - Hallway Overhead Lights" on (scene 3 cleanup)
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 74
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 75
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 76
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 76

Nov 10, 2016, 12:41:48 PM
  LIFX Bridge Debug               lifxRespond, processing message seq_num = 77
  LIFX Bridge Debug               lifxRespond, processing message seq_num = 78
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 77
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 78
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 77
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 78
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 77
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 78
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 77
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 78
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 77
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 78
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 77
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 78
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 77
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 78
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 77
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 78
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 77
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 78
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 77
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 78
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 77
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 78
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 77
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 78
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 77
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 78
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 77
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 78
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 77
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 78
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 77
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 78
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 77
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 78
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 77
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 78
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 77
  LIFX Bridge Debug               lifxRespond, skipping message, duplicate or out of order seq_num = 78
User avatar
FlyingDiver
Posts: 7326
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: LIFX Bridge Plugin (Beta) - Harmony Hub integration!

Post by FlyingDiver »

Oh, wow, that's ugly. And I'm seeing the same thing on my system, just selecting the lights in the Devices tab, not actually changing them. I'm going to have to put in some tracing code to see if I can figure out what all those messages are for.

What's worse is that it repeats a couple or more different messages multiple times. Right now, the version you have ignores any message that isn't a higher sequence number than the last one it processed. So it'll do 74, then 75, and ignore anything less than or equal to 75. Fine, that works for what we're seeing. But it'll break whenever that sequence number rolls over or resets. So on my system, I'm testing a version that ignores anything that's equal to the last number processed. Which doesn't have a rollover problem, but won't handle the case of two numbers alternating like you're seeing.

So it looks like I might have to implement a cache of some number of recent messages received to ignore. That sucks.
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
popcorn-in-sac
Posts: 11
Joined: Wed Nov 09, 2016 2:53 pm

Re: LIFX Bridge Plugin (Beta) - Harmony Hub integration!

Post by popcorn-in-sac »

It seems like those numbers that come in pairs and alternate somewhat are related to something other than an overt button press action. As you said, that will require more investigation to figure out what that comes from. It almost seems like it's a status request type of message coming from the Harmony side. Like it's trying to figure out what the brightness or color or something is set to.

For all those, I really don't care, since those aren't supported functions anyway, so just ignoring those seems appropriate.
User avatar
FlyingDiver
Posts: 7326
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: LIFX Bridge Plugin (Beta) - Harmony Hub integration!

Post by FlyingDiver »

Except I have code to recognize and log all the "known" status request messages. So these are something else. Like I said, more research needed.

But figuring out how to remember which messages to ignore is going to be tricky.
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
Locked

Return to “LIFX Bridge”