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

Is it possible to flash without soldering?

Like with Pogo pins (which?) or other?

I flash all Sonoff products w/o soldering. Most have small holes. Use jumper-wires and hold them in place.

2 Likes

Stick wires in holes. Bluetak on top to hold them in :smiley:

I tried and failed.

Jumper wires?

How you do about the switch needed in flashing?

Hi,

@KmanOz - is it possible to get support for the DS18B20? I bought one from Itead for the TH10. I guess it would be a rather simple adjustment of your code.

I can help in doing it but have never used git to contribute to someone else code.

hey guys i have a problem , i spent the whole day for trying to flash my sonoff touch but nothing works.

i get this error (see link): https://gyazo.com/f60d9cd5ae64c8b97ca2392c78fd606f

and this is how i wired it to the TFDI (see link) https://gyazo.com/8794e5b35d48681c86d7d24466262783

i even tryed to swap the tx and rx cable but its not working , i ground gpo0 when turning on and it goes into programm mode (blue leds goes flashing on sonoff touch) but when i try to upload i get that error

this is are my arduino settings (see link) https://gyazo.com/410cecee6b275cd56d19e4d85a4f30c9

i sellected the right com port .

Can someone help me with this ? thanks.

Jumper wires:

https://cdn.antratek.nl/media/product/e4a/7-jumper-wires-30-stuks-sfe11026-25f.jpg

Stick them in the holes, hold in place. Hold button (on Sonoff) down and connect programmer usb to pc. Release button. Upload sketch. Done.

Connect like this:

TX to RX
RX to TX

Sorry in advance for the noobish question, but will the Sonoff’s esp8266/protocol ever be natively supported by HASS like Amazon Alexa? I have all the hardware to flash these now, but just curious as to why we need to re-flash and wanting to learn more about HA.

Thanks for all the work guys.

Hello, it worked for me by choosing Generic ESP8285 Module for Arduino IDE flashing.

Hi, I am totally new to this. Can someone please tell me the hardware requirements? I want my basic sonoff to work with my google home.

Did you watch this video? https://www.youtube.com/watch?v=-JxPWA-qxAk

You want MQTT not the default firmware that sends data to a Chinese server :wink:

having the great majority of people, their routers configured for UPnP, its a security risk to have this gadgets with their native software.
BTW , Home Assistant is my primary reason for having started to automate my house, and at the same time, be able to have a fast initial implementation, and at the same time having all the control on the solution.
Had some slow when it cames to new gadgets, as because I had opt to stay with assembly my own things *sensors , temp, humidity . movement, relays for lights.
At this time, I.m pending the serial USB to serial to flash the SONOFFs , as I don’t intend to have them connected with builtin code.
cheers and keep safe

Yes I have seen the video, and also his 30 min video and also his MQTT video, but this thing is completely new to me, so i didn’t understand whether I actually need a raspberry pi or what…

Hey guys, i have been trying to flash the sonoff wifi switch. But am getting these errors in the Arduino IDE while it is compiling. Here is the link to the code: ESPsonoff-v1.01p.ino

This picture shows the error

The different values for the mqtt and wifi are not real in this picture as i know people will see it. I have already try to flash it using another PC and i have also downloaded the different libraries many times already. Please help me. Thanks.

I think you are using knolleary PubSubClient, and not the one Kmanoz stated, this.
Try replacing the library in your arduino library folder, and try again.

1 Like

Well the idea of putting new firmware on the sonoff is so it can interact with a mqtt server. An mqtt server can run on any device but you do need one to capture the messages send by the sonoff.
Now to also do something with those messages arriving at the mqtt server you need another application and we here are using Home Assistant.
Home Assistant (as well as an mqtt server) can run on a pi3 but also on other devices.

Regarding the actual uploading of the new firmware to the sonoff the video explains that you do that by connecting the sonoff to your usb port via a TFDI Adapter. The adapter, the wires the sonoff you can all buy from aliexpress or so. As mentioned in the video descriptions. So for uploading the firmware you don’t need a pi, just a normal computer.

I hope this helps a little bit.

Yes, you are right. I am now able to compile it. Kindly please check your inbx. Thnks

Thanks! that does help a lot! But if I need to be able to control from outside my home, i need an active server all the time, which would be on the raspberry pi 3 B , am i right?
Also, if i am sending a on/off signal from my google home app from outside my house , how does the information flow from my app to the sonoff?