A QObject with slots to control the operation of an ESP8266 controlled relay running custom firmware, in a custom enclosure. Relay Module here: WIFI Relay Module
If not already done, the ESP8266 addon package needs to be added to the Arduino IDE. Sparkfun has a good guide for this.
In order up upload the custom WiFi Relay firmware to the ESP8266, GPIO0 must be held low while the RESET pin rises from low to high.
The schematic from this site shows a two button setup to put the ESP8266 in this bootloading state. This needs to be done before each upload.
A USB to serial converter needs to be connected to the TX/RX pins broken out on the side of the relay module, as well as ground.
Set the access point name and password of your choosing in the sketch, then upload. Thats it!
Needs CONFIG += network
in .pro
file.
The following slots are available for controlling the relay over WiFi
void onSetRelayState(bool state)
void onSetRelayOn()
void onSetRelayOff()
The following signals are provided to inform the user of the relay's status
void emitRelayError(QString)
void emitRelayState(bool)
void emitDeviceVerified(bool)
There is a two part enclosure that fits around the module, the STL files are available in the enclosure folder.