Closed Quax1507 closed 7 months ago
I am aware of the Gen2 Light component MQTT structure:
The Light component can be controlled by method: Light.Set with params JSON on:true brightness: number
{ "id": 123, "src": "node_red", "method": "Light.Set", "params": { "id": 0, "on": true, "brightness": 30 } }
This is somewhat what Domoticz MQTT Autodiscovery is not capable to produce, as it has no working template support. Which will not be done in the near future as i see.
Maybe it would be easier to add if Allterco supports the "MQTT Control" method to access the Light component... currently only RPC control is supported.
The third way is to create a JS script which adds simple MQTT control to Gen2 Dimmer devices, but you has to install this script manually on each Dimmer.
Option ist available in FW 1.1.0
Super! Although it is undocumented, so we have to figure out how to use MQTT Control with Light component? :)
It is listed for only "Switch" and "Cover" https://shelly-api-docs.shelly.cloud/gen2/ComponentsAndServices/Mqtt/#mqtt-control
For Cover it works as writing "pos,number" into topic "
I tried to get help in English FB Shelly support group, but my comment was removed.
Sounds not too bad ;-) Can I help in any way?
Sounds not too bad ;-) Can I help in any way?
If you find out what command has to be send to "/status/light:0" to your device to change dimmer value (brightness?) it would help a lot.
Here is the output of status/light.0 after enabling "Generic status update over MQTT"
{"id":0,"source":"WS_in","output":false,"brightness":80.00,"temperature":{"tC":52.3, "tF":126.2}}
Does this help?
{"id":0,"source":"WS_in","output":false,"brightness":80.00,"temperature":{"tC":52.3, "tF":126.2}}
Does this help?
Yes i can provide you a template which able to show you the brightness in domoticz, but you will not be able to control it from Domoticz. Does this help?
Unfortunately not :-(
Unfortunately not :-(
Than we need to find out what command has to be send to "/status/light:0" to your device to change dimmer value (brightness?) As is wrote. Either "trial and error" or by asking the manufacturer heldpesk.
As i do not expect any progress in either Option 1, nor Option 2, i started to test Option 3=own JS script to the Gen2 device.
You can download latest mqtt_templates_gen2.txt for ShellyTeacher to add 0-10V dimmer from here: https://raw.githubusercontent.com/enesbcs/shellyteacher4domo/testing/mqtt_templates_gen2.txt
Next step is to add JS script to your dimmer device from here and start of course: https://raw.githubusercontent.com/enesbcs/shelly-script-examples/main/shellyplus-domo-dimmerfix.js
In case the script works, the autostart has to be enabled on this script to operate!
Thank You so much! It is working as desired, but for one little issue. The dimmer is recognized as RGBW device in domoticz. Could You fix that?
Thank You so much! It is working as desired, but for one little issue. The dimmer is recognized as RGBW device in domoticz. Could You fix that?
I think every light device is stored as RGBW device in Domoticz AD hardware.
You can try to replace this string in mqtt_templates_gen2.txt "supported_color_modes": ["onoff","brightness"] to that: "supported_color_modes": ["brightness"]
Then delete device from Domoticz and run teaching process again.
It is working now as desired. You are my hero! Thanks a lot
Could You please implemet the Shellyplus 0-10V Dimmer. I have ordered two of them and will receive them next week. If You need any MQTT results, please let me know ;-)