8000 GitHub - tepidjuice/http-widget: Offline control mechanism for OpenAPS
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

tepidjuice/http-widget

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 

Repository files navigation

http-widget

Offline control mechanism for OpenAPS

Android "HTTP widget" allows you to show text inside the widget, perfect for OpenAPS monitoring without using Nightscout (in case no internet access is available).

http-widget

sudo apt-get install jq

  • add the following cron line to your crontab (where myopenpas is your openaps init directory)

@reboot cd /root/myopenaps/enact && python -m SimpleHTTPServer 1337

  • add the following openaps alias to your openaps.ini

http-widget = ! bash -c "( jq .timestamp ~/myopenaps/enact/enacted.json | awk '{print substr($0,13,5)}' | tr '\n' ' ' && echo \"(last enact)\" && jq -r .reason ~/myopenaps/enact/enacted.json && echo -n 'TBR: ' && jq .rate ~/myopenaps/enact/enacted.json && echo -n 'IOB: ' && jq .IOB ~/myopenaps/enact/enacted.json && echo -n 'Autosens: ' && jq .ratio ~/myopenaps/settings/autosens.json && echo -n 'Edison: ' && (~/src/EdisonVoltage/voltage short) | awk '{print $2,$1}' && echo -n 'Pump: ' && cat ~/myopenaps/monitor/reservoir.json && echo -n 'U ' && jq .voltage ~/myopenaps/monitor/battery.json | tr '\n' 'v' && echo \" \")> ~/myopenaps/enact/index.html"

  • modify the openaps pump-loop cron line to (openaps http-widget needs to be run each minute)

* * * * * cd /root/myopenaps && ( ps aux | grep -v grep | grep -q 'openaps pump-loop' || openaps pump-loop ) 2>&1 | tee -a /var/log/openaps/pump-loop.log && openaps http-widget > /dev/null 2>&1 `

  • On your Android phone add a HTTP widget as you know how to add widgets normally and set the the http with your rig IP address using port 1337

add-widget

`

About

Offline control mechanism for OpenAPS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0