Comments (15)
Looks like Jason uses this alias to create carbhistory.json from Nightscout. I wonder if there is a way to pull it directly from the pump.
ns-carbs = ! bash -c "curl -m 30 -s "$NIGHTSCOUT_HOST/api/v1/treatments.json?find[created_at][$gte]=date -d \"6 hours ago\" -Iminutes
&find[carbs][$exists]=true" > monitor/carbhistory.json; exit 0"
However, when using this in my loop I get the error: --+->>-Could not find glucose data
from docs.
By default carbs are retrieved from bolus wizard entries in pumphistory.json. You only need to pass carbhistory.json if you don't enter carbs there, but only via NS.
Sounds like you're seeing openaps/oref0#127.
from docs.
Thanks Scott for the clarification on pumphistory.json.
Also that is the exact error I am seeing. I appreciate the heads up on that.
from docs.
Thanks eyim and scottleibrand. I was thinking about the same: to make the loop with AMA independent of an internet connection (except the temp targets functionality). So I will try it with the pumphistory instead of pulling the carbs from NS. 👍
from docs.
Okay this seems to be working for me if you want to try it:
[report "monitor/meal.json"]
profile = settings/profile.json
use = shell
clock = monitor/clock-zoned.json
reporter = text
json_default = True
pumphistory = monitor/pumphistory-zoned.json
basal = settings/basal_profile.json
carbs =
device = meal
remainder =
glucose = monitor/glucose.json
Basically I made the carbs line be just carbs =
In addition, I changed the order as it wanted carbs = to be after the basal line. I also made this change to the device so my meal.ini now looks like:
[device "meal"]
fields = pumphistory profile clock glucose basal carbs
cmd = oref0
args = meal
This seems to work but will test more.
from docs.
Thanks eyim. I will try that tomorrow. 👍
from docs.
Eyim, got it set up, working well
from docs.
@eyim I took a look to my version of OpenAps today and I was wondering why you changed the order of carbs etc. I checked which order oref0-meal.js was asking for and for me it seemed that it still was carbs then glucose and the last was basal. I changed to the AMA branch a month ago. Could it be that my branch is outaged?
from docs.
@MosiGitHub Could be. I changed it because I kept getting this error:
Not sure if the device order of fields needs to be exactly the same as the report or not.
@ddaniels1 Great to hear you got it working! Congrats
from docs.
@eyim thanks. Now it makes sense for me ...
from docs.
Is there any remaining work to do for this issue? Anything we discussed above that needs to be documented?
from docs.
The double counting of carbs issue is taken care of with a recent release. I haven't tested it myself but have seen several others say it is fixed.
The docs still don't mention how to create monitor/carbhistory.json and it looks like the author of the page has a question for you near the end, it says:
Scott / Dana: Can I throw Autosens at the end of this?
from docs.
Any volunteers to fix those things?
from docs.
Okay I fixed the creation of the monitor/carbhistory.json alias and also fixed the meal device and report monitor/meal.json.
I don't know what the comment about autosens means so left it as is.
I already submitted the pull request
from docs.
Closing since I believe this is resolved with the new setup script process for AMA configuration.
from docs.
Related Issues (20)
- Add instructions on how to "open loop" HOT 4
- Interacting with the APS HOT 1
- Suggestion for flowcharts/visuals/diagrams/images moving forward HOT 5
- Hardware for attaching Explorer block to Intel Edison HOT 2
- Max IOB example is misleading
- suggestion making requirements for rig more clear (especially explorer HAT) HOT 6
- compatible pumps - update for Tandem t:slim X2 HOT 1
- Debian Jessie has lost upstream support HOT 1
- why not have chinese HOT 1
- "Get your rig parts" page puts casing info for Edison boards inside "Pi-based setups with rewired TI-stick" section HOT 1
- Information about Li-Po battery lifetime HOT 1
- Autobuild Documentation for Pull Requests HOT 1
- This is still broken - running curl -s https://raw.githubusercontent.com/openaps/docs/master/scripts/quick-packages.sh | bash - HOT 1
- MongoDB cluster setup instructions missing from Nightscout install page HOT 4
- Add Flashing Troubleshooting to the Main Nav HOT 3
- Dropdown rendering in github but not RTD
- Documentation outdated: overview incorrectly shows OmniPod as not loopable! HOT 2
- Does this still work after mLab MongoDB add-on removed from Heroku? HOT 2
- questions about androidaps note HOT 2
- Master vs dev discrepancy
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docs.