Would you look at that, turns out someone's already built the perfect API 👀 https://api.carbonintensity.org.uk
Awwww yeah 🎉🎉🎉🎉. I now get a call to action when the grid is dirty AND I’m using more than 0.5 kW, which is a wee bit higher than my usual base load and waaaay below what the heat pump uses. Quite happy with my bash and jq wrestling to get me the data of when the grid is next likely to be clean again. 💪
(I’ve commented the if for testing purposes - obviously the prompt doesn’t make sense when consumption is 0 - but you get the idea!)
I fully expect that in a few months I will have become completely conditioned to a little black box on my desk randomly spitting out commands, which I will proceed to follow instantly. This is definitely a step *away* from dystopian sci fi. I’m definitely not ushering in an era of computer overlords. Nope… definitely not.
Fellow nerds - if you like this project and you're curious how to go about building something similar, I just finished a little post about how I got this thermal printer up and running. Bash functions also included! #RaspberryPi #LessFossilFuels #ThermalPrinter #NationalGrid #HomeAutomation #MQTT https://www.herdingdata.co.uk/calls-to-action-to-change-energy-habits-to-use-less-fossil-fuels-with-a-thermal-receipt-printer/
@lostsettler @callum_snowden you may enjoy this blog post ☝️ 😀
@herdingdata FWIW, I was reading this and got to the part where you couldn't access the CUPS web UI remotely - you could've used SSH port forwarding. Something like:
`ssh littlestartrolley -L 6631:127.0.0.1:631`
And then go to `http://localhost:6631` on your local machine (aka, your laptop). You need to use '6631' 'cause ports under 1024 are privileged and only root can bind to them.
Having the CLI tools is probably easier in the long run, but this trick might be helpful in the future!
@semanticist oooh thanks for this! Good
to know and that makes total sense. I’ve rarely had cause to tinker with ssh port forwarding so it’s not a tool that I thought to reach for.
@herdingdata My first "proper" tech job utterly relied on it for getting access to client's systems so it got ingrained early! (I say "early" like I hadn't been using Linux and SSH for nearly a decade at that point, but whatever!)