Skip to content

Instantly share code, notes, and snippets.

@mikerr
Last active February 24, 2019 13:53
Show Gist options
  • Save mikerr/1c8a62c864052d07421f2e491bec490e to your computer and use it in GitHub Desktop.
Save mikerr/1c8a62c864052d07421f2e491bec490e to your computer and use it in GitHub Desktop.
show charging status of pod-point EV charging stations
!/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