Configure Sonoff (flashed with ESP Easy Mega) in HA

I have already for a while Sonoff devices which I automated with scripts. Now I want them to integrate with HA but till now I could not get it work.

Here the settings from my Sonoff:

Here my HA settings (MQTT done with integrations and is working perfectly for zigbee2mqtt):
2019-12-29 21_30_27-Home Assistant

2019-12-29 21_14_44-Home Assistant

And here you can see that the example device is working through node red:

Who can give me a suggestion where I could look or what I did overlook

Use mosquitto_sub to check what is being received on the broker.

Hi nickrout, thnx for thinking with me, the output gives the same result as the Node Red:

Do you see it in developer tools|state page?

1 Like

Hi nickrout,

Yes I see the device there:

And it is also switching from 0 to 1 when I press the button…

Found now also that I can use “switch.sonoff01” in lovelace. Thank you very much. Is it also possible to get an entry in the Device list?

I am not sure about that. I think that might require mqrr discovery. Does esp easy support ha discovery?

I have read something about it but then you need to compile the code yourself, I will check or I will look for another firmware which is enabled for ha discovery. If that is the trick I will google on that. Thank you for you very fast responses…

Tasmota has ha discovery built in. Esphome.io is also very nice.

Hi nickrout,

I have solved it with Tasmota, thnx. Here are the steps I did for documentation to others:

Downloaded the latest version from Tasmota on https://tasmota.github.io/docs/#/Home

I have set the wifi and Home Assistant settings (SetOptionXX) through serial console termite (https://www.compuphase.com/software_termite.htm):

  • ssid1 “the wifi ssid”
  • Password1 “password from ssid”
  • SetOption19 1
  • SetOption59 1
  • FriendlyName sonoff01
  • Topic sonoff01

After that I have filled in the following through the web interface:

  • Configuration Module --> selected the Sonoff model
  • MQTT --> my Host, User and Password

Now I have the Sonoff as I would like to have, Sonoff integrated in HA.