Hello All,
I would like to share a new library I have created to integrate an IR controlled device with SmartThings through the ST Anything project.
This project uses a NodeMCU together with an IR transmitter to control devices such as televisions and stereos etc.
The interface is implemented as a an On/Off toggle switch, the typical use case would be to switch on and off a TV as part of a security system, or to turn on your music in the morning to wake you. Of course this button can go out of sync if you also use the physical IR remote to turn the device on and off.
Please see the Github readme file for details of how to use the library:
This project builds on the ST Anything project, and connects to SmartThings via WiFi:
It also relies on the IRremoteESP8266 library that can be added through the Arduino IDE “Manage Libraries” interface.
To use the library you need to find the correct code to send to the device, this can be found using an IR receiver connected to an Arduino, I used an Arduino Uno. More details are provided in the Github Readme file.
The parts I used are shown below (no affiliation):
NodeMCU ESP8266 based microcontroller:
https://www.amazon.co.uk/HiLetgo-Internet-Development-Wireless-Micropython/dp/B0791FJB62/
IR Transmitter LEDs:
IR Receiver Module (maybe easier to use):
Using the circuit described in the Readme file I can control my LG TV from across the room, my Samsung TV seems less sensitive as it only works from around 2m (6 ft).
For the next steps I am planning to build a library for a momentary switch that can represent other types of remote control buttons, such as the volume control, that don’t have an on/off state. I am also planning an IR macro that can send a sequence of IR codes, a use case for this could be to turn on the TV, set the channel and adjust the volume with one button in the SmartThings app.
Let me know how you get on and if you have any questions/requests!
Regards,
Kris.