Server-based countdown clocks with multiple client viewers using Node.js and a Raspberry Pi

A few months back, I shared about the client-side countdown clock script that I created for our team to use. It worked pretty well for its purposes, using Dropbox as the platform to share and update data between the computer creating the clocks and the computer viewing the clocks. The initial goal was to create something that required no backend server and would be easy to run on any computer.

It served us well but we quickly outgrew it with the desire to be able to publish clocks in realtime, not simply relying on the viewer client to refresh itself every 15 seconds to look for new data. So, I created a server based solution using Node.js.

I decided I wanted to run this project on a Raspberry Pi 3 B+, so I picked up this kit on Amazon. I wanted an easy way to spin up a web server that wasn’t tied to any production machine, and this does a great job.

img_7113
Here is the Raspberry Pi 3 B+, neatly installed in one of the video racks. I’m using the HDMI output and converting it to SDI to go into our video system.

Dubbed TimeKeeper, this project runs an Express web server within Node and has a REST API, which allows the user to poll for existing data as well as create new entries. As new entries are added, they are sent out to all connected clients in real time using the socket.io library.

Screen Shot 2018-11-29 at 2.08.23 PM
Here is a screenshot of a web browser client. This is actually running on the same Raspberry Pi that is hosting the Node.js server, with Chromium in kiosk mode.

Rooms:
Rooms allow you to control and specify which timers appear. This is helpful if you are running clocks in multiple venues or instances, and only want certain timers to appear on certain viewer screens.

Timers:
Timers are the objects that TimeKeeper will count down to, based on the viewer’s current local system time.

Messages:
Messages can be sent and displayed on viewer clients.

After implementing the API, I created a Dashboard custom panel to interact with the server. This serves as the primary interface for our volunteers. Because the panel fetches new data from the server on a recurring schedule, multiple computers can have the panel open and all stay in sync about what timer and message objects are currently being displayed.

Screen Shot 2018-11-29 at 2.09.55 PM
Screenshot of the custom panel in Dashboard.

We’ve been using this software for a few months now and it’s working great! I intended to write about it sooner, but with a busy work and family life, finding time to write for this blog can be a challenge!

The next version will support trigger actions when clocks hit a specified time or run out. I also plan to integrate with other clock systems to show time left on video playbacks, Planning Center Online, etc., when I have the time!

If this is useful or helpful to you, I’ve made it available on my Github repository.

Remote Control of Panasonic AW-HE40 PTZ Camera through Dashboard

We have a Panasonic AW-HE40 located in each auditorium at my church to allow the control room operators to see the space. We also occasionally use them as on-screen cameras since they have HD-SDI outputs. The quality is surprising for the size of the device.

aw-he40swpj_2_1024_0

The cameras come with a fully functional webpage that allows you to control them.

Screen Shot 2018-06-12 at 9.26.40 AM

By peeking around at the code some, I was able to figure out how to send HTTP requests to change presets of the camera.

Here is my Ross Dashboard custom panel that allows our volunteers to quickly pull up presets:

 

Screen Shot 2018-06-12 at 11.41.45 AM
The panel allows the user to see the camera’s viewing angle and select a pre-defined preset. Presets can be modified within the existing web interface for the camera. A Setup tab is also available to configure the IP address of the camera you wish to control.

 

If you use my panel, you’ll still need to manage/modify the presets using the existing interface. We don’t change our presets often, so I didn’t feel the need to recreate any other functionality than recalling presets.

I’ve made this panel available on Github here if you can benefit from it: https://github.com/josephdadams/RossDashboardPanels