Author Topic: Instructions and Steps to Implement LIFX API  (Read 25736 times)

Offline Majimus

  • Full Member
  • ***
  • Posts: 106
  • Karma: +24/-0
Re: Instructions and Steps to Implement LIFX API
« Reply #180 on: April 29, 2018, 03:37:06 pm »
Ok, well I'm confident that whatever you think is best will work out better since you have a much deeper understanding of how this works, obviously.
So if we are running the same lifx scenes with different transition periods within Vera scenes, we would just include a line to change the variable that dictates the scene change duration before the command to execute the LIFX scene (or as I understand now, "device") and then include a line at the end to return the variable to its previous value before the script ends?
Thanks

Alright, that sounds a little convoluted.

I will modify the script, won't test it though (fairly harmless change) so someone will have to take the plunge (harmless is in the eyes of the beholder). 

Best........

Offline Majimus

  • Full Member
  • ***
  • Posts: 106
  • Karma: +24/-0
Re: Instructions and Steps to Implement LIFX API
« Reply #181 on: April 29, 2018, 03:49:16 pm »
This will work in the following way:

Code: [Select]
lifx_ctrl("scene_id:XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX", "scene", nil, nil, nil, DURATION)
the last parameter will control the duration....very much aware of the dire need for a new thread with updated instructions and usage guidelines etc etc.

Offline Quixote

  • Sr. Member
  • ****
  • Posts: 340
  • Karma: +17/-34
Re: Instructions and Steps to Implement LIFX API
« Reply #182 on: April 29, 2018, 04:58:36 pm »
Excellent!  Thanks for taking care of that so quickly. Just in the middle of installing a bunch of recessed lights at the moment (to take advantage of my new LIFX abilities  ;)), but I'll try that file out tonight for sure!
Maybe I'll set up a bunch of scripts for my wake up routine tomorrow morning and put it through the gauntlet. I'll let you know how it goes.

One of these days soon I'll go through the 13 pages of this thread and collect all of the important stuff, then I'll see if there is anything I can add to that, send it to you for your review and you can post it in a new thread. Maybe we can request that the post is "stickied" while we're at it.

Take care!
My "Karma" has been modified by 2 or 3 douchebags that didn't like that I criticized the plugin that they worship. I'm not actually a bad person. (I guess I'm "Chaotic Neutral").

Offline Quixote

  • Sr. Member
  • ****
  • Posts: 340
  • Karma: +17/-34
Re: Instructions and Steps to Implement LIFX API
« Reply #183 on: April 29, 2018, 08:03:31 pm »
Unfortunately, it's not working for me.
I've uploaded the new file, changed the syntax of my script and rebooted the Vera. The scene says that it's been executed successfully, but I see no results.
My "Karma" has been modified by 2 or 3 douchebags that didn't like that I criticized the plugin that they worship. I'm not actually a bad person. (I guess I'm "Chaotic Neutral").

Offline Majimus

  • Full Member
  • ***
  • Posts: 106
  • Karma: +24/-0
Re: Instructions and Steps to Implement LIFX API
« Reply #184 on: April 29, 2018, 08:09:07 pm »
I will check later....so I've tested the code and it works, what did you do?


example usage is:

lifx_ctrl("scene_id:xxxxx-xxx-xxxx-xxxx", "scene", nil, nil, nil, 3)
« Last Edit: April 29, 2018, 09:48:01 pm by Majimus »

Offline Majimus

  • Full Member
  • ***
  • Posts: 106
  • Karma: +24/-0
Re: Instructions and Steps to Implement LIFX API
« Reply #185 on: April 29, 2018, 10:29:40 pm »
I've created a new topic for the plugin

http://forum.micasaverde.com/index.php/topic,80853.0.html

We can take up further discussion over there, not having access to the first post makes it hard to consolidate information.

maj..

Offline jjwalker

  • Full Member
  • ***
  • Posts: 100
  • Karma: +0/-0
Re: Instructions and Steps to Implement LIFX API
« Reply #186 on: November 10, 2018, 11:17:30 pm »
I have been using the lifx_ctrl plugin for some time. Mine stopped working a few weeks ago for no apparent reason. Specifically just turning lights on. Turing off and toggle seems fine. I suspect a change in API. Sounds like I am not alone reading Ifairbank and Quixote posts.

I was pleased to see the development work from Majimus (thank you for your efforts!) and installed the V0.7 plugin. Happy with the result, just not sure how to configure the colours/whites to be specific? ie. With the lifx_ctrl I could specify 2750K white colour temperature. Is there a way I can get this type of control in my scenes?

Thanks,

Did you ever figure out the "turning on" problem?  I just installed the script... a bit confused about the actual plugin though.  Like you, I'm able to luup code turning off a light.  Can't get it to turn on though.


Offline Majimus

  • Full Member
  • ***
  • Posts: 106
  • Karma: +24/-0
Re: Instructions and Steps to Implement LIFX API
« Reply #187 on: November 11, 2018, 01:42:33 am »
Did you ever figure out the "turning on" problem?  I just installed the script... a bit confused about the actual plugin though.  Like you, I'm able to luup code turning off a light.  Can't get it to turn on though.

What about the plugin confuses you?

Offline jjwalker

  • Full Member
  • ***
  • Posts: 100
  • Karma: +0/-0
Re: Instructions and Steps to Implement LIFX API
« Reply #188 on: November 11, 2018, 08:12:36 am »
It doesn't show up in the devices list.  The older plugin says "Lifx starting.." or something like that.  No devices show up after installing either plugin.  I got the lifx_ctrl script to work... but only to turn off a light. Can't seem to turn it on.

Offline jjwalker

  • Full Member
  • ***
  • Posts: 100
  • Karma: +0/-0
Re: Instructions and Steps to Implement LIFX API
« Reply #189 on: November 11, 2018, 08:30:57 am »
Oh wait! I'm reading the new thread and didnt see the 3 updated files.  I'll try that!

Offline jjwalker

  • Full Member
  • ***
  • Posts: 100
  • Karma: +0/-0
Re: Instructions and Steps to Implement LIFX API
« Reply #190 on: November 11, 2018, 08:42:12 am »
ok nevermind.  Luup code to turn on light still doesnt work.  plugin is not showing up.  Yeah Im a bit confused.  Is the plugin only for UI7?

EDIT
Ok I see Lifx Plugin shows up in advance scene editor (after reading some more, my fault).  But there are really no options for actual control of the lights.  Im rebooting the vera right now.
« Last Edit: November 11, 2018, 08:45:54 am by jjwalker »

Offline Majimus

  • Full Member
  • ***
  • Posts: 106
  • Karma: +24/-0
Re: Instructions and Steps to Implement LIFX API
« Reply #191 on: November 11, 2018, 02:27:28 pm »
The plugin is only for UI7, that is all I have to test.  I don't know if/how it will work for you.

The plugin is a totally separate entity from the scripts that I tried to update and keep going for the other folks...they have nothing to do one with the other. I assume that the scripts are working fine, else someone would have complained already.
« Last Edit: November 11, 2018, 02:29:29 pm by Majimus »

Offline jjwalker

  • Full Member
  • ***
  • Posts: 100
  • Karma: +0/-0
Re: Instructions and Steps to Implement LIFX API
« Reply #192 on: November 11, 2018, 04:15:10 pm »
Ahh I see.  The script works.  I just can't get the "on" function to work.  Somebody else had the same issue on this thread.  He mentioned Lifx might have changed somethings in the API.  I tried different strings in their API and still can't get "on" to work.  "off" works though.  Thanks, I'll try the plugin in a UI7 box.