Set RGBW values via script (JSON)?

Use this forum to discuss possible implementation of a new feature before opening a ticket.
A developer shall edit the topic title with "[xxx]" where xxx is the id of the accompanying tracker id.
Duplicate posts about the same id. +1 posts are not allowed.

Moderators: leecollings, remb0

Post Reply
Triangle
Posts: 8
Joined: Wednesday 10 June 2015 20:42
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Contact:

Set RGBW values via script (JSON)?

Post by Triangle »

Hi, I would like flash my Hue lights in a certain color when a sensor reached a defined level (for instance CO-2 level). After the flashing i'd like to return the Hue status from before flashing.
In order to do this I have to save the Hue state; via JSON I can retrieve the dim-level, XOffset and YOffset. Next step would be a series of "set" commands to do the flashing and ending with the original state. Setting the dim-level is possible via JSON but is there any way to set the colors (XOffset and YOffset)?
User avatar
Mooseknuckle
Posts: 43
Joined: Sunday 08 March 2015 9:24
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Set RGBW values via script (JSON)?

Post by Mooseknuckle »

Allthough it's not exactly what you want there is already some native Hue support for this:
http://www.developers.meethue.com/docum ... e-concepts

You can create a bash script with something like this:

Code: Select all

#!/bin/bash

curl -H "Accept: application/json" -X PUT --data '{"alert":"lselect"}' http://<Bridge ip address>/api/<HUE_api_user>/lights/1/state
This will make 1 light blink in the last selected color for that light.
RPI 3, Philips Hue,Toon Thermostat, Harmony Smart Control, Yeelights
Mysensors wifi gateway + sensors, RFXtrx433E, Kaku stuff, Xiaomi gateway + sensors
Domoticz controlled DIY ambilight, Selectplus chime, Mi-light led controller
tomson
Posts: 14
Joined: Friday 14 February 2014 20:33
Target OS: Raspberry Pi / ODroid
Domoticz version: Latest
Location: Groningen
Contact:

Re: Set RGBW values via script (JSON)?

Post by tomson »

I was looking for the same. It is described here: viewtopic.php?f=4&t=5302&hilit=json+rgbw

Although the JSON command results in an error

Code: Select all

{
   "status" : "ERR"
}
it does work fine.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests