Sonoff Dimmer D1: Powers On Randomly

Tags: #<Tag:0x00007f73a5f8e858>

Hi All – I managed to flash a Dimmer D1 w/ Tasmota successfully, however I have the following issue. It powers on rather randomly, not even being recognised as ON within Home Assistant.

From the logs, I managed to get this:
`

ESP-DMP: AA 55 01 04 00 00 05
ESP-CFG: Saved to flash at F4, Count 80, Bytes 4096
ESP-MQT: stat/tasmota_DB2C7B/RESULT = {“POWER”:“ON”,“Dimmer”:100}
ESP-SRC: Light
ESP-CMD: Group 0, Index 1, Command “DIMMER”, Data “100”
ESP-SRC: MQTT
ESP-MQT: Received Topic “cmnd/tasmota_DB2C7B/dimmer”, Data Size 3, Data “100”
ESP-MQT: stat/tasmota_DB2C7B/POWER = OFF
ESP-MQT: stat/tasmota_DB2C7B/RESULT = {“POWER”:“OFF”}
ESP-CMD: Group 0, Index 1, Command “POWER”, Data “OFF”
ESP-SRC: MQTT
ESP-MQT: Received Topic “cmnd/tasmota_DB2C7B/power”, Data Size 3, Data “OFF”
ESP-MQT: Subscribe to cmnd/DVES_DB2C7B_fb/#
ESP-MQT: Subscribe to cmnd/tasmotas/#
ESP-MQT: Subscribe to cmnd/tasmota_DB2C7B/#
ESP-MQT: cmnd/tasmota_DB2C7B/POWER =
ESP-MQT: tele/tasmota_DB2C7B/LWT = Online (retained)
`
Is this helpful? What can it be done to fix this?

TIA!

Did you add

retain: true

when you configured the dimmer in HA ?

Here’s my configuration:

 - platform: mqtt
   name: "Summerhouse Canopy"
   command_topic: "cmnd/tasmota_DB2C7B/power"
   state_topic: "stat/tasmota_DB2C7B/POWER"
   brightness_state_topic: "stat/tasmota_DB2C7B/dimmer"
   brightness_command_topic: "cmnd/tasmota_DB2C7B/dimmer"
   brightness_value_template: '{{value_json.RfReceived.Dimmer}}'
   brightness_scale: 100
   payload_on: "ON"
   payload_off: "OFF"
   retain: true

retain : true caches the command, and can cause all kind of weird effect, including randomly power on.

You have to do 2 things :

install mqtt explorer and remove the retained message

remove the line ‘retain : true’ from your configuration and restart HA (but only after removing the retained message from your broker)

Thanks @francisp! How do I remove the retained message from MQTT console?

Easiest way is to use mqtt explorer

Else :

Hi mate,
Do you have some instructions on how to flash the D1 with tasmota?
Much appreciated!

Using an FTDI-adapter. GPIO needs to be connected to GND when you insert your FTDI-atapter in your USB-port. The pad is visible in the picture.