Sonoff-HomeAssistant (Alternative firmware for Sonoff Switches for use with mqtt/HA)

@ivandal77

Glad to hear you got it working! :slight_smile:

I have about 6 or so of these on my network. All running tasmota.
They are working perfectly. No issues.

I’ve switched to the tasmota version and now it’s working fine. Thanks for the help.

Guys

Anyone out there with Sonoff Basics that wants to help test the new firmware I have ready for them. Let me know. Thanks

What is the new firmware supposed to do?

Did I miss it somewhere?

Two other bits of advice for anyone newly installing these…

  1. Make sure that your power wires don’t get too close to the wifi antenna. I had one working perfectly fine when I was testing it in “free air” but when I stuffed it into a box along with all the wiring it started chattering when the switch was on. I fixed it by rerouting the wiring inside the box to the side of the switch opposite that of the antenna.

  2. Don’t install too close to a microwave oven. It will also cause the relay to chatter while the microwave oven is running if your oven is powerful enough.

2 Likes

You didn’t miss it because I haven’t made it public yet. The new version is simpler to setup in terms of mqtt name / hostname etc which is now automatically generated, includes all versions in one and publishes some diagnostic info like wifi signal strength to help in situations like you mentioned above to allow you to position the switch or your router a little better.

3 Likes

I have a few in spare/unused so I’d venture to flash one with your latest version.

I’ll give it a try. I have 3 switches hanging around I’m not using yet.

I’m noob enough that if I can figure it out almost anyone can.

Is the wall switch support for the sonoff basic I posted above included in this release?

Yes the basic Sonoff code support a Wall Switch, a DHT22 or nothing. OK leave it with me.

Dear,
strange behaviour noted on my sonoff Pow with Tasmota firmware.
If for some reason the WiFi goes down, and Pow consequently lost the connection with HA, after some time the relay start to cicle every minute… On… Off… On… Off…and the wifi purple led stay alternative on or blink… Until WiFi become again available.
What could be? No idea about.
Thanks,
Ivan

Wificonfig 4 solved the problem… Thanks to Tasmota devel.

Ivan

Looks like that I got some issues with flashing the S20.
Hopefully somebody can help me with it.

The upload looks like oke. See attached screendump but somehow when I check the port there is a error (mode:(3,6)

Hi!
I’m trying to use your code, but when I add your yml configuration to mine home assistant stop working. Can you help me?

Hi, I have only one Sonoff Basic and I’m using your firmware, it works fine but when sonoff starts allways do in on condition, is there an options to select initial state or remember last state? I’m using ESPsonoff-v1.01p.

Thank you

Just ordered a bushel. Thanks for sharing!

Got my Sonoffs working, looks like that my FTDI adapter was not working correctly and tried a different one with succes!

Got communication and can operate them with Home Assistant, only how do I configure my Sonoff 4 CH?

MQTT Topic is : home/sonoff/4ch/01 but what goes wrong here?

Got it nevermend!

Having some problem after a few months of stable, now my sonoff keep lost it connection which I can’t control on home assistant status won’t update but the switch won’t restart itself or won’t change connect. Just out of sudden. Any help? Wifi signal had not problem and the few switch is same room with the router.

In case I configured my Sonoff as descibed by kiratikarnpat. How do I switch it on at sunset?

I assume my trigger looks like the code shown below. But how should I configure the action?

automation:
  trigger:
    platform: sun
    event: sunset
  action:
    service: mqtt.publish
    data:
      topic: "home/sonoff/living_room/1"
      payload: "on"

The automation should trigger the switch entity (which I guess will be named “switch.living_room”)

automation:
  trigger:
    platform: sun
    event: sunset
  action:
    service: switch.turn_on
    entity_id: switch.living_room

Hi guys,

I have just recently connected my basic Sonoff to my garage door using this tutorial: http://www.boized.com/2017/02/how-to-convert-wifi-sonoff-into-dry.html. It works fine with the original firmware.

So, at this point in time, which alternate firmware provides the easiest way to connect a Sonoff to Home Assistant? I am reading about ESPeasy, Tasmota…

Thanks!