Hi Folks,
almost winter here in germany… so I decided to spend a little time with new bulbs…
I bought 4 RGBW bulbs manufactured by Gosund. They came with tuya firmware, and because I don’t like communicating with china cloud servers when I switch my light on, I decided to flash tasmota firmware with tuya-convert project from Github.
I installed tuya-convert on a Pi 3b. The ota (over the air) flash works only if you kill the wpa-supplicant service.
Now I configured the Tasmota module template with this configuration.
So far with no problems
After that I sniffed on my mqtt server for new channels to subscribe to:
RGB-Bulb-01
{"Time":"2019-11-02T00:44:16","Epoch":1572651856,"Uptime":"0T12:18:18","UptimeSec":44298,
"Heap":22,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":2,"POWER":"OFF",
"Dimmer":99,"Color":"252,252,252,252","HSBColor":"0,0,99","Channel":[99,99,99,99],
"Scheme":0,"Fade":"OFF","Speed":1,"LedTable":"ON","Wifi":{"AP":1,"SSId":"xxxxxxxxxxxx",
"BSSId":"xx:xx:xx:xx:xx:xx","Channel":13,"RSSI":66,"LinkCount":2,"Downtime":"0T00:00:07"}}
Then I configured my openhab files to recognize the new bulbs.
POWER, Dimmer, Color and HSBColor looked quite promising to me, so I added them to the mqtt. things file…
Here’s my .things file:
Bridge mqtt:broker:MosquittoMqttBroker "MQTT - Mosquitto Broker" @ "MQTT" [
host="192.168.xxx.xxx",
secure=false,
port=1883,
qos=2,
retainMessages=false,
clientID="Openhab2",
keep_alive_time=60000,
reconnect_time=60000,
username="openhab",
password="xxxxxxxxx"
]
{
Thing mqtt:topic:RGB-Bulb-01 "MQTT - RGB-Bulb-01" @ "Entrance" {
Channels:
Type switch : switch "Power Switch" [
stateTopic="stat/OpenHAB/RGB-Bulb-01/POWER",
commandTopic="cmnd/OpenHAB/RGB-Bulb-01/POWER",
ON="ON",
OFF="OFF"
]
Type string : dimmer "Dimmer" [
stateTopic="tele/OpenHAB/RGB-Bulb-01/STATE",
transformationPattern="JSONPATH:$.Dimmer"
]
Type string : color "Color" [
stateTopic="tele/OpenHAB/RGB-Bulb-01/STATE",
transformationPattern="JSONPATH:$.Color"
]
Type string : hsbcolor "HSB Color" [
stateTopic="tele/OpenHAB/RGB-Bulb-01/STATE",
transformationPattern="JSONPATH:$.HSBColor"
]
}
}
And here’s the belonging .items file:
// RGB-Bulb-01
Switch RGBBulb01Switch "Switch" (gBulbs,gEntranceLight) { channel="mqtt:topic:RGB-Bulb-01:switch" }
String RGBBulb01Dimmer "Dimmer" <none> (gBulbs) { channel="mqtt:topic:RGB-Bulb-01:dimmer" }
String RGBBulb01Color "Color" <none> (gBulbs) { channel="mqtt:topic:RGB-Bulb-01:color" }
String RGBBulb01HSBColor "HSB Color" <none> (gBulbs) { channel="mqtt:topic:RGB-Bulb-01:hsbcolor" }
I can switch on and off via Openhab right now, but I’m not able to dim or change colors.
I tried with a colorpicker, both the Color and the HSBColor channel to change colors, but both with no luck, also tried a slider on the Dimmer channel - same result
Anyone here who is experienced with custom tasmota bulbs?? I think I have to change something like the channeltype in my things file. but trial and error doesn’t help out so far…
Maybe one could push me toi the right direction to get this fully working
Thanks and cheers