The iLumos range of smart light switch and dimmers work very nicely. They install easily into UK as they don't require a neutral connection which is often not present in UK lighting switch points.
They use 433MHz transmissions from their remote controls as well as having the touch sensitive controls on their face plate. If one wants to control them from an App or to use voice control like Alexa then the recommended method is to use a Broadlink RM controller which can transmit either IR or 433MHz rf messages. As the protocol is not built in then one has to train the Broadlink product to learn the remote control signals. It is difficult to do this training and even when apparently successful it does not produce a reliable result. I think this is due to the fact that the iLumos protocol is quite difficult to distinguish from normal background 433MHz noise and so the trained signal that the Broadlink reproduces is not a good representation of what is required.
This instructable is how to make a reliable controller. To do this the rf messages from the remote controls were captured and analysed so that they could be properly reproduced in a 433Mhz transmitter.
Details of the protocol and format of these messages is included in the documentation but it is not necessary to understand this in order to build and use this replacement controller.
The controller uses a ESP8266 wifi microcontroller in the form of a module (ESP-12F). THis can receive web commands and convert them into the message format required and then send them via a simple low cost 433Mhz transmitter module. A lot of it is based on a previous IR controller that can send out codes to IR devices like TVs etc. The IR functionality has been retained so that the same controller can be used for both iLumos and a range of IR devices. It is also possible to add on other 433Mhz devices like plug in sockets by just adding in configuration text files via the web interface.
Step 1: Components and Tools Required
The following components are needed
- ESP-12F wifi module
- 433Mhz transmitter module
- voltage boost converter
- 3.3V regulator
- 220uF 6V capacitor
- IR diode
- n channel MOSFET (AO3400)
- 47R resistor
- 4K7 resistors x2
- 100K resistor x 1
- USB micro socket
- hook up wire
- Enclosure; used a 3D printed case -
The following tools are needed
- Fine point soldering iron
- Epoxy glue
- Raspberry Pi and 433MHz receiver to capture codes
Note that the case I used was kept as small as possible and used SMD components.. If a larger enclosure is used then it is possible to use larger components like NodeMCU esp8266 modules.
Step 2: Schematic
The circuit is very simple.
The ESP-12F module is powered from a USB 5V socket via a linear 3.3V regulator.
The 5V is used as the power source for the IR diode and is also boosted via a module to 10V. This is used as the power source for the 433MHz. The simple TX modules can be used directly with a 5V source but running them from 10V increases the transmit power and the range. Some TX modules will run from the 3.3V supply but again might be slightly lower power.
GPIO14 is used as the modulated output for both IR and 433MHz signals. In the IR case it is modulated by a carrier (typically 38KHz) but for RF usage it controls the transmit on / off signal directly. Although the IR will be transmitting whenever RF messages are sent they cannot be confused with normal IR messages.
Step 3: Construction
Construction is very simple.
I make up the IR part as a separate little module with the MOSFET transistor and its gate resistor directly soldered to the leg of the LED to minimize size. I then add some epoxy resin to secure it.
The regulator and decoupling capacitor is mounted direct onto the ESP-12F module.
The rest is just using hook up wire to connect up the power and the data signal.
I make an antenna for the 433MHz connection using the method described in https://www.instructables.com/id/433-MHz-Coil-loaded-antenna/
Step 4: Software and Initial Configuration
The software is built in an Arduino environment.
Source code for this is at https://github.com/roberttidey/iLumos
The code can have some constants changed for security purposes before being compiled and flashed to the ES8266 device.
- AP_PORT defines the listening port for receiving commands
WM_PASSWORD defines the password used by wifiManager when configuring device onto local wifi network
AP_AUTHID defines an authorisation code that must be sent with each command to authorise it.
update_password defines a password used to allow firmware updates.
When first used the device enters wifi config mode. Use a phone or tablet to connect to the Access point set up by the device then browse to 192.168.4.1. From here you can select the local wifi network and enter its password. This needs only to be done once or if changing wifi networks or passwords.
Once the device has connected to its local network it will listen for commands. Assuming its IP address is 192.168.0.100 then first use 192.168.0.100:AP_PORT/upload to upload the files in the data folder. This will then allow 192.168.0.100/edit to view and upload further files and also allow 192.168.0100:AP_PORT to be used to send test commands.
The source code read me contains further instructions on sending controlling commands, macro commands, and hooking the device up to the Alexa service.
Step 5: Capturing Codes
iLumos switches have to be first paired with their controlling device. This is described by the iLumos instructions and involves putting the device in pairing mode and then sending it an ON command. This then allows the device to recognise further commands using the paired address contained in each message.
Two strategies are possible for using the controller here.
Firstly you can capture the codes from existing iLumos remotes and then use the controller to replicate these.
Secondly, new addresses can be used for this controller and the devices then paired to the new address using the command codes already identified in existing remotes.
I prefer the former method.
The source code on github includes a utility which can be run on a Raspberry Pi using a 433MHz receiver board to capture the codes from iLumos remotes. Instructions for this can be found in the protocol description PDF on that site.