Harlow Bindicator Rewrite
A while ago, I wrote a script that would access the Harlow Local Authority website to check the latest bin collection dates and identify which bin needed to be placed outside. It worked well and proved to be very useful; however, it was more complicated than necessary. The main issues were hosting the application and managing notifications, which introduced too many moving parts.
The old version ran in a loop, sleeping between checks for new collection dates. This meant I had to keep the service running continuously, whereas it could have been triggered by a simple cron job. Additionally, it used MQTT to publish a message on collection days, which required me to have NodeRed running to listen to the queue, process the data, and forward it to an SMS provider to send me a text message if it was bin day, including which bin to put out. As you can see, there were too many dependencies.
Notifications with ntfy
I decided to rewrite the entire system, and the majority of this rewrite was driven by using ntfy.sh, a push notification service that can be triggered with a simple POST/PUT request. This allowed me to eliminate MQTT, NodeRed, the SMS provider, and the need for a configuration file. Below is how straightforward it is to send a push notification to ntfy.sh:
|
|
Harlow Bindicator 2.0.0
The new version of Bindicator only requires two command-line arguments: the UPRN used in the lookup and the topic to publish the message to. This simplifies the entire codebase and allows me to remove the application from my hosting. Instead, I run it as a GitHub action that executes daily, using two secrets that correspond to the command-line arguments.
Looking Ahead to the Next Version
The Bindicator has been running smoothly since the rewrite and is doing its job perfectly. However, there’s one more feature I’d like to add: a notification that reminds me the day before bin day. This would give me a heads-up in case we’re away, and I could notify either the cleaner or cat sitter to put the bin out for us. As always all sources are on GitHub.