Sonoff Basic is an affordable device that provides users with smart home control. It is a WiFi-based wireless switch that can connect to a wide range of appliances.
Options:
- Using original firmware
- Replace the firmware (recomended)
Using original firmware Status colour Yellow title BETA
colour | Yellow |
---|---|
title | BETA |
This integration allows you to explore new capabilities of this device, connecting it to the OpenDevice platform (without changing the original firmware), allowing it to be controlled through an open server, and using the APIs to develop solutions with that device.
Integration is provided by the extension: sonoff-bridge
Info |
---|
At present support for extensions is only allowed in private clouds / raspberry or you can replace the firmware ATTENTION: It does not work with devices running firmware version >= 1.6! you need replace the firmware (or check status of this) |
Tested Devices:
- Sonoff Dual (firmware 1.3)
Setup Wizard
Download the setup tool (***-standalone.zip), it will prepare the sonoff to connect to the opendevice server. It takes advantage of protocol security "failures", to configure the device and integrates it into OpenDevice
TIPs: It may be necessary to repeat this process more than once.
Settings:
- ApiKey: Get API Key
- Server: For local local installations use your LAN IP (Ex.: 192.168.2.121)
- Default port: 8989
Installation
Status | ||||
---|---|---|---|---|
|
- Setting-up the Server
- Download JAR
- Next drop jar file into /libs of OpenDevice
Restart OpenDevice server: ./bin/opendevice restart
Run Wizard to configure Device
After successful setup, you must see on Devices Page:
Configuration
Status | ||||
---|---|---|---|---|
|
The extension uses a separate ssl certificate for communication with SonOff, by default an embedded certificate is used. If necessary you can specify your certificate by editing odev.conf and adding:
sonoff.ssl.certificateFile=conf/sonoff.cert.pem
sonoff.ssl.certificateKey=conf/sonoff.key.pem
Replace Firmware
Another option if you want to use the official server (cloud.opendevice.io), is to flash a firmware using the arduino library.
Basically SonOff is an ESP8266 !!
See guide: Device Setup (to se how to install OpenDevice and ESP board in Arduino IDE)
Guides for Sonoff flashing : Flashing Custom firmware (External)
Info | ||
---|---|---|
| ||
Select Device: Generic Esp8266, Flash Mode: DOUT Before turning on the SonOff press the reset button, to put into programming mode WARNING: Some devices as the "Sonoff basic" have their own power supply on board. After flash: The USB port does not have enough current to power the module, you need plug it main power |
An example using Sonoff Basic can be found in the examples:
On IDE: File > Examples > OpenDevice > Projects > SonoffBasic
After Flash:
Access http://192.168.4.1 in browser and configure Wi-Fi and set Server and ApiKey
GPIO Locations:
Remote Updates (OTA)
See: Remote Updates (OTA)
Voice Control
An interesting application is to control this device through voice commands, see this guide for more details