Skip to main content
Deno 2 is finally here šŸŽ‰ļø
Learn more

pharus: ā€˜beaconā€™ or ā€˜lighthouseā€™

https://github.com/grahame/pharus/assets/330805/0644480d-e9b8-4c07-a9b1-3218ce54215d

pharus showing the colours of the calendar, Lent through Easter 2024

This software allows you to build a ā€˜liturgical lightbulbā€™, which changes colour in accordance with the Calendar of the Anglican Church of Australia.

The various festivals in the Calendar are observed, including lesser feasts. Where more than one lesser feast might be celebrated on a day, the feasts are rotated each year, so that every few years every feast in the calendar will be observed.

As a solemn touch, your ā€˜liturgical lightbulbā€™ will turn off at 3pm local time on Good Friday. It will turn back on at sunrise on Easter Day.

Building a liturgical lightbulb

Setting this project up will require some Linux skills. It could be a great hobby project though; in my own area, Iā€™ve been considering running a workshop where attendees set up a light, and leave with it.

  1. Youā€™ll need a working zigbee2mqtt setup. This isnā€™t too hard, but it does involve ordering some hardware. The walkthrough is good. In terms of controllers, Iā€™ve got an Electrolama CC2652R1 plugged into a Raspberry Pi and it has worked well.
  2. Get yourself a lightbulb, and register it with your Zigbee controller. Iā€™ve got an Tradfri LED bulb E14 470 lumen, dimmable colour globe.
  3. Make yourself a configuration file:
{
  "url": "mqtt://127.0.0.1",
  "topic": "zigbee2mqtt/0x2c1165fffe107f64/set",
  "latitude": -31.9514,
  "longitude": 115.8617
}

You can find the ID in the topic for your lightbulb from the zigbee2mqtt web interface; itā€™s just the hex code in the device URL.

The provided latitude and longitude are used to calculate the local sunrise time on Easter Day, so that the globe turns back on as the Vigil ends.

  1. Now for the easy bit. Install the deno runtime, and then run:
# test things out by setting the globe to today's colour
deno run -A https://deno.land/x/pharus/cli/setlight.ts config.json

# leave this running, and your globe will change day by day
deno run --unstable -A https://deno.land/x/pharus/cli/cron.ts config.json

# ... or this will run your light through the calendar for the next year
# changing the colour twice a second
deno run --unstable -A https://deno.land/x/pharus/cli/runthrough.ts config.json

Background

This project came out of my days as a theological student, training for ordination as an Anglican priest. One of the requirements for ordination in my Diocese is completion of Clinical Pastoral Education. For three months I was an intern chaplain at Royal Perth Hospital. It was a very intense experience: overall, wonderful, but complex in the detail. I found myself spending some time in St Maryā€™s Cathedral when I needed to, and noticed that they change the lighting around the sanctuary day by day according to the Calendar.

I decided to take that idea and bring it into my home. Changing the colour of a light each day was going to be too much work for me to keep it up, so I decided to automate it. I built the light as a little fun distraction while completing CPE; this version of the light is much more polished. (The original used an IKEA Tradfri controller and some Python code to talk to it, but it kept breaking when the controller updated itself; this is version 2, and is pretty solid!)

While this started as a fun project, the liturgical light has added meaningfully to my pattern of daily worship. When I get up in the morning, one of the first things I see is the colour of the day, coming through the study door. When itā€™s red, or white, I find myself wondering which saint or martyr is marked this day.

The initial release of this software was made on the Feast of the Epiphany, 2024. Iā€™m not sure there could be a much more appropriate day for that to happen!

Future directions

At the moment, the lightglobe follows the Calendar of the Anglican Church of Australia. It does this using my church-calendar library. I am very open to adding support for further calendars, including those from other denominations, or other provinces within the Anglican Communion.

Need a hand?

Iā€™m happy to help anyone who is trying to get this running and hits obstacles. Just open an issue on this repository.

If you do get this up and running, Iā€™d love to hear from you. Iā€™m an Anglican Priest working in Digital Mission, and I hope this has some missional outworkings.