Building a Virtual Remote Control for a Verizon FIOS DVR
I recently had the need to control my FIOS DVR remotely and as the iPhone app only works when on the same local network as the unit that was not an option.
So this project makes use of a Raspberry Pi with Node-Red and LIRC software installed to accomplish the same goal, along with a couple of features missing from the real remote.
- Raspberry Pi Zero & Power Supply
SD Card >=16MB
- Keyes KY-005 IR transmitter module
- Keyes KY-022 Infrared Receiver Module
- Transistor NPN 2N2222 or similar
- One Resistor 10K
- Two Resistors 220
- Circuit Board and Connecting Wire
- Operating System: Raspian GNU/Linux (buster) Debian Version 10.11
The latest release of Raspian (now called Raspberry Pi OS) is available from here. You only need the Lite version.
I cannot guarantee that this project will work on the latest version. You can download the version I used from here.
Either way, I suggest you use the Raspberry Pi Imager to put the OS on the SD Card.
- Node Red
- Install the operating system per the instructions provided
- Log in to the pi user
- Update the operating system with:
- sudo apt-get update
- sudo apt-get upgrade
- Reboot (sudo reboot)
- Login to the pi user
- sudo apt-get install lirc
- sudo nano /etc/lirc/lirc_options.conf
and change these lines
- sudo nano /boot/config.txt
and change these lines
- Disable the default configuration with
sudo mv /etc/lirc/lircd.conf.d/devinput.lircd.conf /etc/lirc/lircd.conf.d/devinput.lircd.conf.hold
- Get the FIOS configuration file using
sudo wget -O /etc/lirc/lircd.conf.d/FIOS.lirc.conf https://www.stearman.com/wordpress/wp-content/uploads/sourcefiles/FIOS.lircd.conf
- Check the lircd status with
sudo systemctl stop lircd.service
sudo systemctl start lircd.service
sudo systemctl status lircd.service
The last command will display something like the below. Don’t worry about the warnings, they are spurious, but if it shows errors you need to check your work.
lircd.service – Flexible IR remote input/output application support
Loaded: loaded (/lib/systemd/system/lircd.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2021-10-28 14:19:00 EDT; 5s ago
Main PID: 6926 (lircd)
Tasks: 2 (limit: 725)
└─6926 /usr/sbin/lircd –nodaemonOct 28 14:19:00 ircontroller lircd-0.10.1: Warning: /etc/lirc/lircd.conf.d/FIOS.lirc.conf: QIP7232-2: Invalid code A: (null)
Oct 28 14:19:00 ircontroller lircd-0.10.1: Warning: /etc/lirc/lircd.conf.d/FIOS.lirc.conf: QIP7232-2: Invalid code B: (null)
Oct 28 14:19:00 ircontroller lircd-0.10.1: Warning: /etc/lirc/lircd.conf.d/FIOS.lirc.conf: QIP7232-2: Invalid code C: (null)
Oct 28 14:19:00 ircontroller lircd-0.10.1: Warning: /etc/lirc/lircd.conf.d/FIOS.lirc.conf: QIP7232-2: Invalid code D: (null)
Oct 28 14:19:00 ircontroller lircd-0.10.1: Warning: /etc/lirc/lircd.conf.d/FIOS.lirc.conf: QIP7232-2: Invalid code Mute: (null)
Oct 28 14:19:00 ircontroller lircd-0.10.1: Warning: /etc/lirc/lircd.conf.d/FIOS.lirc.conf: QIP7232-2: Invalid code VolUp: (null)
Oct 28 14:19:00 ircontroller lircd-0.10.1: Warning: /etc/lirc/lircd.conf.d/FIOS.lirc.conf: QIP7232-2: Invalid code VolDown: (null)
Oct 28 14:19:00 ircontroller lircd-0.10.1: Warning: /etc/lirc/lircd.conf.d/FIOS.lirc.conf: QIP7232-2: Invalid code Asterisk: (null)
Oct 28 14:19:00 ircontroller lircd-0.10.1: Warning: /etc/lirc/lircd.conf.d/FIOS.lirc.conf: QIP7232-2: Invalid code Hash: (null)
Oct 28 14:19:00 ircontroller lircd-0.10.1: Notice: lircd(default) ready, using /var/run/lirc/lircd
- Reboot with sudo reboot
- Install Node Red. The easiest way to do this is to follow the instructions found on this website.
- Reboot with sudo reboot
- Install some static files needed for the project by using these commands:
tar -xzf static_files.tgz
- Make the following change to the node red settings file using:
Find the line containing //httpStatic using the Ctrl/W key and add this immediately below
then Ctrl/X, Y and Enter to save the change.
- Restart Node-Red with
(Note the instructions near the top of the output on how to make Node Red start automatically on reboot)
- In a browser go to the website noted in the same startup text. It will be something like http://<your ip>:1880
- Explaining how to use Node Red is beyond the scope of this project. However you will need to make sure that the following nodes are installed. Some may already be so:
Use Manage Pallette in the main menu to add them if they are missing.
- Import the flows by downloading the file from here and using Import function in the Node Red browser main menu, import it and click Deploy.
The following assumes you are comfortable with the construction of circuit boards that connect to the GPIO interface of the Raspberry Pi. The most important rule to remember is:
Make no connections or adjustments to the circuit connected to the GPIO when the Raspberry Pi is powered up.
This is the circuit diagram of the project:
If you are going to use the FIOS configuration file you uploaded then there is no need to build the IR Receiver circuit. This is only if you want to have the Pi learn some other remote controller codes and save them in your own configuration file. The command to learn codes is irrecord and more information on how to use it can be found with the command man irrecord or by searching on the web.
The purpose of the red LED in the transmitter circuit is to give a visual indication that signals are being transmitted, as infra-red is invisible.
Testing and Use
Once the project is built you will need to test it. I recommend breadboarding first before committing it to a printed circuit board. Position the project near the FIOS DVR with the IR LED pointing towards it. 12-24″ should be enough. Turn on the TV so you can see if the commands are taken.
Open the virtual remote in a web page. The address will be something like http://<your ip>:1880/fios and will show a remote like the one above (but without the annotation). Click on a few buttons to see that they work. The red LED should flash briefly as each command is transmitted by the IR LED. If the red LED does not flash make sure it it the right way around in the circuit. If it does, but nothing happens on the TV, make sure the IR LED is the right way around.
The flow circuit is designed to allow queueing of commands, with each one sent 1 second apart. So there is no need to wait for one command to complete before clicking another button on the remote.
When you click a button the “LEDs” at A will flash. There are 3 of them distributed down the control because the entire controller is not visible on a small device like an iPhone, so there will always be at least one visible at all times.
The symbol at B will cause the Raspberry Pi to be rebooted. A confirming dialog will appear before that happens.
The five buttons at C allow for automatic repeating of a button press. It defaults to 1, but if you want to send 3 down commands for example, click the 3 so it turns green, then click the down button once, 3 down commands will be sent one second apart.
Patching LIRC V0.10.1
There is a bug in the daemon file /usr/sbin/lircd which causes the irsend command to hang if more that 2 commands are sent in quick succession. I have created a page here describing how to patch and build the LIRC source and update the lircd file to fix this problem.
This is a fairly complex project and your mileage may vary considerably. Unfortunately I am not in a position to answer questions if things don’t go well for you. For example, I cannot help if you use different hardware or release of the operating system software. The Internet is always your friend when you need an answer, and I developed this project entirely by researching there. It was not necessary for me to ask any questions of the various web site authors. I used a Pi Zero W for the project, but there is no obvious reason why a Pi-3 or Pi-4 should not work too. They’re just overkill!
Here are some sites that I found useful. All links open in a new tab (assuming they open at all!). If the instructions there conflict with mine, go with mine!