Sonoff S20 "discovered" simultaneously as S20 and POW R2


My setup consists in a RPi 3 B+ with Home Assistant 0.86.2 (Hassbian), Mosquitto MQTT broker, different sensors and a Sonoff S20 with Tasmota (with Home assistant option activated from firmware).

From S20 console I have:
00:03:23 MQT: homeassistant/light/134F30_LI_1/config = (retained)
00:03:23 MQT: homeassistant/switch/134F30_RL_1/config = {“name”:“Sonoff S20”,“cmd_t”:"~cmnd/POWER",“stat_t”:"~tele/STATE",“val_tpl”:"{{value_json.POWER}}",“pl_off”:“OFF”,“pl_on”:“ON”,“avty_t”:"~tele/LWT",“pl_avail”:“Online”,“pl_not_avail”:“Offline”,“uniq_id”:“134F30_RL_1”,“device”:{“identifiers”:[“134F30”],“name”:“Sonoff S20”,“model”:“Sonoff S2X”,“sw_version”:“6.4.1(sonoff)”,“manufacturer”:“Tasmota”}, “~”:“sonoff_S20/”} (retained)
00:03:23 MQT: homeassistant/light/134F30_LI_2/config = (retained)
00:03:23 MQT: homeassistant/switch/134F30_RL_2/config = (retained)
00:03:23 MQT: homeassistant/light/134F30_LI_3/config = (retained)
00:03:23 MQT: homeassistant/switch/134F30_RL_3/config = (retained)
00:03:23 MQT: homeassistant/light/134F30_LI_4/config = (retained)
00:03:23 MQT: homeassistant/switch/134F30_RL_4/config = (retained)
00:03:23 MQT: homeassistant/light/134F30_LI_5/config = (retained)
00:03:23 MQT: homeassistant/switch/134F30_RL_5/config = (retained)
00:03:23 MQT: homeassistant/light/134F30_LI_6/config = (retained)
00:03:23 MQT: homeassistant/switch/134F30_RL_6/config = (retained)
00:03:23 MQT: homeassistant/light/134F30_LI_7/config = (retained)
00:03:23 MQT: homeassistant/switch/134F30_RL_7/config = (retained)
00:03:23 MQT: homeassistant/light/134F30_LI_8/config = (retained)
00:03:23 MQT: homeassistant/switch/134F30_RL_8/config = (retained)
00:03:31 MQT: sonoff_S20/tele/STATE = {“Time”:“1970-01-01T00:03:31”,“Uptime”:“0T00:03:31”,“Vcc”:3.543,“SleepMode”:“Dynamic”,“Sleep”:50,“LoadAvg”:19,“POWER”:“ON”,“Wifi”:{“AP”:1,“SSId”:“edited”,“BSSId”:“edited”,“Channel”:13,“RSSI”:100}}
00:03:33 MQT: sonoff_S20/tele/STATE = {“Time”:“1970-01-01T00:03:33”,“Uptime”:“0T00:03:33”,“Vcc”:3.544,“SleepMode”:“Dynamic”,“Sleep”:50,“LoadAvg”:19,“POWER”:“OFF”,“Wifi”:{“AP”:1,“SSId”:“edited”,“BSSId”:“edited”,“Channel”:13,“RSSI”:100}}

In Home Assistant I get some sensors as in below picture.

If I go to Home Assistant -> Integrations I find 3 devices discovered (one it is a Sonoff Basic which is disconnected now):

I tried myself to change different settings in Tasmota firmware but i couldn’t correct the issue. Could be a bug?

BTW, when I disable (SetOption19 1) the Home Assistant support from Sonoff all sensors disappear from Home Assistant.

Here are displayed switches in HA:

Thank you for any idea how to solve it.

When you say ALL sensors disappear do you mean for all 3 devices?

If you tap on the sensors in the integration, do they show any data or are they unavailable?

It may well be the options you set in Tasmota… I have a Sonoff SV and I ended up with an extra sensor because of an option I set as well. It was a bugger to get rid of it.

I eventually fixed the options in Tasmota and re-flashed the Sonoff. Then I removed the Integration and also removed the Mosquiot addon in Hassio which deleted the persistence database. Restarted Home Assistant and readied the Broker and MQTT Integration and the zombies were gone. When you re-add them you then need to restart Home Assistant as well.

Yes. I added in the post a new picture with the switches.

They are unavailable and in my opinion should be like this because Sonoff S20 doesn’t have such sensors. They seems related to POW R2, which isn’t yet in my configuration.

I re-installed the firmware few times with different options inside. Last time I disabled all the sensors in Tasmota but the result is the same.

I don’t know if matters, but I am using Hassbian. I will add this in the initial post.

Doesn’t make that much difference… you need to delete the persistence database mosquito.db… in hassio easiest way is to remove the addon, restart and read it. In hassbian, stop the broker, delete the database and restart. WHen you do that is should not have the zombies there…

Unfortunately, removing the sensors won’t remove the zombies from Home Assistant.

Delete the database and remove the integration, restart and then add the integration again and you should be good.

So… Remove the MQTT Integration.
Stop the broker in hassbian and delete the mosquito.db
Restart home assistant and start the broker and add the integration and restart home assistant again and it should be ‘happy’

If after doing this, repeat and before re-adding and starting the broker, edit the /config/.storage/core,device_registry file and delete the buggers. Then restart the broker and add the integration again…

Thank you!

1 Like