Last active
February 24, 2019 13:53
-
-
Save mikerr/1c8a62c864052d07421f2e491bec490e to your computer and use it in GitHub Desktop.
show charging status of pod-point EV charging stations
This file contains 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
!/bin/bash | |
# show charging status of pod-point EV charging stations | |
# pod-point.com | |
# usage: pod-status st-helens-retail-park-kdxd | |
html=$(curl -s https://charge.pod-point.com/address/$1) | |
name=$(grep h1 <<< $html | sed -e 's/<[^>]*>//g') | |
status=$(grep fa-flash <<< $html | sed -e 's/<[^>]*>//g' | tr -d " ") | |
readarray -t port <<< "$status" | |
echo $name | |
echo | |
echo "Status A: ${port[0]}" | |
echo "Status B: ${port[1]}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment