Code Monkey home page Code Monkey logo

Comments (15)

eyim avatar eyim commented on July 17, 2024

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.

scottleibrand avatar scottleibrand commented on July 17, 2024

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.

eyim avatar eyim commented on July 17, 2024

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.

MosiGitHub avatar MosiGitHub commented on July 17, 2024

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.

eyim avatar eyim commented on July 17, 2024

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.

MosiGitHub avatar MosiGitHub commented on July 17, 2024

Thanks eyim. I will try that tomorrow. 👍

from docs.

ddaniels1 avatar ddaniels1 commented on July 17, 2024

Eyim, got it set up, working well

from docs.

MosiGitHub avatar MosiGitHub commented on July 17, 2024

@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.

eyim avatar eyim commented on July 17, 2024

@MosiGitHub Could be. I changed it because I kept getting this error:

openaps/oref0@0ec424a

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.

MosiGitHub avatar MosiGitHub commented on July 17, 2024

@eyim thanks. Now it makes sense for me ...

from docs.

scottleibrand avatar scottleibrand commented on July 17, 2024

Is there any remaining work to do for this issue? Anything we discussed above that needs to be documented?

from docs.

eyim avatar eyim commented on July 17, 2024

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.

scottleibrand avatar scottleibrand commented on July 17, 2024

Any volunteers to fix those things?

from docs.

eyim avatar eyim commented on July 17, 2024

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.

danamlewis avatar danamlewis commented on July 17, 2024

Closing since I believe this is resolved with the new setup script process for AMA configuration.

from docs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.