Autolog LIFX Controller Discussion

autolog
Posts: 4077
Joined: Tue Sep 10, 2013 3:07 am
Location: West Sussex, UK
Contact:

Re: Autolog LIFX Controller Discussion

Post by autolog »

jay (support) wrote:If those devices are just standard relay or dimmer devices, can't you just use the built-in turnOn, turnOff, toggle methods?
They aren't standard relay / dimmer devices - they are LIFX lamps controlled via my Plugin / LIFX API.

If you use these methods you get an error:
Script Error embedded script: ElementWrongTypeError -- device "Table Lamp" class type indigo.device is not compatible with request for type indigo.relay
Script Error Exception Traceback (most recent call shown last):

embedded script, line 1, at top level
ValueError: ElementWrongTypeError -- device "Table Lamp" class type indigo.device is not compatible with request for type indigo.relay
User avatar
jay (support)
Site Admin
Posts: 19232
Joined: Wed Mar 19, 2008 11:52 am
Location: Austin, Texas
Contact:

Re: Autolog LIFX Controller Discussion

Post by jay (support) »

Too bad you didn't implement them as dimmer devices, then the built-in controls would have worked.
Jay (Indigo Support)
Twitter | Facebook | LinkedIn
autolog
Posts: 4077
Joined: Tue Sep 10, 2013 3:07 am
Location: West Sussex, UK
Contact:

Re: Autolog LIFX Controller Discussion

Post by autolog »

jay (support) wrote:Too bad you didn't implement them as dimmer devices, then the built-in controls would have worked.
I can take a look at how to change the Plugin to do that. I was originally focused on getting it to work controlling the lamps.
I can see that it would make sense to try and do this.

Thanks for the suggestion :)
User avatar
matt (support)
Site Admin
Posts: 21542
Joined: Mon Jan 27, 2003 1:17 pm
Location: Texas
Contact:

Re: Autolog LIFX Controller Discussion

Post by matt (support) »

The Indigo SDK download has an example plugin that implements a relay/dimmer, so take a look at that if you haven't already.

One gotcha will be that I'm not sure it will be possible to programmatically migrate from your custom device type to the native relay/dimmer type. So users are going to have to re-create their devices if you change the plugin. Probably worth it IMO though – it will just be a one time process existing users of the plugin will have to do...
Image
User avatar
manwithavan
Posts: 76
Joined: Tue Jan 14, 2014 5:22 am
Location: Melbourne Australia

Re: Autolog LIFX Controller Discussion

Post by manwithavan »

Would I be right in thinking if the plugin we're implemented this way they'd show up as ordinary devices and therefore show on indigo touch? If so would they show on/off states?
User avatar
matt (support)
Site Admin
Posts: 21542
Joined: Mon Jan 27, 2003 1:17 pm
Location: Texas
Contact:

Re: Autolog LIFX Controller Discussion

Post by matt (support) »

Yes, and correct.
Image
User avatar
manwithavan
Posts: 76
Joined: Tue Jan 14, 2014 5:22 am
Location: Melbourne Australia

Re: Autolog LIFX Controller Discussion

Post by manwithavan »

That'd be rad


Sent from my iPhone using Tapatalk
Indy_Larry
Posts: 133
Joined: Tue Dec 03, 2013 10:49 am
Location: Indianapolis

Re: Autolog LIFX Controller Discussion

Post by Indy_Larry »

Hi Autolog just wondered if you ever got that new version of Lifx up and going? I seem to recall seeing where you were going to change how the plugin worked.

Thanks,
Larry

Insteon, Z Wave, Hue, Sonos
autolog
Posts: 4077
Joined: Tue Sep 10, 2013 3:07 am
Location: West Sussex, UK
Contact:

Re: Autolog LIFX Controller Discussion

Post by autolog »

It is work in progress - I have it running but haven't fully migrated all the code from the previous version yet. I need to iron out a few bugs and implement the preset processing.

I hesitate to give an estimate as to when it will be ready as other things keep getting in the way :(

I'll see what I can do to expedite progress :)
User avatar
manwithavan
Posts: 76
Joined: Tue Jan 14, 2014 5:22 am
Location: Melbourne Australia

Re: Autolog LIFX Controller Discussion

Post by manwithavan »

Just had a read through of the documentation for your new LIFX plugin, nice work! Very exciting.
autolog
Posts: 4077
Joined: Tue Sep 10, 2013 3:07 am
Location: West Sussex, UK
Contact:

Re: Autolog LIFX Controller Discussion

Post by autolog »

I have just released the latest version of the LIFX Controller - see the documentation here :-)
User avatar
SSteve
Posts: 89
Joined: Wed Sep 12, 2012 7:12 pm
Location: Sierra Foothills, California
Contact:

Re: Autolog LIFX Controller Discussion

Post by SSteve »

Thanks, Jon. I'm looking forward to trying it out. It says it requires Indigo 6.0.19 but the latest version is 6.0.18. Are you working from an unreleased copy of Indigo? I copied it into the Indigo 6 Plugins folder, but it doesn't show up in the list of available plugins.

-Steve
autolog
Posts: 4077
Joined: Tue Sep 10, 2013 3:07 am
Location: West Sussex, UK
Contact:

Re: Autolog LIFX Controller Discussion

Post by autolog »

SSteve wrote:Thanks, Jon. I'm looking forward to trying it out. It says it requires Indigo 6.0.19 but the latest version is 6.0.18. Are you working from an unreleased copy of Indigo? I copied it into the Indigo 6 Plugins folder, but it doesn't show up in the list of available plugins.

-Steve
Hi Steve,

Regarding 6.0.19; no I haven't got a copy of it but Matt has done a change to support some error message processing that I have incorporated into the LIFX plugin - it will still work without it but won't display some errors quite as well (not a major issue) - see this post - 6.0.19 has been a long time coming :wink:

I think the normal way to install a plugin is to double click it and let Indigo move it to the Plugins folder. However, if you restart the Indigo Server it should find it (if it is in the plugins folder). I assume you unzipped it i.e. copied the unzipped LIFX2.indigoPlugin to the plugins folder?
User avatar
SSteve
Posts: 89
Joined: Wed Sep 12, 2012 7:12 pm
Location: Sierra Foothills, California
Contact:

Re: Autolog LIFX Controller Discussion

Post by SSteve »

Hi, Jon. Thanks for the reply. I double-clicked the plug-in and now it shows up. It didn't see my LIFX bulbs at first. When I manually opened a Terminal window and ran lifx-http everything worked fine. I think the problem is that I'm using RVM and lifx-http is installed as part of an RVM gemset. I will do some research to try to figure out how to get the lifx-http command to work when a Terminal window doesn't get opened. But if you already know off the top of your head, I'll happily accept any help! Otherwise, I'll report back when I learn something. It'll be a few days before I look at it, though. We're heading out for Xmas visits tomorrow.

-Steve
DU Lou
Posts: 279
Joined: Thu Mar 08, 2012 7:18 pm
Location: Florida

Re: Autolog LIFX Controller Discussion

Post by DU Lou »

Hi Jon,
I am playing with the plugin was was able to successfully get the bulbs running in Indigo. However, the "duration" does not appear to be working in plugin configuration. Whether I set it to 1 second to 7 the ramp appears to be the same: a fast on or off.

Any thoughts?

Thanks,
~Lou
Post Reply

Return to “LIFX Controller”