News for hackers. Stuff that matters.
Re:Reprogramming a $13 consumer wifi-enabled outlet by kogepathic on Saturday November 25, 2017 @05:06PM (#15778262)
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, and Alexa integration. Espurna also supports sending data directly to InfluxDB which is very handy.

If you want to monitor power consumption as well, I can highly recommend the Sonoff POW. [4] Although to get a plug you will need to butcher an extension cable or power strip. If you only want to monitor power consumption and don't want to have the relay, it's quite easy to solder across the relay in the Sonoff POW and use it only as a power monitoring device.

Just a reminder to anyone working with these devices: never, ever connect UART while the device is plugged into AC!!

[1] https://www.itead.cc/smart-socket.html

[2] https://www.itead.cc/wiki/S20_Smart_Socket

[3] https://bitbucket.org/xoseperez/espurna/wiki/Hardware.md

[4] https://www.itead.cc/sonoff-pow.html

Re:Reprogramming a $13 consumer wifi-enabled outlet by luma on Saturday November 25, 2017 @06:29PM (#15778569)
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 by joelhaasnoot on Sunday November 26, 2017 @11:38AM (#15781633)
Perfect, just used this to hook up my Christmas lights. Had an opened Sonoff device laying around that I had yet to flash. Put screws in and 5 minutes later had my lights working. Much easier than the 4 pin serial flash solution
Re:Reprogramming a $13 consumer wifi-enabled outlet by StavrosK on Saturday November 25, 2017 @07:04PM (#15778687)
Thank you for this. You just saved me lots of disassembly.
Re:Reprogramming a $13 consumer wifi-enabled outlet by lucaspiller on Saturday November 25, 2017 @10:13PM (#15779262)
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.
Re:Reprogramming a $13 consumer wifi-enabled outlet by janekm on Sunday November 26, 2017 @12:06AM (#15779517)
From looking over their schematics and layout, they are fairly well designed, and they have gone through CE certification so fine for European consumers.

No UL certification could be an issue for US consumers though.

Re:Reprogramming a $13 consumer wifi-enabled outlet by IgorPartola on Sunday November 26, 2017 @02:34AM (#15779860)
I understand CE to basically be self certified. It’s good but mostly meaningless when compared to bring UL listed or higher, which require equipment tests as well as frequent drop in visits from UL people to your manufacturing fascilies.
Re:Reprogramming a $13 consumer wifi-enabled outlet by janekm on Sunday November 26, 2017 @03:17AM (#15779973)
They have undergone testing by a third-party test house for their CE certification. While you're right that in many cases CE can be self-certified, this is not (really) the case for mains equipment, the testing required by the European standards are such that it would be difficult to perform yourself.
Re:Reprogramming a $13 consumer wifi-enabled outlet by amelius on Saturday November 25, 2017 @08:00PM (#15778891)
> never, ever connect UART while the device is plugged into AC!!

Why?

Re:Reprogramming a $13 consumer wifi-enabled outlet by nitrogen on Saturday November 25, 2017 @08:41PM (#15779022)
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 by janekm on Saturday November 25, 2017 @11:59PM (#15779499)
The "POW" device is one example of a device which has GND at live potential, so should not be connected to anything else while plugged into the mains.

Not that I would recommend plugging any of them into the mains with the case removed, or while plugged into other wiring, to be sure!

Re:Reprogramming a $13 consumer wifi-enabled outlet by amelius on Sunday November 26, 2017 @06:05AM (#15780361)
> The "POW" device is one example of a device which has GND at live potential

Is that even allowed by the FCC?

Re:Reprogramming a $13 consumer wifi-enabled outlet by detaro on Sunday November 26, 2017 @06:13AM (#15780378)
Yes, that's a quite common design. It might be forbidden if you expose that outside the device, but in electronics internal to the device you can do that no problem.
Re:Reprogramming a $13 consumer wifi-enabled outlet by amelius on Sunday November 26, 2017 @12:22PM (#15781876)
It sounds to me like the ground level is exposed outside the device in this case.
Re:Reprogramming a $13 consumer wifi-enabled outlet by detaro on Sunday November 26, 2017 @12:29PM (#15781933)
Unless I'm missing something I don't think so. The case has mains voltage in and switched mains voltage out only, to touch the low-voltage bits with the weird ground level you have to crack open the case. Which is kind of encouraged by open design that's easily hackable, but something that falls under "well, if you do that you're supposed to know what you are doing".