Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Haroon Ghori
    @hsghori
    @old-square-eyes got the same error when I ran autotune web using a url with token auth with admin (permissions=*) permissions.
    same error on my local rig.
    old-square-eyes
    @old-square-eyes
    If you want autotune web to run at all your whole NS site needs to be readable
    AUTH_DEFAULT_ROLES config var in Heroku (not nightscout settings) must be "readable" without the quotes.
    This makes your site publicly available. But you can put it back to "denied" later
    NS settings admin subjects & roles are for the API
    They come in to play when AUTH_DEFAULT_ROLES is set to "denied"
    I don't use autotune web pretty much for this reason. It's not worth the hassle.
    old-square-eyes
    @old-square-eyes
    Autotune runs on my rigs at 4am every night. I just SSH to my rig and run cd myopenaps/autotune && cat autotune_recommendations.log whenever I need to review my settings
    But you can run it manually too of course. Scenarios are described here: https://openaps.readthedocs.io/en/latest/docs/Customize-Iterate/autotune.html#different-ways-to-utilize-autotune
    Haroon Ghori
    @hsghori

    OK I set AUTH_DEFAULT_ROLES=readable in heroku and played around with my API_SECRET based on openaps/oref0#397 and it's still not working on my local rig.

    Running like

    oref0-autotune --dir='~/openaps' --ns-host='https://xxx.herokuapp.com' --start-date='2021-03-10' --end-date='2021-03-24'
    Haroon Ghori
    @hsghori
    (it's not working with no secret, hashed secret, and token when AUTH_DEFAULT_ROLES=readable).
    old-square-eyes
    @old-square-eyes
    You don't need readable unless you are using Autotune web
    For CLI
    When you installed OpenAPS, did you select API SECRET, and then use a token by any chance?
    That is a pretty old ticket.
    Are you running autotune CLI from a mac?
    I was under the impression you were running it from your rig
    Haroon Ghori
    @hsghori
    I'm running it from a mac - i'm using the word "rig" liberally here - just trying to run autotune on it's own rn.
    pulled that ticket off of the docs
    Haroon Ghori
    @hsghori
    It's also still giving the same error on autotune web when i have AUTH_DEFAULT_ROLES= readable
    Compressing old json and log files to save space...
    gzip: ns-*.json: No such file or directory
    gzip: autotune*.json: No such file or directory
    Autotune disk usage:
    16K    .
    Overall disk used/avail:
    Filesystem      Size  Used Avail Use% Mounted on
    /dev/sdb1        69G   55M   65G   1% /mnt
    Grabbing NIGHTSCOUT treatments.json and entries/sgv.json for date range...
    Query: https://hsghori-nightscout.herokuapp.com entries/sgv.json find%5Bdate%5D%5B%24gte%5D=1616151600000&find%5Bdate%5D%5B%24lte%5D=1616238000000&count=1500
    -rw-r--r-- 1 _azbatch _azbatchgrp 3 Mar 25 23:13 ns-entries.2021-03-19.json
    Query: https://hsghori-nightscout.herokuapp.com treatments.json find%5Bcreated_at%5D%5B%24gte%5D=2021-03-18T06:00-07:00&find%5Bcreated_at%5D%5B%24lte%5D=2021-03-20T18:00-07:00
    -rw-r--r-- 1 _azbatch _azbatchgrp 149942 Mar 25 23:13 ns-treatments.2021-03-19.json
    oref0-autotune-prep   ns-treatments.2021-03-19.json profile.json ns-entries.2021-03-19.json profile.pump.json > autotune.2021-03-19.json
    undefined:1
    undefined
    ^
    
    SyntaxError: Unexpected token u in JSON at position 0
        at JSON.parse (<anonymous>)
        at categorizeBGDatums (/usr/src/oref0/lib/autotune-prep/categorize.js:73:28)
        at generate (/usr/src/oref0/lib/autotune-prep/index.js:23:30)
        at Object.<anonymous> (/usr/src/oref0/bin/oref0-autotune-prep.js:131:27)
        at Module._compile (module.js:652:30)
        at Object.Module._extensions..js (module.js:663:10)
        at Module.load (module.js:565:32)
        at tryModuleLoad (module.js:505:12)
        at Function.Module._load (module.js:497:3)
        at Function.Module.runMain (module.js:693:10)
    Warning: API_SECRET is not set when calling oref0-autotune.sh
    (this is only a problem if you have locked down read-only access to your NS).
    Could not run oref0-autotune-prep ns-treatments.2021-03-19.json profile.json ns-entries.2021-03-19.json
    Haroon Ghori
    @hsghori
    FYI I was able to get autotune working through the python script (had to make some modifications though). Feels like there might be a bug in how the main script is encoding the URL maybe(?) but I haven't dug too much into the differences.
    Robert
    @mountrcg
    @hsghori on a Mac I had to set an environment variable with an access-token from NS in /etc/
    sudo nano environment
    insert en=autotune-API_SECRET=token=<your token>
    and after saving export API_SECRET=token=<again your token>
    sharbi
    @sharbi
    hey team, just started with openaps over the past week and a bit still getting used to everything, just wanted to check as docs aren't entirely clear on this: when autotune runs and updates the profile do the new ISF/carb ratio and basal rates need to be updated on the pump? or does openaps just achieve this on its own through temp basals over current pump setting?
    Dana Lewis
    @danamlewis
    The latter. If you want to change your default pump settings you can, but no need (Autotune profile is used via the rig to drive its decisions. Pump settings will only come into play if your rig is off and you “fall back” to those settings.) so if they’re quite a bit different over time you may want to adjust the pump settings, but it’s not a daily thing you have to do.
    PRs welcome to the docs if you have an idea for making that point more clear!
    sharbi
    @sharbi
    great thank you very much - follow up question - guessing that carb ratio should be updated on the pump if I'm not using SMB yet? given the need to manually input carbs + bolus via pump wizard?
    will have a read through the docs and see if I can word differently to clarify! thanks again :)
    Foxy7
    @Foxy7
    @sharbi yes exactly the CR will need to be updated on the pump. just be aware that Autotune results are for one carb ratio for the entire day. same for ISF.
    a good commentary on how this works over time https://www.diabettech.com/openaps/autotune-reviewing-the-outputs/
    old-square-eyes
    @old-square-eyes
    @danamlewis are values used unabated from recommendations? Or are they anchored in some way to the pump settings (by safety settings or otherwise)?
    Are all recommendations used like this? e.g. ISF
    Dana Lewis
    @danamlewis
    They are anchored with safety settings to the pump settings
    old-square-eyes
    @old-square-eyes
    @danamlewis Ah cool. Thought so. I knew there was a reason I semi regularly review recommendations. "Pump settings will only come into play if your rig is off and you “fall back” to those settings" - Is what threw me.
    Matthias Schlögl
    @sennierer
    Hi, I am running autotune with a cron job on my own server (dev branch with AAPS, omnipod, G6) daily. It has tuned my night basal rates very well (hard to tell with my day basal rates though). However, I was wondering if there are any suggestions on the number of days to run it on if you use it on a daily basis? I am currently using 5 days.
    John Kitching
    @JohnKitching
    This certainly isn’t a recommendation, I’m just sharing what I do and why. I run AT every few weeks on the maximum amount of data (30 days) because I find it works well for me if I treat basal, ISF & CR changes as a long term thing whilst sensitivity deals with faster changes.
    Matthias Schlögl
    @sennierer
    I see! Thanks!
    SeregaYakovlev
    @SeregaYakovlev
    Hello! What is the difference between sensitivity_raises_target & resistance_lowers_target and autosens_adjust_target?
    DasWuff
    @DasWuff
    Hello, I'm trying to run AutoTune on my nightscout, however I keep getting an error returned.

    oref0-autotune-core autotune.2021-05-07.json profile.json profile.pump.json > newprofile.2021-05-07.json

    CRTotalCarbs: 0 CRTotalInsulin: 0 totalCR: NaN

    ERROR: bad basalProfile { i: 0, minutes: 0, rate: 0, start: '00:00:00', untuned: 1 }

    parse error: Invalid numeric literal at line 2, column 0

    jq: error: syntax error, unexpected LITERAL, expecting $end (Unix shell quoting issues?) at <top-level>, line 1:

    newprofile.2021-05-07.json

    jq: 1 compile error

    Warning: API_SECRET is not set when calling oref0-autotune.sh

    (this is only a problem if you have locked down read-only access to your NS).

    newprofile.2021-05-07.json invalid

    DasWuff
    @DasWuff
    I'm pretty sure I don't have my NS locked down - it looks like it's able to read values near the beginning
    Dana Lewis
    @danamlewis
    Looks like an issue with the profile file. If you want to paste the contents here we can take a look and help you spot it
    DasWuff
    @DasWuff

    Stand by... I'm also running it with just 7 days instead of 30.

    Also, do you mean a picture of the Profile Editor (as I've seen above), or something else?

    Also, I would like to specify, I'm running it off AutotuneWeb, not a localized instance.
    DasWuff
    @DasWuff
    Nope. It lasted longer with only 7 days of data, but it still errored out the same way.
    DasWuff
    @DasWuff
    ...Wait. I might be an idiot.
    Dana Lewis
    @danamlewis
    Ah, then check your profile settings in NS and make sure it doesn’t have a 0 basal rate listed somewhere
    DasWuff
    @DasWuff
    Yep. That was it essentially. Had my Auto Mode profile selected, not my Basal 1 profile. That did the trick, and it ran smoothly. Thanks!
    Dana Lewis
    @danamlewis
    👍🏼