Skip to content

explaura/cctray-rpi-unicorn-hat-monitor

 
 

Repository files navigation

GoCD/cctray.xml Raspberry Pi + Unicorn HAT Monitor

show GoCD/cctray.xml status on a Raspberry Pi + a Unicorn HAT

Build Status

LEDs

Prerequisites

Usage

sudo python poll.py <cctray.xml_url> <poll_wait_s>
  • the cctray.xml URL can include basic authentication
  • if the number of status entries exceeds the number of LEDs on the LED matrix (64, here), only the top level entries will be used.
  • after the number of top level exceeds the number of LEDs, the input will be trimmed

quick feedback

If you don't use GoCD / can't access cctray.xml

Use a small HTTP server (based on Flask) listening to incoming arrays of status:

sudo python server.py

push status i.e. with httpie:

http post http://127.0.0.1:5500/update status:='["NONE","BUILDING","OK","ERROR","NONE","WHAT?"]' --auth ...

or write your own polling script taking poll.py as an example.

Valid status strings: NONE, BUILDING, ERROR, OK, UNKNOWN

GoCD pipeline as code

The project can be built on GoCD using the new feature: pipeline configuration from source control #1133. For this, use:

  • the gocd yaml config plugin
  • this repository as primary material and as the pipeline definition

The pipeline configuration can be seen in ci.gocd.yaml

The GoCD XML config needs the following addition:

  <config-repos>
    <config-repo plugin="yaml.config.plugin">
      <git url="https://github.com/d-led/gocd-rpi-unicorn-hat-monitor.git" />
    </config-repo>
  </config-repos>

About

show GoCD (and others via cctray.xml) status on a Raspberry Pi + a Unicorn HAT

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%