Im attempting to send a command through a rule to change the Xiaomi Gateway LED Color.
I have everything setup and working as it should with the Basic UI setup, I have also created a fake item and setup a rule on status change of this item to turn on the Gateway so I know my rule so far is working.
What is the command to send to change the Gateway Color ?
Hi thanks for the reply,
Yes in my items file I have the color setup and this is working I can create a color picker in my sitemap and change the color of the gateway LED.
The thing I cannot do is change the color via a rule …
I’m new in OH world. I have a problem with controling Gateway light in rules so I decided to use this thread.
Here is my issue: I try to change Gateway color to red (Item.sendCommand(“255,0,0”)) in the rule but it always changes to white. Log extract below:
2018-04-02 23:37:56.653 [vent.ItemStateChangedEvent] - MiAirPurifier2_Aqi changed from 30 to 35
2018-04-02 23:37:56.674 [ome.event.ItemCommandEvent] - Item 'XiaomiGateway_Color' received command 255,0,0
2018-04-02 23:37:56.694 [ome.event.ItemCommandEvent] - Item 'XiaomiGateway_Brightness' received command 50
2018-04-02 23:37:56.789 [vent.ItemStateChangedEvent] - XiaomiGateway_Color changed from 0,0,0 to 255,0,0
2018-04-02 23:37:56.795 [vent.ItemStateChangedEvent] - XiaomiGateway_Color changed from 255,0,0 to 0,0,0
and here is my test rule:
rule "test2"
when
Item MiAirPurifier2_Aqi changed
then
XiaomiGateway_Color.sendCommand("255,0,0")
XiaomiGateway_Brightness.sendCommand(50)
end
Im currently using this in a rule to change the LED color to RED when my Garage door is open.
Note: it does not use RGB it uses HSB values for color. A good reference is http://colorizer.org/ and look at the HSV/HSB section to get your color values.
Thanks for advice. Good to know this. But this does not change the fact something keeps changing the color to 0,0,0 just after I set my own (see log extract in my previous post).