joba-1 / Tasmoticz

Domoticz MQTT autodiscovery plugin for Tasmota devices
MIT License
24 stars 18 forks source link

Add RGB* support #3

Open joba-1 opened 4 years ago

sciurius commented 2 years ago

Not sure what the * in RGB* stands for, but I have several RGB+CT lights that I would love to see supported.

Tasmota has added some support for JSON messages (see https://github.com/arendst/Tasmota/issues/14568).

I can provide sample MQTT messages if you want.

joba-1 commented 2 years ago

Welcome!

since I don’t have rgb gear, I dont know how tasmota handles this and what controls of domoticz could be used. Not a good starting point for programming or testing. That is basically why this issue is still open.

So, if you want to add the feature with a PR, I will support, but I can‘t/won’t do it myself in the forseeable future. Sorry.

FearNaBoinne commented 2 years ago

What do you need to support RGB* bulbs in Tasmoticz?

joba-1 commented 2 years ago

As I said, I expect this feature to be a lot of work to implement, more than I can invest time. But if you want to try:

technically on the tasmota side you would need mqtt messages that uniquely identify the device like number of channels, channel colors and if these channels are independent or connected - usually these messages are sent during boot. Then all tasmota messages that indicate state changes like brightness or color, on or off. Finally all tasmota commands that cause these state changes are needed so that the plugin can send them for domoticz. On domoticz side you need the domoticz device types that best represent the different tasmota device types (to some extent in domoticz plugin and api docs), the messages domoticz sends to the plugin if the domoticz device state changes and the commands the plugin needs to send to domoticz to reflect tasmota device changes picked up by mqtt messages.

It would be good to also detect tasmota device config changes to update the domoticz device accordingly, e.g. during initial setup phase.

Tasmota has pretty good docs and very good support in case some info is missing. On domoticz side last time I missed info (for how to detect user language to translate sensor names) I got no response. Could be you need to dig in the code to find out missing details and hope you don't need changes there.

FearNaBoinne commented 2 years ago

I don't think I will have much time to spend on this either, but I'll see what I can do, and may ping you for some support if I do get there...

The Tasmota devices do send information about the number and types of channels they support, which should enable one to select the correct type of device for Domoticz...

joba-1 commented 2 years ago

I just reread my previous post and it looks ... complicated. If you just concentrate on your usecase (eg. 3 colors combined channel, or whatever you need) that would be fine with me. Generalization can come later, if someone actually needs it...