Skip to content

Instantly share code, notes, and snippets.

@chrowe
Last active August 29, 2015 14:26
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 chrowe/afd4d50fb6d3f585dd53 to your computer and use it in GitHub Desktop.
Save chrowe/afd4d50fb6d3f585dd53 to your computer and use it in GitHub Desktop.
OPK water temps
#!/bin/bash
cd /root
watch -n600 "./opk-temper1-cli/pull --scale farenheit | ./opk-wrap/wrap -s JSON -k temp | ./opk-phant-json/push ; ./opk-1-wire-cli/pull --path 041471d2a2ff --scale fahrenheit | ./opk-cli--phant/push --public_key VGAXp1b2bgtmVJK9JqMJ --private_key 9YAg2kBaBZTk8oa4ovwo --url data.sparkfun.com --field_name temp"
#!/bin/bash
# configure pirateship image
pirateship rename <computer name>
pirateship adapter <SSID> <password> WPA
# install opk drivers
# NOTE: must manually copy phant 'keys_*.json' file to /root directory
cd /root
git clone https://github.com/open-eio/opk-phant-json.git
git clone https://github.com/open-eio/opk-phant-cli.git
git clone https://github.com/open-eio/opk-wrap.git
git clone https://github.com/openpipekit/opk-temper1-cli.git
opk-temper1-cli/install
git clone https://github.com/openpipekit/opk-1-wire-cli.git
echo 'dtoverlay=w1-gpio' > /boot/config.txt #Requires reboot
opk-1-wire-cli/install
reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment