https://github.com/pezinek/ir_blaster
IR Blaster for ESP8266
https://github.com/pezinek/ir_blaster
arduino esp8266 home-automation homie homie-esp8266 iot mqtt
Last synced: 3 days ago
JSON representation
IR Blaster for ESP8266
- Host: GitHub
- URL: https://github.com/pezinek/ir_blaster
- Owner: pezinek
- Created: 2017-02-08T12:04:10.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-02-19T11:24:37.000Z (over 7 years ago)
- Last Synced: 2025-04-05T06:04:27.453Z (2 months ago)
- Topics: arduino, esp8266, home-automation, homie, homie-esp8266, iot, mqtt
- Language: C++
- Size: 690 KB
- Stars: 8
- Watchers: 7
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
WiFi IR Blaster for ESP8266
===========================This is simple infrared sender/receiver controlled over MQTT.
It uses the [Homie MQTT convention](https://github.com/marvinroger/homie)
and is based on [Homie implementation for ESP8266](https://github.com/marvinroger/homie-esp8266) by
Marvin Roger.Wiring diagram
--------------The wirring bellow is the one I used and worked for me.
You will likely need to [adjust](http://led.linear1.org/led.wiz) the
resistor sizes based on the voltage drop and max current for your IR diodes.
The transistor is general purpose NPN transistor (I used BSY34)
Instalation
-----------I recommend to use platformio which will resolve all the dependencies for you,
but to compile this sketch in Arduino IDE you have to manually install follwing libraries:- [Homie for ESP8266](https://github.com/marvinroger/homie-esp8266) and all it's [dependencies](https://homie-esp8266.readme.io/docs/getting-started#section-installing-homie-for-esp8266)
- [IRremoteESP8266](https://github.com/markszabo/IRremoteESP8266)
- [ArduinoJson](https://github.com/bblanchon/ArduinoJson)as well I recommend to install the [Homie UI Bundle](http://marvinroger.github.io/homie-esp8266/docs/2.0.0-beta.3/advanced-usage/ui-bundle/)
to [data/homie](https://github.com/marvinroger/homie-esp8266/tree/develop/data/homie) folder.
To upload the UI bundle you have to follow [SPIFFS upload process](http://docs.platformio.org/en/stable/platforms/espressif8266.html?highlight=spiffs#uploading-files-to-file-system-spiffs)
if using PlatformIO or if you use Arduino IDE you may use [arduino-sep8266fs-plugin](https://github.com/esp8266/arduino-esp8266fs-plugin).Once you upload the sketch, you have to configure the node as described in [Homie Getting Started Tutorial](http://marvinroger.github.io/homie-esp8266/docs/2.0.0-beta.3/quickstart/getting-started/)
(this is where you device gets device id assigned)Interface
---------- To listen for received IR codes, subscribe to MQTT topic `homie//infrared/code`:
```bash
$ mosquitto_sub -h 192.168.1.50 -v -t 'homie/5ccf7fd38d01/infrared/code'
homie/5ccf7fd38d01/infrared/code {"name":"UNKNOWN: 0x42D74094","value":1121403028,"frequency":38,"type":{"id":-1,"name":"UNKNOWN"},"raw":[9100,4600,600,650,600,1750,600,1750,600,1750,600,650,600,1750,600,1750,600,1750,600,1750,600,1750,600,1750,600,650,600,650,600,650,600,650,600,1800,600,650,600,650,600,1750,600,650,600,650,600,650,600,650,600,650,600,1750,600,1750,600,650,600,650,600,1750,600,1750,600,650,600,650,600]}
```- To send IR codes, publish to MQTT topic `homie//infrared/code/set`:
```bash
mosquitto_pub -h 192.168.1.50 -t 'homie/5ccf7fd38d01/infrared/code/set' -m "{"frequency":38,"raw":[900,900,1800,900,900,900,900,900,900,900,900,900,900,900,900,900,900,900,900,900,900,900,900,1800,900]}";
```