Live data from Hacker News

Reprogramming a $13 consumer wifi-enabled outlet

rluckom.github.io

11–20 of 44 posts

Re: Reprogramming a $13 consumer wifi-enabled outlet

#11

This looks quite similar to the Sonoff S20. [1] Although they opted for the ESP module instead of designing a custom PCB around the ESP8266 chip as Sonoff does. According to the S20 schematic, uart is routed to a header, so it should be easier to flash. [2] The Sonoff S20 is the same price as the mentioned model, and is supported by espurna. [3] Espurna is great, it has MQTT, Domoticz, Home Assistant, an HTTP API, an…

I'm also a fan of the Sonoff products for random use cases around the house. One thing I think should be noted - you no longer need to solder in a UART header to get your own firmware on Sonoff devices with the SonOTA project [1]. This project uses the factory OTA mechanism to load your own custom firmware on the device. The result is an IOT device that is cheap, readily available, and fully under your own control with no hardware modifications necessary!

[1] https://github.com/mirko/SonOTA

Re: Reprogramming a $13 consumer wifi-enabled outlet

#12
post #8

wifi seems overkill to send on off signals. i would use 433mzh

Given the ESP8266 brings a WiFi radio and 32bit microcontroller for < $2 on your BOM I think this sort of overkill is warranted. 433mhz provides no mechanism for link-layer security which seems irresponsible in this day and age.

Re: Reprogramming a $13 consumer wifi-enabled outlet

#13

I really enjoyed reading this, but it wasn't entirely clear to me what the author planned to reprogram the unit to actually do. So from my perspective, the article ended abruptly when the author declared success even though I was looking forward to a description of the conclusion. The story is important and often overlooked in these moments. It's what justifies spending a hundred hours and $200 to achieve something y…

In my case, I simply wanted a plug where I could know what code runs on it. I love everything Sonoff makes for that exact reason, I've bought a lot of their stuff (including their wifi light switches).

The switches are especially handy because you can program them to do anything, not just switch lights on and off. For example, you can program your bedroom switch to turn off all lights with a long press. Theoretically, anyway, as I haven't yet gotten mine so I haven't tried it with that particular model in practice.

Re: Reprogramming a $13 consumer wifi-enabled outlet

#14
post #11

This looks quite similar to the Sonoff S20. [1] Although they opted for the ESP module instead of designing a custom PCB around the ESP8266 chip as Sonoff does. According to the S20 schematic, uart is routed to a header, so it should be easier to flash. [2] The Sonoff S20 is the same price as the mentioned model, and is supported by espurna. [3] Espurna is great, it has MQTT, Domoticz, Home Assistant, an HTTP API, an…

I'm also a fan of the Sonoff products for random use cases around the house. One thing I think should be noted - you no longer need to solder in a UART header to get your own firmware on Sonoff devices with the SonOTA project [1]. This project uses the factory OTA mechanism to load your own custom firmware on the device. The result is an IOT device that is cheap, readily available, and fully under your own control wi…

Thank you for this. You just saved me lots of disassembly.

Re: Reprogramming a $13 consumer wifi-enabled outlet

#15
post #12
post #8

wifi seems overkill to send on off signals. i would use 433mzh

Given the ESP8266 brings a WiFi radio and 32bit microcontroller for < $2 on your BOM I think this sort of overkill is warranted. 433mhz provides no mechanism for link-layer security which seems irresponsible in this day and age.

ITEAD do make a 433 MHz version of this stuff, but yes, that's just asking for trouble, given how trivially I can sniff and replay those codes.

Re: Reprogramming a $13 consumer wifi-enabled outlet

#16

This looks quite similar to the Sonoff S20. [1] Although they opted for the ESP module instead of designing a custom PCB around the ESP8266 chip as Sonoff does. According to the S20 schematic, uart is routed to a header, so it should be easier to flash. [2] The Sonoff S20 is the same price as the mentioned model, and is supported by espurna. [3] Espurna is great, it has MQTT, Domoticz, Home Assistant, an HTTP API, an…

> never, ever connect UART while the device is plugged into AC!!

Why?

Re: Reprogramming a $13 consumer wifi-enabled outlet

#17
A few months ago there was a similar post about Edimax power sockets and the Raspberry Pi. I commented that I'd like to automatically reset my WiFi router/modem when the Internet connection fails.

Someone commented to tell me about the ResetPlug, which does just that. I'm now the very happy owner of one.

I don't mean that as a advert, but as an encouragement that when you comment useful links to products that already exist, it does make a difference, and I appreciate it. (not spam, but user recommendations).

Re: Reprogramming a $13 consumer wifi-enabled outlet

#18
post #16

This looks quite similar to the Sonoff S20. [1] Although they opted for the ESP module instead of designing a custom PCB around the ESP8266 chip as Sonoff does. According to the S20 schematic, uart is routed to a header, so it should be easier to flash. [2] The Sonoff S20 is the same price as the mentioned model, and is supported by espurna. [3] Espurna is great, it has MQTT, Domoticz, Home Assistant, an HTTP API, an…

> never, ever connect UART while the device is plugged into AC!! Why?

If I remember right, some very low cost ways of converting AC to DC for small electronics leave those electronics at high voltage relative to ground. So the device itself sees +5V relative to its "ground", but the device "ground" might actually be at, say, 115V and the supply at 120 to make 5V. Thus the UART pins might also be at high absolute voltage. This is fine for devices that are fully isolated.

Re: Reprogramming a $13 consumer wifi-enabled outlet

#20

This looks quite similar to the Sonoff S20. [1] Although they opted for the ESP module instead of designing a custom PCB around the ESP8266 chip as Sonoff does. According to the S20 schematic, uart is routed to a header, so it should be easier to flash. [2] The Sonoff S20 is the same price as the mentioned model, and is supported by espurna. [3] Espurna is great, it has MQTT, Domoticz, Home Assistant, an HTTP API, an…

It should be noted that Sonoff devices are not UL Listed, unlike the device the article discusses. Given that and how Chinese product companies like to cut corners with these type of devices (see bigclivedotcom on YouTube), I’m not sure I’d trust connecting one of these to mains voltage.
Post reply on HN