Sign in   |  Join   |  Help
Untitled Page

ARCHIVED FORUM -- March 2012 to February 2022
READ ONLY FORUM

This is the second Archived Forum which was active between 1st March 2012 and 23rd February 2022

 

Some New Features for Philips Hue and MLGW

rated by 0 users
This post has 5 Replies | 1 Follower

beojeff
Top 50 Contributor
USA
Posts 2,012
OFFLINE
Bronze Member
beojeff Posted: Wed, Sep 30 2015 11:15 PM

I've written some new custom strings for controlling the Philips Hue with the MLGW. I've written a command to gradually turn off the lights over five minutes and another one to gradually turn on the lights over 5 minutes. This could be a nice way of gently lowering the lights for sleep and to gentle turn on the lights for waking up. A transition time value of 3000 is for 5 minutes. 6000 is for 10 minutes. 9000 is for 15 minutes. Often, computer code inserted into posts on this forum posts incorrectly. I'll try anyway. If it doesn't post correctly and anyone wants me to email them the strings, just PM me.

 

To gradually turn off the lights:

PUT /api/<username>/groups/0/action HTTP/1.1\0D\0AContent-Length: 39\0D\0AContent-Type: application/x-www-form-urlencoded\0D\0A\0D\0A{\"on\": false, \"transitiontime\": 3000}    

To gradually turn on the lights:

PUT /api/<username>/groups/0/action HTTP/1.1\0D\0AContent-Length: 38\0D\0AContent-Type: application/x-www-form-urlencoded\0D\0A\0D\0A{\"on\": true, \"transitiontime\": 3000}    

beojeff
Top 50 Contributor
USA
Posts 2,012
OFFLINE
Bronze Member
beojeff replied on Wed, Sep 30 2015 11:16 PM

It seems that the command lines posted correctly.

beojeff
Top 50 Contributor
USA
Posts 2,012
OFFLINE
Bronze Member
beojeff replied on Wed, Sep 30 2015 11:19 PM

You can also transition to a specific hue, brightness, and saturation. Here is a command that will gradually turn all lights to grey:

Normal 0 false false false EN-US JA X-NONE PUT /api/<username>/groups/0/action HTTP/1.1\0D\0AContent-Length: 55\0D\0AContent-Type: application/x-www-form-urlencoded\0D\0A\0D\0A{\"on\": true, \"bri\": 46, \"hue\": 39816, \"sat\": 253}    

beojeff
Top 50 Contributor
USA
Posts 2,012
OFFLINE
Bronze Member
beojeff replied on Wed, Sep 30 2015 11:23 PM

You can also gradually transition to a specific Scene. Here is an example of a command that would transition all lights to the "Relax" Scene:

 

Normal 0 false false false EN-US JA X-NONE PUT /api/<username>/groups/0/action HTTP/1.1\0D\0AContent-Length: 55\0D\0AContent-Type: application/x-www-form-urlencoded\0D\0A\0D\0A{\"scene\": \"1dd4b4869-on-0\", \"transitiontime\": 3000}    

beojeff
Top 50 Contributor
USA
Posts 2,012
OFFLINE
Bronze Member
beojeff replied on Wed, Sep 30 2015 11:25 PM

As I feared, the last 2 posts added language in front of the command lines. The command lines should all begin with "PUT."

beojeff
Top 50 Contributor
USA
Posts 2,012
OFFLINE
Bronze Member
beojeff replied on Wed, Sep 30 2015 11:28 PM

beojeff:

You can also transition to a specific hue, brightness, and saturation. Here is a command that will gradually turn all lights to grey:

Normal 0 false false false EN-US JA X-NONE PUT /api/<username>/groups/0/action HTTP/1.1\0D\0AContent-Length: 55\0D\0AContent-Type: application/x-www-form-urlencoded\0D\0A\0D\0A{\"on\": true, \"bri\": 46, \"hue\": 39816, \"sat\": 253}    

Correction: This is the correct command to transition all lights to grey:

Normal 0 false false false EN-US JA X-NONE

PUT /api/<username>/groups/0/action HTTP/1.1\0D\0AContent-Length: 81\0D\0AContent-Type: application/x-www-form-urlencoded\0D\0A\0D\0A{\"on\": true, \"bri\": 46, \"hue\": 39816, \"sat\": 253, \"transitiontime\": 3000}

Page 1 of 1 (6 items) | RSS