mqtt-ir-transceiver
Gateway between MQTT and IR signal
Setup an IR receiver on pin 3, an IR transmitter on pin 0 (DEBUG MODE).
Download the included libraries to your arduino IDE libraries folder (please take care of having the last versions of library), for example previous versions of pubsubclient.h could generate compilation errors) Upload the sketch to your ESP8266 Connect to the ESP8266 directly by wifi, adress should be 192.168.4.1 Enter your configuration parameters (if you don't have an mqtt user and password just set nothing) You are ready
If you need to reset the config file just connect pin 6 to the ground (DEBUG MODE).
##Usage
Controller → Device communication
Property | Message format | Description | Example |
---|---|---|---|
_mqtt_prefix_/sender/storeRaw/_store_id_ | \d+(,\d+) | store raw codes sequence in slot no. _store_id_ | Topic: "_mqtt_prefix_/sender/storeRaw/10" Message: "32,43,54,65,32" |
_mqtt_prefix_/sender/sendStoredRaw | \d+ | Transmit via IR RAW code from provided slot | Topic: "_mqtt_prefix_/sender/sendStoredRaw" Message: "1" |
_mqtt_prefix_/sender/sendStoredRawSequence | \d+(,\d+)* | Transmit via IR sequence of RAW codes from provided slots | Topic: "_mqtt_prefix_/sender/sendStoredRawSequence" Message: "1,2,3" |
_mqtt_prefix_/sender/cmd | (ls|sysinfo) | Execute on device command, replay in topic _mqtt_prefix_/sender/cmd/result | Topic: "_mqtt_prefix_/sender/cmd" Message: "sysinfo" |
_mqtt_prefix_/sender/rawMode | (1|ON|true|.*) | Turn on/off reporting to controller received by device IR raw codes | Topic: "_mqtt_prefix_/sender/rawMode" Message: "1" |
_mqtt_prefix_/wipe | .* | Wipe configuration for next boot | Topic: "_mqtt_prefix_/wipe" Message: "1" |
_mqtt_prefix_/sender/(RC_5|RC_6|NEC|SAMSUNG|SONY|LG)/(\d+) | \d+ | Send IR signal based on type | Topic: "esp8266/02/sender/RC_5/12" Message: "3294" |
Device → Controller communication
Property | Message format | Direction | Example |
---|---|---|---|
_mqtt_prefix_/sender/cmd/result | .* | Result of command | |
_mqtt_prefix_/receiver/_type_/_bits_/_panas_addr_ | \d+(,\d+)* | Send to controller received IR code | Topic: "_mqtt_prefix_/receiver/RC_5/12" Message: "3294" |