Automating Updating an LED Scrolling Sign with Python
This project demonstrates how an off-the-shelf LED scrolling display with no programmable interfaces can be automated using Python and the proprietary software (PowerLed) that came with the unit! We accomplish this via the use of pywinauto, a set of Python modules for automating Windows GUIs, the use of subprocess calls to connect to the device's wifi, and the use of the Google Calendar API to show how you can get your display to show content pulled from the internet.
This project will display the first five events off your Google Calendar on a LED display that is supported by the common PowerLed software. This software comes bundled with a lot of signs as far as I can tell that come off of eBay, Alibaba, Amazon, etc. and can be frustrating to work with since there is no programmable interface with which to update the signs with dynamic content pulled from the internet, like from a Google Calendar. Pywinauto is awesome for automating using GUIs on Windows, and I was originally investigating it for use in automated testing when I realized that I could use an old Intel compute stick to update my LED sign on a regular interval and pull down the latest information from my Google Calendar! In just a few lines we evade the challenge of reverse engineering some proprietary software and provide a new use for an older PC that otherwise could have become e-waste.
These instructions will help you deploy this project and help you get up and running quickly.
- Clone this project somewhere on a Windows machine (I recommend an old laptop or compute stick, since this project will run in a loop forever.)
- Set up your LED display and install the included PowerLed software (if you have another program for your sign you will need to modify the code in main.py to automate using your software)
- Install the prerequisites. You must have Python 3 and pip installed. Afterwards, install the packages listed in requirements.txt
- Fill in the information at the top of main.py with your network name, the network name broadcast by the LED sign, the version of PowerLed you are using, and your time zone. This code requires that you can connected to both networks in the past, as we will not be passing in any credentials! We need to have the PC change networks between your WiFi and the network broadcast by the sign in order to get information from the internet and then update the sign. The timezone information will be used to make sure that the datestrings printed to the sign reflect the correct time for your location.
- Follow the instructions in the Google Calendar Python Quickstart to generate the required credentials file and to enable the Google Calendar API using your Google account.
- Open display.ledproj in PowerLed. Close PowerLed
- Run main.py. You should see the closest five events from your Google Calendar scrolling across the screen! The information displayed will update every three minutes, but you can make this more frequent or infrequent at the top of main.py.
This project requires that you are running Windows and have PowerLed installed. Additionally, this project was written in Python 3.
You can install all Python prerequisites at once using requirements.txt and pip. From inside the project directory, run:
pip install -r requirements.txt
- Kevin Loeffler - My Website
This project is licensed under the MIT License - see the LICENSE file for details