Close

IR controlled smart lights

A project log for IR Everything

Multiple IR triggered creations with an IR blaster to make the magic happen

seanSean 10/13/2021 at 21:320 Comments

This is my pet project within the larger project. The goal is to have the house crest of each HP house hanging on a wall. When one of them is blasted with IR, the smart lights on either side of the wall will change to the house colors of that house. I previously created a python script to change the smart lights when buttons were pushed. It will be fairly simple to modify that code for this purpose. The hard part will be getting separate inputs from 4 different IR receivers on one pi. I could use a separate pi or arduino for each receiver, but then I'd have to buy more components. It's also incredibly inelegant. It has to be 4 sensors on one pi.

Lirc should be able to read from 4 sensors individually. The challenge here will be getting the same signal to be interpreted differently based on which sensor it comes from. My current plan is to attempt to use lircrc files with irexec to interpret the reciever signals as keyboard button presses. These could be read by the python script to trigger lighting changes. However, I'm still working on this. It might not be possible. An alternative may be to read from the IR receivers directly in the python script. That will take more time and is only a backup plan at this point. I'm also looking into using ir-keytable if lirc isn't up to the task. 

So far, I can translate an IR input to a remote keypress with the .lirc.conf file, then convert that to a keyboard keypress by using the lircrc file to call xdotool by way of irexec.

I'm still heavily in the learning and tinkering phase on this one. It's my main focus currently. 

Discussions