Use your Raspberry Pi & MATRIX Creator to setup a website to control your TV.
All setup steps will be done on your Raspberry Pi.
The following steps from MATRIX Creator IR Test must be completed.
-
Step 2: Installing pigpio
Before continuing, pigpio must be running to allow IR functionality.
Must be done each time Pi boots
sudo pigpiod
Install git.
sudo apt-get install git
Download this repository to your home directory.
git clone https://github.com/matrix-io/MATRIX-TV-Remote-Website ~/tv_remote
Install Node.js.
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
. ~/.bashrc
nvm install 8.6
Move into the project folder and download the required packages.
cd ~/tv_remote
npm install
Run the shell script inside tv_commands
to record buttons from your TV remote.
Begin pressing the prompted buttons on your TV remote. The commands created are made to best match an average remote.
cd ~/tv_remote/tv_commands
chmod +x ./recordCommands.sh
./recordCommands.sh
Run this project
cd ~/tv_remote
node ~/tv_remote/app.js
Go into a web browser and enter the followig URL:
YOUR_RASPBERRY_PI_IP:8080
Install the python pigpio package to root
sudo pip install pigpio
Add the following commands to etc/rc.local
, for your Pi to start with the TV remote website running.'
make sure the commands below are inserted above
exit 0
inrc.local
# Start pigpio
sudo pigpiod
# Start TV remote website
/home/pi/.nvm/versions/node/v8.6.0/bin/node /home/pi/tv_remote/app.js &
In order to add custom commands, the command must be inside tv_remote/tv_commands/codes.json
A new command can be created by using:
# Command
python ~/tv_remote/tv_commands/ir_remote.py -r -g16 -f codes.json PUT_COMMAND_NAME_WITH_NO_SPACES_HERE
# Example
python ~/tv_remote/tv_commands/ir_remote.py -r -g16 -f codes.json volume_up
With your new command set, the TV remote website files can be edited to change or add your command. Some knowledge of HTML and Javascript will be required.