b-tronic
(b-tronic)
February 24, 2019, 12:02pm
1
The manual of the Shelly RGBW says following:
shellies/shellyrgbw2-/color/0/set accepts a json payload described below:
{
“turn”: “on”, /* bool, can be set with on and off commands /
“red”: 0, / red brightness, 0…255, applies in mode=“color” /
“green”: 0, / green brightness, 0…255, applies in mode=“color” /
“blue”: 255, / blue brightness, 0…255, applies in mode=“color” /
“white”: 0, / white brightness, 0…255, applies in mode=“color” /
“gain”: 100, / gain for all channels, 0…100, applies in mode=“color” /
“effect”: 0 / applies an effect when set */
}
How should look the MQTT item in openhab ?
The power on / off command works this way:
Switch Shelly_5 “RGB Terrasse” [ “Switchable” ] { mqtt=">[broker:shellies/shellyrgbw2-111111/color/0/command:command:*:MAP(shelly.map)],<[broker:shellies/shellyrgbw2-111111/color/0:state:
MAP(shelly.map)]" }
hope this will help
Your question sounds as you may not be familiar with rules…is so please read the documentation before you proceed.
I have everything defined in a text file, so you will need to adjust if you configure things and items in PaperUI (and I cannot help a lot there as I am not using it). Finally, do NOT mix textual configuration and configuration in text files.
So here my thing definition:
Bridge mqtt:broker:mosquitto "Mosquitto" @ "Systems" [ host="127.0.0.1", secure=false ]
{
Thing topic Shell…
b-tronic
(b-tronic)
February 24, 2019, 6:58pm
3
i have tried to copy your setup to my raspberry openhab installation.
But i get this error when i wanna change the color in the sitemap and nothing happens.
Any ideas ?
2019-02-24 19:55:47.390 [ome.event.ItemCommandEvent] - Item ‘Down_front_left_color’ received command ON
2019-02-24 19:55:47.518 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule ‘HSB value to RGB color value’: 1
2019-02-24 19:55:48.067 [ome.event.ItemCommandEvent] - Item ‘Down_front_left_color’ received command ON
2019-02-24 19:55:48.143 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule ‘HSB value to RGB color value’: 1