YAWS - Yet Another Wireless Switch

That's, frankly, pretty useless for the most of people. I did it just to satisfy my own vision how perfect smart switch should work :slight_smile:

It's almost Sonoff Basic with few functional differences:

  • Tiny size, half volume of Sonoff.
  • Keep last state and restore it on power failure/restore.
  • MQTT ready.
  • Firmware OTA.
  • Report result of switching of relay (OK or Error, total 8 statuses).
  • Report Error if power circuitry to load damaged, good for fused loads.
  • Report Error if load is not connected: bulb burnt, for instance.
  • Sensitive load status measure: 1W and up load, limited with relay current rating.

In Github repo following topics are covered:

  • Pictures;
  • Hardware design (both electronics and mechanics);
  • ESP8266 code;
  • Node-RED code example;
  • Installation instructions.

As downsides of the project versus Sonoff:

  • Higher BOM;
  • You can't buy it (although you can build it :slight_smile: )

Thoughts for improvement are welcome.


I'm no expert but some of those tracks look a little close together for mains power handling? I guess maybe at the 2A you are limiting yourself to, you may be OK but you might want to add another warning about handling higher loads?

It also looks like you are passing the negative and positive mains power tracks on different sides of the board? Is that safe practice? All the mains boards I've ever seen (admittedly not that many) have the mains tracks on the same side of the board with air-gaps between them.

Limit of 2A comes from practical use. In our era of LEDs and CFLs bulbs rare consumer uses more than 400W in one circuit for light. Therefore, I thought 2A is even more than enough. For my 5 YAWS devices deployed, the highest consumption is about 80W, the lowest is 3W (a bit more than 100mA).

400W being 1.6A at 240v but a little over 3A for the USA at 120v.

You need to take peak voltage into account as well of course as that can be significantly higher with some loads.

Anyway, as I say, I'm no expert by any means and I'm not trying to take away from the excellent project. Just making sure people understand the potential limitations - or to be corrected by more knowledgeable people.