Skip to content

Instantly share code, notes, and snippets.

@cjo20
Last active January 18, 2018 21:25
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cjo20/42ce5227cc1412513448da17f5f1ab84 to your computer and use it in GitHub Desktop.
Save cjo20/42ce5227cc1412513448da17f5f1ab84 to your computer and use it in GitHub Desktop.
#!/bin/bash
echo { \"_type\": \"AlarmSensor\", \
\"_description\": \"Battery Percentage log\", \
\"alarm_type\": 104, \
\"alarm_description\": \"Battery\", \
\"_body\" : \"\", \
\"_head\": \"\", \
\"enteredBy\": \"openaps://medtronic/554\", \
\"eventType\" :\"Note\", \
\"medtronic\": \"mm://openaps/battery-status\", \
\"timestamp\": \"`date +%Y-%m-%dT%H:%M:%S%z`\", \
\"notes\": \"Battery: `./voltage 2`\", \
\"created_at\" : \"`date +%Y-%m-%dT%H:%M:%S%z`\" }
1-59/15 * * * * /home/edison/generate_report.sh | /usr/local/bin/ns-upload $NIGHTSCOUT_HOST $API_SECRET treatments.json - >> /home/edison/cronlog.txt 2>&1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment