Any RGB WW + CW Controller?

In reply to your contribution on the tasmota github issues :
This is the relevant part from my configuration.yaml

  - platform: mqtt
    name: "Upstairs"
    state_topic: "stat/h80102/RESULT"
    state_value_template: "{{ value_json.POWER }}"
    command_topic: "cmnd/h80102/POWER"
    payload_on: "ON"
    payload_off: "OFF"
    availability_topic: tele/h80102/LWT
    payload_available: "Online"
    payload_not_available: "Offline"
    rgb_command_topic: "cmnd/h80102/COLOR"
    rgb_state_topic: "cmnd/h80102/STATUS11"
    rgb_value_template: "{{ value_json.StatusSTS.Color.split(',')[:3] | join(',') }}"
    brightness_command_topic: "cmnd/h80102/DIMMER"
    brightness_state_topic: "stat/h80102/DIMMER"
    brightness_value_template: "{{ value_json.Dimmer }}"
    brightness_scale: 100
    on_command_type: "brightness"
    qos: 0
    optimistic: false
    retain: false

Also i have this in automations.yaml :

- action:
  - alias: read MQTT Power states on start-up
    data:
      payload: ''
      topic: cmnd/h80102/POWER
    service: mqtt.publish
  condition: []
  id: '1519993573961'
  trigger:
  - event: start
    platform: homeassistant
1 Like

Still getting {“Command”:“Unknown”}
Here my MQTT Settings in Sonoff:
image

And here the light cfg:

light:
  - platform: mqtt
    name: 'H801-201'
    state_topic: "stat/H801-201/RESULT"
    state_value_template: "{{ value_json.POWER }}"
    command_topic: "cmnd/H801-201/POWER"
    payload_on: "ON"
    payload_off: "OFF"
    availability_topic: tele/H801-201/LWT
    payload_available: "Online"
    payload_not_available: "Offline"
    rgb_command_topic: "cmnd/H801-201/COLOR"
    rgb_state_topic: "cmnd/H801-201/STATUS11"
    rgb_value_template: "{{ value_json.StatusSTS.Color.split(',')[:3] | join(',') }}"
    brightness_command_topic: "cmnd/H801-201/DIMMER"
    brightness_state_topic: "stat/H801-201/DIMMER"
    brightness_value_template: "{{ value_json.Dimmer }}"
    brightness_scale: 100
    on_command_type: "brightness"
    qos: 0
    optimistic: false
    retain: false

Can you show the output from tasmota web console ?
For example :

14:33:28 CMD: somerandomcommand
14:33:28 MQT: stat/h80102/RESULT = {"Command":"Unknown"}

Not exactly sure what you mean. Here is the whole log after a reboot:

So the namespace (or whatever it is called in MQTT) seems fine, eg.: cmnd/H801-201/<command>

00:00:00 Project sonoff Sonoff (Topic H801-201, Fallback H801-201, GroupTopic sonoffs) Version 5.12.0
00:00:00 WIF: Connecting to AP1 FritzBox in mode 11N as H801-201...
00:00:03 WIF: Connected
00:00:03 DNS: Initialized
00:00:03 HTP: Web server active on H801-201.local with IP address 192.168.178.201
00:00:05 MQT: Attempting connection...
00:00:06 MQT: Connected
00:00:06 MQT: tele/H801-201/LWT = Online (retained)
00:00:06 MQT: cmnd/H801-201/POWER = 
00:00:06 MQT: tele/H801-201/INFO1 = {"Module":"H801","Version":"5.12.0","FallbackTopic":"H801-201","GroupTopic":"sonoffs"}
00:00:06 MQT: tele/H801-201/INFO2 = {"WebServerMode":"Admin","Hostname":"H801-201","IPAddress":"192.168.178.201"}
00:00:06 MQT: tele/H801-201/INFO3 = {"RestartReason":"Software/System restart"}
00:00:14 MQT: tele/H801-201/STATE = {"Time":"1970-01-01T00:00:14","Uptime":"0T00:00:13","Vcc":3.137,"Wifi":{"AP":1,"SSId":"FritzBox","RSSI":100,"APMac":"CC:CE:1E:B4:77:F6"}}
00:01:23 CMD: somerandomcommand
00:01:23 MQT: stat/H801-201/RESULT = {"Command":"Unknown"}
00:01:37 CMD: cmnd/H801-201/POWER
00:01:37 MQT: stat/H801-201/RESULT = {"Command":"Unknown"}
00:01:41 CMD: cmnd/H801-201/POWER%20ON
00:01:41 MQT: stat/H801-201/RESULT = {"Command":"Unknown"}
00:01:52 CMD: cmnd/H801-201/POWER%20TOGGLE
00:01:52 MQT: stat/H801-201/RESULT = {"Command":"Unknown"}
00:02:00 MQT: tele/H801-201/UPTIME = {"Time":"1970-01-01T00:02:00","Uptime":"0T00:01:55"}

can you post the output of status 0

The Time isn’t correct. Currently checking why… it does make many DNS request to the timeserver but doesn’t set it, anyway but it shouldn’t matter with this issue.

00:01:18 CMD: status 0
00:01:18 MQT: stat/H801-201/STATUS = {"Status":{"Module":20,"FriendlyName":"H801-201","Topic":"H801-201","ButtonTopic":"0","Power":0,"PowerOnState":3,"LedState":0,"SaveData":1,"SaveState":1,"ButtonRetain":0,"PowerRetain":0}}
00:01:18 MQT: stat/H801-201/STATUS1 = {"StatusPRM":{"Baudrate":115200,"GroupTopic":"H801s","OtaUrl":"http://domus1:80/api/arduino/sonoff.ino.bin","Uptime":"0T00:01:15","Sleep":0,"BootCount":106,"SaveCount":204,"SaveAddress":"F8000"}}
00:01:18 MQT: stat/H801-201/STATUS2 = {"StatusFWR":{"Version":"5.12.0","BuildDateTime":"2018-02-09T14:54:51","Boot":31,"Core":"2_3_0","SDK":"1.5.3(aec24ac9)"}}
00:01:18 MQT: stat/H801-201/STATUS3 = {"StatusLOG":{"SerialLog":2,"WebLog":2,"SysLog":0,"LogHost":"domus1","LogPort":514,"SSId1":"FritzBox","SSId2":"indebuurt2","TelePeriod":300,"SetOption":"00000009"}}
00:01:19 MQT: stat/H801-201/STATUS4 = {"StatusMEM":{"ProgramSize":485,"Free":516,"Heap":22,"ProgramFlashSize":1024,"FlashSize":1024,"FlashMode":3}}
00:01:19 MQT: stat/H801-201/STATUS5 = {"StatusNET":{"Hostname":"H801-201","IPAddress":"192.168.178.201","Gateway":"192.168.178.1","Subnetmask":"255.255.255.0","DNSServer":"192.168.178.4","Mac":"60:01:94:6F:91:E7","Webserver":2,"WifiConfig":3}}
00:01:19 MQT: stat/H801-201/STATUS6 = {"StatusMQT":{"MqttHost":"192.168.178.5","MqttPort":1883,"MqttClientMask":"H801-201","MqttClient":"H801-201","MqttUser":"homeassistant","MAX_PACKET_SIZE":1000,"KEEPALIVE":15}}
00:01:19 MQT: stat/H801-201/STATUS7 = {"StatusTIM":{"UTC":"Thu Jan 01 00:01:19 1970","Local":"Thu Jan 01 00:01:19 1970","StartDST":"Thu Jan 01 00:00:00 1970","EndDST":"Thu Jan 01 00:00:00 1970","Timezone":4}}
00:01:19 MQT: stat/H801-201/STATUS10 = {"StatusSNS":{"Time":"1970-01-01T00:01:19"}}
00:01:19 MQT: stat/H801-201/STATUS11 = {"StatusSTS":{"Time":"1970-01-01T00:01:19","Uptime":"0T00:01:15","Vcc":3.138,"Wifi":{"AP":1,"SSId":"FritzBox","RSSI":100,"APMac":"CC:CE:1E:B4:77:F6"}}}

can you activate debug output ? Main Menu / Configuration / Configure Logging / Web log level = 4 More debug

Then send an mqtt command, and post the console output ?

By the way, how are you sending the mqtt commands ? Home Assistant + Mosquitto, or some other MQTT app ( mqtt.fx, mqttlens, … ) ?

Trying to turn on via Home Assistant:

00:00:47 RSL: Received Topic cmnd/H801-201/DIMMER, Data Size 3, Data 100
00:00:47 RSL: Group 0, Index 1, Command DIMMER, Data 100
00:00:47 MQT: stat/H801-201/RESULT = {"Command":"Unknown"}

So MQTT is working fine it is the command that is not working. If it’s MQTT fault then it would work when I typ the command in the console, right?

Could you say say a command that would turn on the light via console? Tried POWER ON, TOGGLE, COLOR, COLOR 1,1,1, COLOR #333, COLOR 333 all with cmnd/H801-201 Prefix and without.

From the console you would type power on , or power off , or dimmer
No prefixes or anything.
example :

17:05:41 CMD: power on
17:05:41 MQT: stat/h80102/RESULT = {"POWER":"ON"}
17:05:41 MQT: stat/h80102/POWER = ON (retained)
17:05:44 CMD: power off
17:05:44 MQT: stat/h80102/RESULT = {"POWER":"OFF"}
17:05:44 MQT: stat/h80102/POWER = OFF (retained)
17:05:50 CMD: dimmer
17:05:50 MQT: stat/h80102/RESULT = {"Dimmer":100}

I’im guessing the mqtt command is wrong, here is what i get when turning the device on :

17:09:44 RSL: Received Topic cmnd/h80102/DIMMER, Data Size 3, Data 100
17:09:44 RSL: Group 0, Index 1, Command DIMMER, Data 100
17:09:44 MQT: stat/h80102/RESULT = {"POWER":"ON","Dimmer":100,"Color":"255,255,255,0,0","CT":499}
17:09:45 CFG: Saved to flash at F5, Count 5517, Bytes 1648

what is the output of setoption15 ?

Umm I had only tried it with %20 in the console which um wasn’t that clever since this is for URL encoding.

I set debugging to maximum for everything now it’s not responding anymore. Gonna reflash give me a second :roll_eyes:

if you don’t have the serial console connected, there’s no use in sending all the debug info to serial :stuck_out_tongue:
if you aren’t hosting a syslog server, there’s no use in sending all the debug info to a syslog server :stuck_out_tongue:

Yeah wasn’t that clever. Okay I’m back and Power on command works until I set the correct device in the settings.

After that nothing works anymore.

for posterity :
Setoption15 needed to be set.

2 Likes

Hello,

since I had to try something until I had the H801 satisfactorily integrated, I would like to share my way here. I connected an LED strip with RGB WW CW to the H801 and wanted to be able to address all color channels. With the following way it is possible to control all color channels through a lovelace card:

Flash H801

Connect Tasmota to the mqtt server and enter the following in the console:
#Teach him it’s an H801
modules 20
#Activates the PWM LED control (0) or the control by dimming / colour commands (1 = default)
Set option15
#Smother transition at color change
Fade 1
Speed 4

Helpful information about mqtt commands
https://forum.creationx.de/lexicon/index.php?entry/17-commands-10-licht-pwm-led-ws281x-rgb-led/

For embedding in HomeAssistant I have done the following things:
Configuration of light:

  • in configuration.yaml
light: !include_dir_list includes/light/
  • in includes/light/led_h801_controller2.yaml
platform: mqtt
name: led_h801_controller2

state_topic: "stat/led_h801_controller2/RESULT"
state_value_template: "{{ value_json.POWER }}"

command_topic: "cmnd/led_h801_controller2/POWER"
payload_on: "ON"
payload_off: "OFF"

availability_topic: tele/led_h801_controller2/LWT
payload_available: "Online"
payload_not_available: "Offline"

brightness_command_topic: "cmnd/led_h801_controller2/DIMMER"
brightness_state_topic: "stat/led_h801_controller2/RESULT"
brightness_value_template: "{{ value_json.Dimmer }}"
brightness_scale: 100
on_command_type: "brightness"

rgb_command_topic: "cmnd/led_h801_controller2/COLOR"
rgb_state_topic: "stat/led_h801_controller2/RESULT"
rgb_value_template: >-
  {%- if value_json.POWER == 'OFF' -%}
    0,0,0
  {%- else -%}
    {{ value_json.Color.split(',')[:3] | join(',') }}
  {%- endif -%}


white_value_command_topic: "cmnd/led_h801_controller2/CT"
white_value_scale: 500
white_value_state_topic: "stat/led_h801_controller2/RESULT"
white_value_template: "{{value_json.CT}}"

qos: 0
optimistic: false
retain: false

Installation of light-entity-card

Frontend entry, manual card (yes, the nesting of the stacks is not quite nice, but I was too lazy to remove it)

cards:
  - cards:
      - brightness: true
        brightness_icon: weather-sunny
        color_picker: true
        effects_list: false
        entity: light.led_h801_controller2
        full_width_sliders: true
        group: true
        persist_features: false
        show_slider_percent: false
        smooth_color_wheel: true
        type: 'custom:light-entity-card'
        white_icon: thermometer
        white_value: true
    type: horizontal-stack
type: vertical-stack

I just used one of these ZigBee controllers, works like a charm, plug and play.

GLEDOPTO LED Strip Controller