Skip to content

Instantly share code, notes, and snippets.

@cjo20 cjo20/generate_report.sh
Last active Jan 18, 2018

Embed
What would you like to do?
#!/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
You can’t perform that action at this time.