Skip to content

Instantly share code, notes, and snippets.

@mbierman
Last active May 20, 2020 20:44
Show Gist options
  • Select an option

  • Save mbierman/46d301f3a64791f90a5017cd787a087a to your computer and use it in GitHub Desktop.

Select an option

Save mbierman/46d301f3a64791f90a5017cd787a087a to your computer and use it in GitHub Desktop.
Get your current power usage from your Neurio/PWRview monitor
#!/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"
@mbierman

mbierman commented May 20, 2020

Copy link
Copy Markdown
Author

Requires

Instructions

set a file called neuriodata.txt in the same directory with this script with your base64 encoded username:password like so:

API=username:password

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment