Last active
May 20, 2020 20:44
-
-
Save mbierman/46d301f3a64791f90a5017cd787a087a to your computer and use it in GitHub Desktop.
Get your current power usage from your Neurio/PWRview monitor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| BASEDIR=$(dirname "$0") | |
| APIKEY="$(cat $BASEDIR/neuriodata.txt | grep API | cut -f2 -d "=" )" | |
| POWER=$(curl -s -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Basic $APIKEY=" -H 'Pragma: no-cache' http://neurio.lan/current-sample | jq '.channels[1].p_W') | |
| echo -e "Your home is currently using: $POWER w \n\n" |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Requires
Instructions
set a file called
neuriodata.txtin the same directory with this script with your base64 encodedusername:passwordlike so: