Broken/incomplete inclusion of Shelly 2 dimmer via HomeAssistant binding

  • Platform information:
    • Hardware: Raspberry Pi
    • OS: Raspbian Buster
    • Java Runtime Environment: openjdk 11.0.9.1
    • openHAB version: OH 3.1.0

I have followed these instructions successfully for several Sonoff switches (TH16, Basic switch, Tasmota 9.5). I tried this time with a Shelly Dimmer 2 flashed with Tasmota 10.1.0, but something’s not working correctly. I’m getting a bunch of stuff that looks normal, and seems to work, like the internal temp sensor, but I can’t figure out the key things to control the load - dimmer settings and on/off. When I run “SetOption19 1” on the Tasmota page, this is what I see:

14:28:23.733 CMD: SetOption19 1
14:28:23.739 MQT: stat/tasmota_shelly2/RESULT = {"SetOption19":"ON"}
14:28:24.484 MQT: homeassistant/sensor/E42D30_ENERGY_Today/config = {"name":"ShellyDimmer2-1 ENERGY Today","stat_t":"tele/tasmota_shelly2/SENSOR","avty_t":"tele/tasmota_shelly2/LWT","pl_avail":"Online","pl_not_avail":"Offline","uniq_id":"E42D30_ENERGY_Today","dev":{"ids":["E42D30"]},"unit_of_meas":"kWh","dev_cla":"energy","frc_upd":true,"val_tpl":"{{value_json['ENERGY']['Today']}}"} (retained)
14:28:24.490 MQT: homeassistant/sensor/E42D30_ENERGY_Power/config = {"name":"ShellyDimmer2-1 ENERGY Power","stat_t":"tele/tasmota_shelly2/SENSOR","avty_t":"tele/tasmota_shelly2/LWT","pl_avail":"Online","pl_not_avail":"Offline","uniq_id":"E42D30_ENERGY_Power","dev":{"ids":["E42D30"]},"unit_of_meas":"W","dev_cla":"power","frc_upd":true,"val_tpl":"{{value_json['ENERGY']['Power']}}"} (retained)
14:28:24.495 MQT: homeassistant/sensor/E42D30_ENERGY_ApparentPower/config = {"name":"ShellyDimmer2-1 ENERGY ApparentPower","stat_t":"tele/tasmota_shelly2/SENSOR","avty_t":"tele/tasmota_shelly2/LWT","pl_avail":"Online","pl_not_avail":"Offline","uniq_id":"E42D30_ENERGY_ApparentPower","dev":{"ids":["E42D30"]},"unit_of_meas":"VA","dev_cla":"power","frc_upd":true,"val_tpl":"{{value_json['ENERGY']['ApparentPower']}}"} (retained)
14:28:24.502 MQT: homeassistant/sensor/E42D30_ENERGY_ReactivePower/config = {"name":"ShellyDimmer2-1 ENERGY ReactivePower","stat_t":"tele/tasmota_shelly2/SENSOR","avty_t":"tele/tasmota_shelly2/LWT","pl_avail":"Online","pl_not_avail":"Offline","uniq_id":"E42D30_ENERGY_ReactivePower","dev":{"ids":["E42D30"]},"unit_of_meas":"VAr","dev_cla":"power","frc_upd":true,"val_tpl":"{{value_json['ENERGY']['ReactivePower']}}"} (retained)
14:28:24.509 MQT: homeassistant/sensor/E42D30_ENERGY_Factor/config = {"name":"ShellyDimmer2-1 ENERGY Factor","stat_t":"tele/tasmota_shelly2/SENSOR","avty_t":"tele/tasmota_shelly2/LWT","pl_avail":"Online","pl_not_avail":"Offline","uniq_id":"E42D30_ENERGY_Factor","dev":{"ids":["E42D30"]},"unit_of_meas":"Cos φ","dev_cla":"power_factor","frc_upd":true,"val_tpl":"{{value_json['ENERGY']['Factor']}}"} (retained)
14:28:24.515 MQT: homeassistant/sensor/E42D30_ENERGY_Voltage/config = {"name":"ShellyDimmer2-1 ENERGY Voltage","stat_t":"tele/tasmota_shelly2/SENSOR","avty_t":"tele/tasmota_shelly2/LWT","pl_avail":"Online","pl_not_avail":"Offline","uniq_id":"E42D30_ENERGY_Voltage","dev":{"ids":["E42D30"]},"unit_of_meas":"V","dev_cla":"voltage","frc_upd":true,"val_tpl":"{{value_json['ENERGY']['Voltage']}}"} (retained)
14:28:24.522 MQT: homeassistant/sensor/E42D30_ENERGY_Current/config = {"name":"ShellyDimmer2-1 ENERGY Current","stat_t":"tele/tasmota_shelly2/SENSOR","avty_t":"tele/tasmota_shelly2/LWT","pl_avail":"Online","pl_not_avail":"Offline","uniq_id":"E42D30_ENERGY_Current","dev":{"ids":["E42D30"]},"unit_of_meas":"A","dev_cla":"current","frc_upd":true,"val_tpl":"{{value_json['ENERGY']['Current']}}"} (retained)
14:28:24.533 MQT: homeassistant/light/E42D30_LI_1/config = {"name":"Shelly Dimmer 2 #1","stat_t":"tele/tasmota_shelly2/STATE","avty_t":"tele/tasmota_shelly2/LWT","pl_avail":"Online","pl_not_avail":"Offline","cmd_t":"cmnd/tasmota_shelly2/POWER","pl_off":"OFF","pl_on":"ON","stat_val_tpl":"{{value_json.POWER}}","uniq_id":"E42D30_LI_1","dev":{"ids":["E42D30"]},"bri_cmd_t":"cmnd/tasmota_shelly2/Dimmer","bri_stat_t":"tele/tasmota_shelly2/STATE","bri_scl":100,"on_cmd_type":"brightness","bri_val_tpl":"{{value_json.Dimmer}}"} (retained)
14:28:24.553 MQT: homeassistant/sensor/E42D30_status/config = {"name":"ShellyDimmer2-1 status","stat_t":"tele/tasmota_shelly2/HASS_STATE","avty_t":"tele/tasmota_shelly2/LWT","pl_avail":"Online","pl_not_avail":"Offline","json_attr_t":"tele/tasmota_shelly2/HASS_STATE","unit_of_meas":"%","val_tpl":"{{value_json['RSSI']}}","ic":"mdi:information-outline","uniq_id":"E42D30_status","dev":{"ids":["E42D30"],"name":"ShellyDimmer2-1","mdl":"Shelly Dimmer 2","sw":"10.1.0(tasmota)","mf":"Tasmota"}} (retained)

Upon import in OH3, that turns into the following Thing:

UID: mqtt:homeassistant_E42D30:98602dd68d:E42D30
label: ShellyDimmer2-1
thingTypeUID: mqtt:homeassistant_E42D30
configuration:
  topics:
    - sensor/E42D30_ENERGY_Today
    - sensor/E42D30_ENERGY_ApparentPower
    - sensor/E42D30_ENERGY_Current
    - sensor/E42D30_ANALOG_Temperature
    - sensor/E42D30_ENERGY_Power
    - sensor/E42D30_ENERGY_Voltage
    - sensor/E42D30_ENERGY_ReactivePower
    - sensor/E42D30_ENERGY_Total
    - sensor/E42D30_ENERGY_Factor
    - sensor/E42D30_ENERGY_TotalStartTime
    - sensor/E42D30_ENERGY_Yesterday
    - light/E42D30_LI_1
    - sensor/E42D30_status
  basetopic: homeassistant
bridgeUID: mqtt:broker:98602dd68d

The main problem seems to be with the “light” entity. That’s showing up in the GUI as a “Trigger”:


and when I try to bind to it, I get a complaint:

Do I need to supply a specific profile? Do I need to do something different on the tasmota side before importing?

Is there supposed to be a separate channel for on/off, or is it just dimmer=0 and dimmer=100? In the Tasmota GUI, they’re shown separately. Thanks for any guidance.

-Joel

I have worked around my problem. First, I only wanted to use Tasmota on a Shelly device because I had misread the Shelly binding documentation. Somehow I thought I would have to use a Shelly app, or temporarily connect my device to the Shelly cloud, but that turns out not to be true. As long as you can reach the device at its IP address (running factory firmware), and get it onto your local wifi, the Shelly binding will find it when you scan. I haven’t tried this with the dimmer yet, but I also have a Shelly 1 relay, and that’s now working perfectly in Openhab using the Shelly binding.