{"id":20484009,"url":"https://github.com/sambauers/open-sign","last_synced_at":"2026-04-10T16:34:35.513Z","repository":{"id":145866813,"uuid":"284425716","full_name":"sambauers/open-sign","owner":"sambauers","description":"Open Sign is a small NodeJS application that displays pixel art on an LED matrix","archived":false,"fork":false,"pushed_at":"2025-03-03T05:16:34.000Z","size":528,"stargazers_count":0,"open_issues_count":10,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-05T16:18:17.348Z","etag":null,"topics":["led-panels","nodejs","raspberry-pi","rgb-panels","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sambauers.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-08-02T08:55:11.000Z","updated_at":"2024-12-31T06:37:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"31f035b5-c114-464d-bfd3-f0a32c0f2b4a","html_url":"https://github.com/sambauers/open-sign","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sambauers/open-sign","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sambauers%2Fopen-sign","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sambauers%2Fopen-sign/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sambauers%2Fopen-sign/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sambauers%2Fopen-sign/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sambauers","download_url":"https://codeload.github.com/sambauers/open-sign/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sambauers%2Fopen-sign/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265312969,"owners_count":23745183,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["led-panels","nodejs","raspberry-pi","rgb-panels","typescript"],"created_at":"2024-11-15T16:19:28.789Z","updated_at":"2026-04-10T16:34:35.466Z","avatar_url":"https://github.com/sambauers.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![A demonstration of the Open Sign application](https://raw.githubusercontent.com/sambauers/assets/main/open-sign/readme/open-sign-demo.gif)\n\n# Open Sign\n\nOpen Sign is a small NodeJS application that displays pixel art on a LED matrix.\n\nThe hardware required is:\n\n* Raspberry Pi - *probably best with at least a Raspberry Pi 3 Model B Rev 1.2*\n* An RGB LED Matrix HAT for Raspberry Pi - *I use the [RGB Matrix HAT + RTC](https://www.adafruit.com/product/2345) from Adafruit, or [you can wire it up yourself](https://github.com/hzeller/rpi-rgb-led-matrix/blob/master/wiring.md)*\n* An RGB LED Matrix board - *I use [this 64x32 pixel matrix](https://www.adafruit.com/product/2277) from Adafruit, but any board that complies with the [RPI RGB LED Matrix library limitations](https://github.com/hzeller/rpi-rgb-led-matrix) should work - note: that currently only one board at a time is supported or tested, so no chaining of boards (adding support should be pretty trivial, but I don't have a second board to test this)*\n* A USB mouse to control the display - *use a two button mouse with a scrollwheel to get the maximum functionality*\n\n## Installation\n\nThe application requires NodeJS v20, and setup on the Raspberry Pi can be a bit tricky.\n\nAssuming you have Raspian installed on your Raspberry Pi, you'll need to make sure that your RGB LED Matrix HAT is installed properly and working - this could include messing around with `raspi-config` settings, check the instructions for your particular HAT.\n\nOnce things are wired up and you are confident that your Pi, HAT, and LED matrix are working, you can start installing…\n\nFirst install `fnm` - we'll install it once for all users.\n\n```sh\n# switch to root\nsudo -i\n\n# make a new directory for `fnm`\nmkdir /opt/fnm\n\n# install `fnm` in the new directory, but skip installation of the user shell script\ncurl -fsSL https://fnm.vercel.app/install | bash -s -- --install-dir \"/opt/fnm\" --skip-shell\n```\n\nCreate an `fnm` initialisation script for all users.\n\n```sh\nnano /etc/profile.d/fnm.sh\n```\n\nAdd the follwing contents to that script:\n\n```sh\n# FNM initialization script\nFNM_PATH='/opt/fnm'\nif [ -d \"$FNM_PATH\" ]; then\n  export PATH=\"$FNM_PATH:$PATH\"\n  if [ ! -t 0 ]; then\n    eval \"`fnm env --fnm-dir=\\\"$FNM_PATH\\\"`\"\n  else\n    eval \"`fnm env --fnm-dir=\\\"$FNM_PATH\\\" --use-on-cd --version-file-strategy=recursive --resolve-engines`\"\n    eval \"`fnm completions`\"\n  fi\nfi\n```\n\nContinuing as the root user, create a directory to install `open-sign`:\n\n```sh\n# make a new directory for `open-sign`\nmkdir /opt/open-sign\n```\n\nGet a copy of the `open-sign` code into that new directory, it's generally a good idea to clone the Git repository:\n\n```sh\ncd /opt\ngit clone https://github.com/sambauers/open-sign.git open-sign\n```\n\nInstall FNM for your user using [their instructions](https://github.com/Schniz/fnm?tab=readme-ov-file#installation).\n\nOnce done, install the NodeJS version required by the app and make it the default:\n\n```sh\ncd /opt/open-sign\n\n# install the specified node version (if not prompted)\nfnm install\n\n# make the specified node version the default\nfnm alias `fnm current` default\n\n# make sure the specified version is in use\nfnm use\n```\n\nEnsure `npm` and `corepack` are up-to-date - note that we are using `npm` for global packages:\n\n```sh\nnpm -g install npm corepack\n```\n\nEnsure `corepack` is enabled so we can automatically use `pnpm`. `fnm` is supposed to automatically do this for us, but it doesn't hurt to make sure:\n\n```sh\ncorepack enable\n```\n\nNow install dependencies (this will take a while) - accept any prompt asking you if you want to install `pnpm`:\n\n```sh\npnpm install\n```\n\nAdditionally, install `pm2` - note that this is being installed globally using `npm`:\n\n```sh\nnpm -g install pm2\n```\n\n## Configuration\n\nOpen `ecosystem.config.js` and adjust the environment variables `LED_HEIGHT` and `LED_WIDTH` as needed.\n\n```sh\n# switch to root\nsudo -i\n\n# go to `open-sign` directory\ncd /opt/open-sign\n\n# open the ecosyustem file for editing\nnano ecosystem.config.js\n```\n\n## Build\n\nAs root, ensure the correct Node version is being used and build the application:\n\n```sh\n# switch to root\nsudo -i\n\n# go to `open-sign` directory\ncd /opt/open-sign\n\n# ensure the right node version is in use\nfnm use\n\n# build the application\npnpm build\n```\n\nThe compiled application should now be in the `/opt/open-sign/dist` directory.\n\n## First run\n\nSwitch to the `root` user and ensure you are in the correct directory:\n\n```sh\n# switch to root\nsudo -i\n\n# go to `open-sign` directory\ncd /opt/open-sign\n```\n\nEnsure the correct Node version is being used, and then start the application using `pm2`:\n\n```sh\n# ensure the right node version is in use\nfnm use\n\n# start pm2 process manager\npm2 start ecosystem.config.js --env production\n```\n\nThe application will start on a blank screen. Click the left mouse button to display the first image on the RGB LED matrix.\n\n## Controls\n\n* Left mouse button - go to next image\n* Right mouse button - go to previous image\n* Scrollwheel up - increase brightness\n* Scrollwheel down - decrease brightness\n\n## Starting on boot\n\nTo start the sign automatically on boot, you can use PM2's built-in startup\nscript generator.\n\nSwitch to root and run the `pm2 startup` command:\n\n```sh\n# switch to root\nsudo -i\n\n# add pm2 startup script\npm2 startup\n```\n\nMost times it will install the startup script for you, but check the PM2\ndocumentation if you get stuck.\n\nNow you can save the current pm2 state to config. Ensure you are in the correct directory, and ensure the application is started:\n\n```sh\n# go to `open-sign` directory\ncd /opt/open-sign\n\n# ensure the right node version is in use\nfnm use\n\n# start pm2 process manager\npm2 start ecosystem.config.js --env production\n```\n\nThen simply \"save\" the list of running PM2 services to ensure they start on\nboot:\n\n```sh\n# check the processes currently being managed by pm2\npm2 list\n\n# save current pm2 state to config\npm2 save\n```\n\nThe sign should now launch automatically on boot. If you ever want to stop running automatically on boot, you can remove the init script:\n\n```sh\npm2 unstartup systemd\n```\n\n## Setting up run schedules\n\nYou may want to start and stop the sign at certain times of the day or week. This can be achieved by configuring `crontab`.\n\nThe simplest version of this starts and stops the application by sending signals to `pm2`.\n\nYou can edit `root`'s `crontab` file by running:\n\n```sh\nsudo crotab -e\n```\n\nThen setup start and stop actions like:\n\n```sh\n# Ensure pm2 can be found on your PATH - adjust as\n# neccesary depending on your FNM/NPM binaries path\nPATH=/opt/fnm/node-versions/v20.18.1/installation/bin:$PATH\n\n# Turn the sign on at 8:30 AM, Monday to Friday\n30 8 * * 1-5 pm2 sendSignal SIGUSR1 open-sign\n\n# Turn the sign off at 4:30 PM, Monday to Friday\n30 16 * * 1-5 pm2 sendSignal SIGUSR2 open-sign\n\n# In case of power failure and reboot outside these hours, turn off the sign every 15 minutes outside those hours\n\n# Monday to Friday before 8:30 AM\n*/15 0-7 * * 1-5 pm2 sendSignal SIGUSR2 open-sign\n0-25/15 8 * * 1-5 pm2 sendSignal SIGUSR2 open-sign\n\n# Monday to Friday after 4:30 PM\n35-55/15 16 * * 1-5 pm2 sendSignal SIGUSR2 open-sign\n*/15 17-23 * * 1-5 pm2 sendSignal SIGUSR2 open-sign\n\n# Saturday and Sunday\n*/15 * * * 6 pm2 sendSignal SIGUSR2 open-sign\n*/15 * * * 0 pm2 sendSignal SIGUSR2 open-sign\n```\n\nYou may need to restart the `cron` service after editing:\n\n```sh\nsudo /etc/init.d/cron restart\n```\n\n## Adding more images\n\nAdding more images is easy.\n\nSimply create new images in `PNG` format at the correct dimensions for your LED matrix and drop them into the `moods` directory.\n\nThe images are loaded in alphabetical order. You can force the order of the images by utilising a number prefix. See the file names in the `moods` directory for an example of this.\n\nThe images in the moods diroctory that come with the application are 64x32 pixels.\n\nTransparent PNGs are supported (the transparency is treated as black).\n\nIf you add new images, they won't be registered by the application until you restart the application.\n\n```sh\nsudo -i\npm2 restart open-sign\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsambauers%2Fopen-sign","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsambauers%2Fopen-sign","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsambauers%2Fopen-sign/lists"}