You can use IrToy both with a PC and Raspberry Pi to send the infrared signal to your air conditioner (or another device, if you like).
You just need a USB port and the PyIrToy Python module by Chris LeBlanc. Install it or just download the file irtoy.py and save it into the same directory where you saved ACBot. Then set the correct values in acbot.conf file.
In [host] section set the type key to the value pc or raspberry according where the Telegram bot is running on. Example:
[host]
type = raspberry
or
[host]
type = pc
Then in the irtoy section set the serial port to which IrToy is connected to. Example:
[irtoy]
port = /dev/ttyACM0
You must have a your own json file where you saved the encoded signal of your own remote control. Save it in the ./codes directory and assign the name of the file to the codes_file key in the [signal] section of acbot.conf configuration file. Example:
[signal]
codes_file=RKS502A502A.json
Nessun commento:
Posta un commento