Bash script to view live electricity consumption in MacOS terminal
I started playing around with the API curl examples and ended up recreating the live electricity consumption indicator, from the bright app, on the command line. I then tried make it reusable for others by pulling out the various resourceIds and prompting for username and password at first run. I've made it freely available in GitHub here:
Authored on MacOS, I haven't tested this on Linux yet, it should work but if it doesn't it might be down to the sed command options. I'm using reg-ex in sed to parse the JSON output and get the info I want out of the response.
When it runs, it looks like this and the number updates every 10 seconds: