Years ago I started building RF devices to measure temperatures and switching lights on or off. I even wrote a small book (in Dutch) about my findings and experiments. But I always wanted to overcome the main disadvantage of RF devices: no feedback about the status of the lights. I thought that could be done better and with the introduction of the small ESP8266 WiFi enabled processors it could! But SONOFF beat me with there WiFi enabled switches. One great disadvantage of the SONOFF devices is the poor software. To make the switches usable you have to upload third party (mainly Open-Source) firmware and install a Home-Automation solution to control the switches. Another disadvantage of the SONOFF switches is.. well they are switches (Switch OnOff). So there is room for improvement!
Albeit: I introduce to you: DONOFF (Dimmer On Off)!
The goals of this project is to make an ecosystem that is self sustained. So: you don’t need a Home-Automation system to control the DONOFF devices! Also, there is no substitute for a physical switch (ask your spouse)! You can attach an external toggle– or push-switch to the DONOFF hardware with which you can either switch the light On or Off (toggle-switch) and you can dim-up and dim-down the the light by long-pressing the (push) switch.
Every DONOFF has a web-server on board that you can use directly from any (Javascript enabled) browser. Accessing the web-server on a browser gives you the control page for this device:
I will, in four parts, explain how you can build and use this DONOFF eco-system.
- Part 1 – Introduction (this part)
- Part 2 – The Electronics
- Part 3 – The Firmware
- Part 4 – Building a DONOFF device
Every DONOFF installation has one DONOFF designated as a Master whilst all the others are designated as Slave. From the Master’s webpage all the other devices can be controlled. Slave’s automatically register to the Master with their IP-address and Device Name. If you power-up a new DONOFF device it will automatically be added to the Master’s page. If you unplug a DONOFF device it will (after a while) disappear from the Master’s page.
Switches are always shown below the dimmers (yes, you can upgrade a SONOFF switch to this eco-system but for obvious reasons it will not have the dimmer functionality).
The controls have the following function:
Every DONOFF device has a unique hostname (i.g. “floorlamp”) and an indication of which lamp it controls (i.g. the “Floor Lamp”). With the slider you can control the brightness of the lamp. Clicking on the Toggle-Switch-icon will turn the device “On” or “Off”, which does not affect the slider controlled brightness of the lamp. The lightbulb-icon shows whether the lamp is “On” or “Off”. Every DONOFF device has a settings page to control the various attributes of the device. Clicking on the “Settings-icon” brings you to this page.
The attributes have the following meaning:
this Device
Here you can give this Device a hostname. The IP-address is assigned by the DHCP server in your network and can (will) change every time you reconnect the DONOFF device (but this will not affect the installation as the new IP-address will automatically be updated)
Device Role
This can either be “Server” or “Client”. Be aware: there can only be one (1) server in your installation!
Master
If this Device is a Slave, than you must enter the Master credentials. Every Master has a hostname “DONOFF” that can not be changed. But you sould enter the Master’s IP-address!
Device Type
This can either be “Dimmer” or “Switch”. A Switch can only be “On” or “Off” (obviously)
BuiltIn Led pin
This is the GPIO pin at which a Built In Led is connected (GPIO1 for an ESP-01, GPIO16 for a NodeMCU, GPIO13 for a SONOFF basic etc.)
External Switch
This is the GPIO pin at which an external switch is attached. On the DONOFF board with the ESP-01 this is GPIO2You have to indicate the type of external switch. Either “Toggle” or “Push”. A Push switch gives, besides the On/Off functionality also the ability to dim-up or dim-down the light
PWM out
On the DONOFF board with the ESP-01 this is GPIO3. On the SONOFF basic this is GPIO12 (for a switch type there is no PWM but only HIGH [1] or LOW [0])
Min Percent
This is the lowest value (in percent) at which the Led lamp still glows
Max Percent
This is the maximum percentage you will control using the slider or push-switch. Normally this will be 100(%)
default Light State
The value used by a Toggle-switch if the light is switched On
device Label
The name of the light as shown on the web-page of this Client or on the DONOFF server’s web-page
======================================================
So far for this short introduction of the DONOFF eco-system.
In the next part I will introduce the DONOFF electronics.
Comments
Please log in or sign up to comment.