A demo for using Orange Pi 5 Plus & YS-IRTM to send and receive IR to control the light.
Using sudo armbian-config --cmd SY210
to switch on ttyS3 (rk3588-uart3-m0/1, also switch on uart4 if you want to use CO2 sensor),
Install the pyserial
pip3 install -r requirements.txt
bash ./install.sh # add service
./light.py s # turn on/off my light
./light.py l # receving (for learning new commands)
./light.py b # make my light brighter
./light.py d # make my light darker
./light.py bb # brightest
./light.py dd # darkest
vi ./config.json
{
"USERNAME":"",
"PASSWORD":"",
"HOST": ""
}
python3 light_mqtt.py