Help please with H801 RGB controller and using MQTT

Hi
I have been running RGB ceiling lights I made for some years but have decided to move them over to Wifi and Hassio. Having purchased an H801 RGB controller I have flashed it with Tasmota and have set it up with its web based configuration to the following

H801 Module

Living Room Light

Program version	5.3.0
Build Date & Time	2017-09-10T15:25:53
Core/SDK version	2_3_0/1.5.3(aec24ac9)
Uptime	1 Hours
Flash write count	34 at FA000
Boot count	20
Reset reason	External System
 
AP1 SSId (RSSI)	Miranda (78%)
Hostname	rgb1 -4462
IP address	192.168.1.107
Gateway	192.168.1.1
Subnet mask	255.255.255.0
DNS server	192.168.1.1
MAC address	A0:20:A6:1A:B1:6E
 
MQTT Host	192.168.1.103
MQTT Port	1883
MQTT Client &
 Fallback Topic	DVES_1AB16E
MQTT User	chris
MQTT Topic	rgb1
MQTT Group Topic	sonoffs
MQTT Full Topic	cmnd/rgb1 /
 
Emulation	None
mDNS Discovery	Enabled
mDNS Advertise	Webserver
 
ESP Chip id	1749358
Flash Chip id	1327328
Flash size	1024kB
Program flash size	1024kB
Program size	445kB
Free program space	492kB
Free memory	26kB

I have included in my configuration.yaml file :

  
mqtt:  
  broker: 192.168.1.103
  port: 1883  
  client_id: home-assistant-1  
  username: chris  
  password: icomic740  
 
light:  
  - platform: mqtt
    name: "Living Room Light"
    state_topic: "stat/rgb1/light/status"
    command_topic: "cmnd/rgb1/light/set"
    brightness_state_topic: "stat/rgb1/brightness/status"
    brightness_command_topic: "cmnd/rgb1/brightness/set"
    rgb_state_topic: "stat/rgb1/rgb/status"
    rgb_command_topic: "cmnd/rgb1/rgb/set"
    state_value_template: "{{ value_json.state }}"
    brightness_value_template: "{{ value_json.brightness }}"
    rgb_value_template: "{{ value_json.rgb | join(',') }}"
    qos: 0
    payload_on: "ON"
    payload_off: "OFF"
    optimistic: false

_On startup the console  in the H801's web interface shows:_

00:00:00 APP: Project rgb1 Living Room Light (Topic rgb1 , Fallback DVES_1AB16E, GroupTopic sonoffs) Version 5.3.0
00:00:00 Wifi: Connecting to AP1 Miranda in mode 11N as rgb1 -4462…
00:00:11 Wifi: Connected
00:00:11 mDNS: Initialized
00:00:11 HTTP: Webserver active on rgb1 -4462.local with IP address 192.168.1.107
00:00:13 MQTT: Attempting connection…
17:35:40 mDNS: Query done with 0 mqtt services found
17:35:40 MQTT: Connected
17:35:40 MQTT: tele/rgb1 /LWT = Online (retained)
17:35:40 MQTT: cmnd/rgb1 /POWER =
17:35:40 MQTT: tele/rgb1 /INFO1 = {“Module”:“H801”, “Version”:“5.3.0”, “FallbackTopic”:“DVES_1AB16E”, “GroupTopic”:“sonoffs”}
17:35:40 MQTT: tele/rgb1 /INFO2 = {“WebserverMode”:“Admin”, “Hostname”:“rgb1 -4462”, “IPaddress”:“192.168.1.107”}
17:35:40 MQTT: tele/rgb1 /INFO3 = {“Started”:“External System”}
17:35:49 MQTT: tele/rgb1 /STATE = {“Time”:“2017-09-11T17:35:49”, “Uptime”:0, “Vcc”:3.196, “Wifi”:{“AP”:1, “SSID”:“Miranda”, “RSSI”:64, “APMac”:“00:25:9C:43:90:38”}}


_If I try and switch on the light from the HASS desktop I get  no lights and the switch returns to off afer a few seconds nothing is displayed in the console._

_Known_devices.yaml  finds the H801 and displays it as:_

```python
nbsp_5:
  hide_if_away: false
  icon:
  mac: A0:20:A6:1A:B1:6E
  name: 'Living Room Light'
  picture:
  track: true
  vendor: Espressif Inc.

I am fairly new to homeassistant I have set up several sonoff switches also using Tasmota and MQTT successfully.

If anyone has experience with setting these up their help would be very much appreciated I have been bashing away at this for a couple of days to no avail I think I have propably read everything out there on MQTT and the H801.

Thanks

`

so I am fairly familiar with Tasmota. so let’s keep it simple and start with the basics, what can’t you do?

Thank you for your reply.

I eventually abandoned the Tasmota firmware as a means of controlling the H801 RGBWW light controller and used the firmware written by corbanmailloux (esp-mqtt-rgb-led).

I had a lot of problems configuring Tasmota and eventually I managed to change a lights single colour in Home assistant by manually sending mqtt commands of the nature of home/rgb/set PWM3 200 in the mqtt developer tool but could not find any way of practically controlling a light that way, unlike the panel available to me in Home assistant when using corbanmailloux (esp-mqtt-rgb-led).

I would be very interested in knowing if there is a way of using Tasmota to control lights in a similar way to esp-mqtt-rgb-led it has the H801 listed as a supported module.

Thanks again

I would encourage you to revisit Tasmota. I have been able to do things in 20 minutes with it that would otherwise take weeks to accomplish. The biggest downfall I’ve seen is the same issue we’re both in, and that is changing colors. Tasmota requires HEX, and HA wants binary. I did just see a thread where the user edited his mqtt.py file to enable hex. check it out here.

alternatively check out this from Bruh.

let me know if you need any help with Tasmota.

Thanks for your suggestions.

I am familiar with Bruhs project with leds but unfortunately they are for digital led strips and mine are for a load of home-brew RGB down lights.

I am also running possibly mistakenly Hassio and a search of my file system suggests I don;t have a file mqtt.py and anyway I think with my limited newbie skills with home assistant. Yaml,. MQTT, and esp8266 programming this may be beyond me.

I have a second H801 with Tasmota flashed so experimenting is still very possible.

Thanks again

in linux…
find / -name “mqtt.py”

NOTE: you might have to do this as sudo. IE sudo find / -name “mqtt.py”

good luck

Hi Guys,

this is solved HERE