Archive:MQTT-controlled power sockets: Difference between revisions
Jump to navigation
Jump to search
You are visiting an old member project. The information found on "MQTT-controlled power sockets" might be out of date.
(Created page with "{{project |name = MQTT2RCswitch |description = MQTT controller for remote controlled power sockets |status = beta |author = tiefpunkt |username = |versi...") |
No edit summary |
||
Line 1: | Line 1: | ||
{{outdated|type=member project}} | |||
{{project | {{project | ||
|name = MQTT2RCswitch | |name = MQTT2RCswitch |
Revision as of 12:10, 10 September 2022
MQTT2RCswitch Release status: beta [box doku] | |
---|---|
Description | MQTT controller for remote controlled power sockets |
Author(s) | tiefpunkt |
Platform | ESP8266 |
License | MIT |
Download | https://github.com/munichmakerlab/mqtt2rcswitch |
We have a bunch of remote controlled power sockets at the space, and wanted to control them via our space automation tools.
Building
Hardware
- ESP8266
- A 433Mhz transmitter. Look at https://github.com/sui77/rc-switch/wiki/List_TransmitterReceiverModules for examples
We used a WeMos D1 mini board for the ESP8266. It's powered over USB, and provides 5V to the RF module. The Data pin of the module is connected to GPIO 4 (Pin D2), and works just fine with the 3.3V of that pin.
Software
- Arudino IDE for ESP8266
- rc-switch
- pubsubclient
Usage
Send the following to the MQTT topic defined in config.h
, e.g.mumalab/room/rcsockets
:
type,house_code,device_code,action
with the options
type
- Type of RF sockets used, according to https://github.com/sui77/rc-switch/wiki/HowTo_OperateLowCostOutlets (which is missing type D). Only implemented types are "a" and "d" right now.house_code
anddevice_code
- Whatever is set on the socket as addressaction
-1
for switching on,0
for switching off