This dockerfile build IR remote control image for RaspberryPi(ARM) with Docker. The remote container is built on Alpine base image using Pigpio that is Python3.5 Library. The app is then available from any other systems by WebAPI.
The app must be run on RaspberryPi and be required environment that is runnable Compose.
$ docker-compose up -d
http://[IP address]:20080
IR FileName
must be set IR filename. It read automatically filenames under remote/source directory and set items. If you select it, the page set automatically selectable items to combobox named 'IR Command'.IR Command
must be set IR command in you assigned 'IR filename' in the above Combobox.
The following is a scheme example.
- In : GPIO 24
- Out : GPIO 25
-
Enter remote docker container.
$ docker-compose exec remote sh
-
Type following command
$ addir [IRFilename] [IRCommandname]
-
Push a button on remote device
$ addir tv power_on
-- button pushed --
Recording Press key for 'power_on' Okay
IR_IN_GPIO_PORT
IR file input GPIO portIR_OUT_GPIO_PORT
IR file output GPIO port
'env' file sets the ports
IR_IN_GPIO_PORT=24
IR_OUT_GPIO_PORT=25
Any Other systems are able to control the app by WebAPI. You send IR command by way of them, it executes command and returns the result json object then.
http://[IP address]:20080/api/remotecontrol.php?filename=[IRFilename]&command=[IRCommandname]
URL included WebAPI
http://[IP address]:20080/api/remotecontrol.php?filename=samplefile&command=samplecommand1
Result json object
{"commandstatus":"success","filename":"samplefile","sendcommand":"samplecommand1"}