SonoffS22 Switch

I got a couple of these from lightinthebox and eventually got it working in the EWelink app and also got it working with my Google Home/Google Assistant.

Is this switch supported in Home Assistant?

I ran into a problem setting it up and eventually worked out my WiFi password was not accepted by the switch and I then set it up on the guest network and it’s working in the app and in google home.

Not directly, however if you flash it with Tasmota firmware you will be able to control it with MQTT

No idea how to do that - they are sealed switches like wemo - can I flash them over wifi?

Have a look here, there is an OTA component you could use.

They should come apart.
Read this Link

I have a couple on order, I’ll know more when they arrive.

Had a look… not sure how to do it from that.

I’m not a solderer

By the looks of the pic, you don’t need to be. There is a 4 pin header already soldered to the board, I would assume that the pins are RX TX 3V and GND used to flash the board.

Well he talks about soldering pins o the header so I don’t believe you are right. The photos don’t really help me much unfortunately. I’m not opposed to tinkering and opening up and flashing but I can’t make head nor tail of either of the links that have been posted.

Is it possible to use Home Assistant > IFTTT to send a command to the switch via Google Assistant? It’s working in Google assistant so if I can make a ‘switch’ in Home Assistant that triggers a google assistant action I think that’s a work around without screwing anything up.

Even if there is no header on the board, you can just hold a 4 pin header in while you flash the board, just press it in. This is what I do as I flash the boards so infrequently I don’t bother to solder headers on.

The basics for flashing any Sonoff board is download Arduino IDE, have a USB UART TTL 3.3V Converter/Programmer (e.g. CP2102, CH340G, FT232, PL2303) and some jumper wires to connect from the UART to the Sonoff board. It’s a pretty simple process.

There are many very good Youtube Videos on how to do it, Dr Zzs has a good video on how to do it, explained well and easy to understand. His blog is here and video here.

If you like long delays, you could probably use IFTTT.

He always argues with the right answer if he doesn’t like what it says.

1 Like

Oh please. Grow up.

Thanks for the blog and video link I’ll take a look at those.

I found this one on ebay… USB to TTL UART 6pin Module Serial Converter Cp2102 STC PRGMR Cable AU for sale online | eBay but how does that then connect to the Sonoff? Is there some king of header I also need so I can connect the wires to the board?

Have you watched the video? He VERY clearly shows how to connect the UART to the Sonoff using header pins pushed into the board. 7:05 in the video to be specific.

I have watched it actually and also watched and tried to OTA method which didn’t work. I’ll look again at 7:05

Just looked again… I think we have a different definition of ‘clear’ I see him putting a cable on the board… That item I purchased seems to show plugs not pins on the end.

The UART you linked to shows female to female leads in the picture, you attach one end of the leads to the UART board pins, the other end to a set of header pins, then connect to the Sonoff board, as he does in the video.

It really is that easy.

So I need to buy some header pins as well then?

Yes, header pins are always handy.

While I’m waiting for the parts to arrive I set it up using IFTTT (Webhooks and Ewesmart integrated) Pretty simple and not too laggy either.

When I flash the Tasmota, I’m guessing it will only connect to the SSID I configure? I have had issues with the sonoff working with my WLAN as it seems it does not like the “63 Printable ASCII characters hashed down to 256 binary bits” password I’m using so I had it set up on my Guest LAN with a less complicated password. Is there likely to be a limitation to the type of password I can use with Tasmota? (I know if it does not find a LAN it knows it will use a default SSID etc)

The Tasmota firmware is set up to connect to either 1 of 2 preset ( at compile time) access points or, failing that, it will configure itself as a web server on an address in the 192.168.1.xxx address space so you can set it up.
I haven’t looked at the source to determine the maximum key length it can accomodate. It does appear to be unhappy about a long SSId.