Itead wifi sockets


(moskovskiy82) #1

Stubled upon the itead smart wifi socket. Unlike orvibo - it has an EU grounded socket and also runs on ESP8266. Any experience with those? And what about openhab integration?


(Nick Reichley) #2

I don’t have the sockets but do have three Sonoff-MQTT-OTA/itead wifi switches. Flashed with code from arendst’s project on github and use mqtt binding syntax to control them. Nice reprogramming of outlets via mqtt (once flashed) to change and check status info.


(moskovskiy82) #3

I have read about the sonoff and the MQTT firware. The question is if in these sockets flash pins are also easily accessible and if the same firmware can be flashed


(moskovskiy82) #4

Ok got my hands on those. Dissassembly is easy. Just one screw and some internal plastic clips and it rips open.
There are 4 pins accessible vcc,gnd, tx,rx
So the only question remaining if it’s safe to flash the https://github.com/arendst/Sonoff-MQTT-OTA


(moskovskiy82) #5

Ok… I can report successfully flashing the EASY ESP. Everything is working.
Not to figure out the items definition.
As the socket can be switched on and off by using MQTT /ESPNAME/gpio/12 channel. But it reports the state on
/ESPNAME/Relay/Switch channel. Any ideas?

Tried it like this with no luck. Can switch on and off but no state.

Switch	zal_rozetka01	"Socket"	<poweroutlet>	{mqtt=">[mqt:/Rozetka-01/gpio/12:command:ON:1],>[mqt:/Rozetka-01/gpio/12:command:OFF:0],<[mqt:/Rozetka-01/Relay/Switch:state:default]"}

In the logs i get

2016-07-30 09:11:39.908 [INFO ] [marthome.event.ItemStateChangedEvent] - zal_rozetka01 changed from ON to OFF
2016-07-30 09:11:40.019 [WARN ] [b.core.events.EventPublisherDelegate] - given new state is NULL, couldn't post update for 'zal_rozetka01'

(Karel Kuna) #6

Hi, I had similar issue with configuration of SONOFF in OH - no way to get status back to OH when I switched relay by button on SONOFF even when I see it in MyMqtt on phone - SONOFF send topic with status but message was not processed in OH. - My issue was OH expect for Switch state “1” or “ON”, “0” or “OFF”.
SONOFF with MQTT OTA firmware from https://github.com/arendst/Sonoff-MQTT-OTA-Arduino send status “On” or "Off"
Solution is add mapping On to ON and Off to OFF.
Check what exact message is published by your switch and in case message content is not exact ON or OFF or 1 or 0 you can try this:

Switch	zal_rozetka01	"Socket"	<poweroutlet>	{mqtt=">[mqt:/Rozetka-01/gpio/12:command:ON:1],>[mqt:/Rozetka-01/gpio/12:command:OFF:0],<[mqt:/Rozetka-01/Relay/Switch:state:MAP(onoff.map)]"}

and you need to create onoff.map file with translation between your data for both ON, OFF states.
In my case content of file is:

On=ON
Off=OFF

OpenHAB powerboard
(Tommy Sharp) #7

Looks like they have release a few more products… I do like the idea of the one with real time power usage reporting.
I can’t tell from the webpage but can anyone see serial headers for reprogramming?

https://www.itead.cc/sonoff-pow.html

EDIT : Looks like it does still have serial headers for reprogramming!


( ) #8

These sockets received their own thread:


( ) closed #9