Itead Sonoff might be good to consider

Hello all,
Is there any chance to have Sonoff smart devices implemented into the project? (there are switch, multiswitch, humidity/temperature controlled switch, gate controller, smart socket etc.) ESP8266 based with Web Server and MQTT custom firmware (Tasmota-Sonoff).
It would be great to have them implemented as it is possible to cover the whole smart home with it.

BTW Thank you for great job

1 Like

Kajmaj – I completely agree. I was recently at Linux Conf Australia, and most DIY and even commercial IoT activity involved using Sonoff devices because of their low cost compared to alternatives. I just ordered a couple, so I’m on your side, hoping to see an add-on adapter developed while we sort out if they can support behaving as native web things directly (native web thing support implies no need for a custom gateway adapter). I know a couple community developers who like the Sonoff products too – I will ping to see if they can help with an adapter.
-kg

Kathy - OEM Sonoff FW works in closed environment. For test purposes I flashed one device with custom FW and it is possible to control it via web now, need to know IP only. It offers possibility to use MQTT and Domoticz as well. I am trying to explore this possibilities now. Due to their broad portfolio (various devices like temperature/humidity switch, power metering switch, dual channel, 4 channel, light, touch switch etc.) I thing that more than one adapter will be needed.
Anyhow, to have a possibility to control it through Mozilla IoT wold be great.

Hi Kajmaj,
can you tell me what is the custom firmware you have used?
I am interested to use this switch via web and I too would like to integrate Sonoff in mozilla IoT.
Maybe I could do some tests

This is a very nice device. Stay tuned for mozilla WoT support…

Hi bit
currently all of my sonoffs are on Sonoff-Tasmota and I am controling them via MQTT. Nonetheless to access a single device through web is possible as well.
To flash it is relatively easy.
Due to the broad range of devices it is good basis for home automation.

Consider me tuned!

This looks like a very cheap way to get started. In the next couple of weeks I’ll be able to start playing with the gateway and these devices are super cheap. Please let me know if you’re successful.

Any movement in this area?

From what I’ve seen, the main difficulty with Sonoff is that we’ll need to get the Pi to connect to the WiFi network the Sonoff device creates during its pairing process. Doing this is incompatible with all the other pairing processes that would normally take place at this time (e.g. the philips hue and tp-link adapters both expect to be talking to their devices over internet).

I think the most likely approach for now is to create a utility which pairs the gateway with the sonoff independently so it doesn’t mess with other devices.

It is misunderstanding I guess.

I would separate two things:

  1. Sonoff with OEM FW (out of the box)
  • is controlled solely via remote cloud through eWeLink app ( either Android or iPhone), furthermore is compatible with Alexa, Nest, FTTT but there is no direct access/control from PC possible.
  • Internet access is required to control it (yeah, there is a hardware button as an option).
  1. Sonoff with custom FW (for example Tasmota, but there are more)
  • is accessible directly (via IP) from any device able to browse web
  • controlled via MQTT
  • compatible with Domoticz
  • compatible with almost any other home automation SW
  • compatible with dozens sensors
  • it can work within WIFI LAN, internet access is not needed
  • it is highly customizable (from both HW and FW side)
  • R Pi is one of compatible means only :wink:

There are a few cons or challenges rather to say :

  • user have to flash custom FW ( several ways how to do it exist)
  • lost guarantee of cheap, but reliable device (based on my experience)

Based on above, I believe that Sonoff deserved to be included :slight_smile:

Indeed, for those who aren’t familiar with the device you will need to solder on some headers and use a separate FTDI programmer to connect USB to serial input. Once that is done, writing some code to interact with the relay and indicators is fairly straightforward. However, for the more feature-rich products from Itead coding is going to be less straightforward. They do have a product that monitors energy usage (i.e. kWh) but creating custom firmware to make it a Web Thing is obviously going to be more involved. One interesting feature of the Sonoff is being able to pair it with a key-fob (an accessory from Itead). If you can get your firmware to talk via RF you then have a way of doing things like setting the WiFi SSID and password.

Once that’s done, share your code and we’ll all benefit. :grinning:

I think we should go directly to itead and ask them to enable Sonoff devices to act as native web of things compatible devices. Ping me if you have an inside connection. In general it should be easier and cheaper (requires less up front as well as ongoing resources) if ODMs produce and maintain devices that simply advertise themselves as web things. As users, we don’t want to see devices automatically hooked up to cloud services. We might want to run them in an environment without Internet access. Especially bad are devices that are connected to the cloud via proprietary silo’s with no exposed APIs. :frowning:

Hey Kathy,

After writing my last post, I came to the same conclusion. That’s what standards are for right?

I have to admit my surprise that the Sonoff dual and basic are not supported. An extremely common use case is to use these modules with TASMOTA firmware.

To flash the firmware no soldering is required… in fact, most versions can be flashed wirelessly.

I will see if I can find a way to get them working when I have my dongle.

If I have the time this weekend, I’ll publish a platform-io project to control the classic sonoff switch through the GateWay.
Don’t expect a fancy UI like Tasmota or ESPurna…

I would be happy to give it a try. Would your example reflash the sonoff device to turn it into a native web thing? or go through some other gateway addon? Ideally Sonoff and other commercial Wi-Fi (or wired) devices that support IP comms would be sold with native web thing support.

For this test I don’t care if I need to hard code a Wi-Fi ssid and password into the Sonoff device firmware.

Ultimately though, for commercial devices, it would be nice to have a universally recognized and broadcast ssid/password that all native web things default to looking for when they are unprovisioned. (The ubiquitous “provisioning channel” would be isolated and all network traffic dead-ended to the AP that is broadcasting it.) The temp connection would be enough for users to “find” new IoT/WoT devices and authorize them (or not) to obtain secure/private network credentials.

1 Like

The first iteration will be just that, bare bones flashable firmware with hard coded settings. Only for the enthusiastic and the community.

Kathy @ kgiori majority of Sonoff devices is possible to flash with a custon FW using original OTA mechanism.
After flash it acts as a native web thing, with own web API, no further gateway is needed.
You can access them within closed intranet (home wifi, etc) without access to the NET.
It offers (after flash) complete independence on OEM cloud/gateway, broader portfolio of sensors etc.

I have S26 with stock fw … tell me if there is anyone interest into connecting it.

Any luck building a PlatformIO project to reflash a Sonoff smart plug as a web thing? Given a working solution, it will be easier for itead to learn how to support the native web thing API out of the box, for all their IoT products. No need for something fancy, just a technical implementation that works. And in the meantime it would let those of us with existing units turn them into native web things too.