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

This is a Belkin WeMo. Notice the relay used. It is also switching Active only. Everyone does it and this is an approved device.

Sonoff has adequate isolation. Notice the air gaps in the PCB. I’m not saying they’re perfect, but a dangerous device, I think not.

Ask an electric engineer of your country. He will tell you.

the connector is way out of standard, that is where it all starts.

The problem is not the single switching, as many unipolar switches are. WHich BTW should be used for low power appliances only. For high power appliancves you use bipolar switches by law in any country: both line and neutral need to be disconnected.

As per the Wemo, the line and neutral are well separated, and the connection is with a standard (and safe) plug

yeah that’s true I just checked, that’s ok, but in addition is also missing a firm grip on the electric cable (the screw that holds the copper filament is not enough)

these sonoff switches will NEVER get any electrical approval for home use in any country of the world,
hence they are illegal for home use. In a certified lab … perhaps … you can use it

@KmanOz nothing wrong with your firmware - I like it a lot and appreciate your efforts.
Having a bathroom (or hallway etc.) light depend on WIFI, a server and my willingness to leave it alone :slight_smile: would spell disaster with my co-inhabitants. Some limited autonomy would be pretty high on my wish list too. Since your Firmware reports back the current status of the switch this information can then be used for some more elaborate automation.
Not complaining, mind you, just my two cents.

Well you should look at different firmware. I have no plans to include autonomy in the switches. Why, when they’re connected to HomeAssistant. I have a lot here, and I have PIR’s that trigger them with HA. The setup has never missed a beat for 1 1/2 years since Iv been running HA. The point of this firmware is for people who want HA to do all the smarts, not the Sonoff itself. It’s not for everyone and that’s fine too. Plenty of other solutions for you to try.

Like I said above. I understand they won’t get approval. They are not dangerous though like you make out. Anyway, I have said enough. Thanks for your input Claudio.

What I don’t understand: you spend hours trying to flash your Sonoff’s with @KmanOz’s firmware and when you don’t succeed you declare these switches dangerous and unsafe ?

3 Likes

what I don’t understand why you are arguing about a product that is illegal to be used in home, because it can kill.

if that matters to you, I realized the dangerousness of the product when I inserted the line and neutral to the sonoff socket, after the firmware flash

they don’t get approval, because they are dangerous, not for any other reason

Tried the OTA firmware and keep getting Wifi disconnects am i the only one?

---------------- Sonoff Powerpoint v1.01tOTA -----------------

Unit ID: esp8266-95C225
Connecting to EPM Wifi . . . . . . . . . . WiFi FAILED!


WiFi connection . . . . . . . . . . LOST

ets Jan 8 2013,rst cause:1, boot mode:(3,6)

load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
v3de0c112
~ld

---------------- Sonoff Powerpoint v1.01tOTA -----------------

Unit ID: esp8266-95C225
Connecting to EPM Wifi . . . . . . . . . . WiFi FAILED!


Have tried both P and T version that are not OTA and am getting the same results. Might be the unit I guess. Anything else you guys would recommend. It worked fine before so not sure what happened.

You mention 1 Channel Inching /self-locking WiFi Wireless Switch 5V 12V under the supported HW List. I have 2 units but so far I’ve not been able to flash your firmware onto one of them. Any idea how to get this device into flashing mode? I tried holding either button during power-up but no luck (I’m using PlatformIO)
The switches I’ve received from Itead have an additional row of connectors but I’ve not been able to determine where they go. Any idea? a?
Thanks

Well… the Sonoff TH 10/16, Pow and Dual are actually C E certified (note that the Sonoff “basic” does not have the C E certification).
I may agree that C E certification doesn’t say so much, but you cannot say that they are completely dangerous and illegal. They are also sold by some European web shop and they couldn’t do that if they were “illegal”.

they are dangerous and totally illegal. That piece of paper means nothing. The fact that they are sold in shops also means nothing: if a person get elecrified, the owner of the shop goes most probably to jail (even if he is not the manufacturer)

Maybe they are dangerous, but, A lot of people in these fora build all kind of appliances and hang them on the net, a few know about the standards that should be held into account when building appliances for the grid, but many don’t.
Playing with the grid is for many people dangerous, but it is a choice.

I don’t think they are more dangerous then many DIY appliance but that is my opinion, else if you don’t like what you see don’t buy them build them yourself from ground up. If you do not know what you are playing with or else make them safer, add extra space to the back of the plastic case, reroute the wires.

There are a lot of options, one remark never use them in a wet or damp environment, or make sure you step up the insulation, but the ones I use never run hot do what they must do, else build a shutdown rule into the sonoff with an NTC, and I have seen quite a few brands of iot appliances with CE that run hot, or go up in a puff of smoke.

Do what you want to do, and think!

If you dare use a SONOFF, remember never hang it on the grid when programming, and if you don’t know what you are doing or you don’t feel safe with the grid then please stay away from it, commen sense I guess.

Hi KmanOZ, you are right, but then again I had so much trouble installing and setting up HASS and getting it to run flawless. But that is the fun so yes it might get tough sometimes using an IDE, but this is all DIY, and there are a lot of great people on fora that will help you when you ask, If you want it easy dont start with domotics open source, see the fun of it. Else you have to pay many thousends of dollars, euro’s more for an installer that installs a industrial home automation.
And there are great instruction movies on the web that teach you howto do it.

Secondly, Logic… Sometimes it is easier to have your rules on a central place I agree, but there are instances that do not require the HASS installation to do command, you only need to see the status update. you can do a PIR switches a light in rules in the 8266 itself, and set a status update to HASS, or as I mentioned if you like to make a sonoff safer install a NTC or another temp measuring sensors, make a switch off rule in it, and only send a status update to HASS, this way when HASS goes down and it sometimes does your SONOff or other apliance has a little intelligence of its own, bit like our painreceptor, nerve feels pain, and orders muscle to retract, and… sends a message to your brain from hey danger. Simple I guess.

What have you tried in terms of troubleshooting to get it going?

Do I? I don’t think I do actually. I know the firmware works on a SV (low voltage) version of a Sonoff only because someone told me they used it and it works. I said nothing about the relay controller though because I don’t have one here to test so cannot help further at this stage. Sorry.

If your network is working correctly (and I assume anyone who installs a home automation system will make sure their underlying network works correctly) there is ZERO need for a dumb switch to become intelligent. MQTT is such a lightweight protocol designed for this specific purpose. If your network cannot handle receiving a few bytes of information, you have bigger issues.

As for a NTC. What you’re saying is, install an NTC into a unit that doesn’t have one for safety. OK well you will have to add additional circuitry to support the NTC because by itself it’s just a component. Then you will need to trap the condition where the NTC triggered, send a message to HA while the Sonoff is overheating or store that condition (because supposedly power has been cut) and when power is restored tell your Home Automation system that it happened. If the Sonoff is overheating then you are either overloading it or it has had some internal malfunction. How are you cutting power off to the Sonoff completely in the first place? You can’t unless you add additional circuitry before the actual Sonoff to completely isolate it from power based on whether the NTC triggers. I can argue that all the additional circuits if not done correctly would be more of a fire hazard in themselves. Have I got this wrong? Please explain.

Give me an example of that instance?

Claudio, yes we all get after the 10th time. Can you give it a break. I think you have made your point. Thanks

1 Like

@ soundbug

Have a look at this link

http://support.iteadstudio.com/support/discussions/topics/11000009218

I can confirm this firmware will work on these but you will loose the self locking function

If the firmware works then that’s just pure luck. I have no features to specifically support that board in the firmware because as I said above I don’t have one here to test. Sorry.