Skip to content

Instantly share code, notes, and snippets.

@rjhornsby
Last active September 6, 2015 05:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rjhornsby/1a672c22a0b7f081dd28 to your computer and use it in GitHub Desktop.
Save rjhornsby/1a672c22a0b7f081dd28 to your computer and use it in GitHub Desktop.
Output the GFNB temperature readings
#!/bin/bash
# Set this to your router's address #
gfnb_ip=192.168.2.1
# Don't change anything below this line #
echo -n "$(date) "
curl -s "http://$gfnb_ip/content.json?checksum=0&_=0" | ruby -rjson -e 'puts JSON.parse(STDIN.read)["temperature"]'
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment