UNSOLVED PIR sensor in combination with IR transmitter
For my first Magic Mirror, I want to use an old TV that I have lying around. My TV uses Simplelink (CEC), so commands can be sent to my TV to turn on. Unfortunately, it can’t turn off using Simplelink (CEC). To solve this, I want to use an IR led. I also have an PIR sensor. So what I want is when a person moves in front of the PIR sensor, a signal will be transmitted via the IR led to my TV to turn on. After a certain amount of time, I want the Raspberry Pi to signal to the TV to turn off. I couldn’t find a module which does this. I hope someone has an idea how to realize this idea.
@erwindenboer you don’t need a module to do this. or anything MagicMirror
most of the pir support is in python, and I’m sure u can find python support for sending the led signal.
then is wait and launch the shutdown command
you should be able to build this as a bash script
#!/bin/bash python command to read the pir python command to send the led signal sleep n seconds shutdown now -h
if you use pm2 to start mm, you can also use it to start this bash script
@erwindenboer also, make sure there is a good delay on the pir sensor. you’d be amazed how easy it is to trip the durned thing.
@sdetweil Thanks for your fast reply. I will test this out next week. Then I will come back to you to let you know if I have more questions or if I solved it. I really appreciate it!