Coder Social home page Coder Social logo

Comments (16)

MilosKozak avatar MilosKozak commented on July 28, 2024 1

i believe i cannot help. latest library used in AAPS requires https.

from androidaps.

MilosKozak avatar MilosKozak commented on July 28, 2024

check records in mongo database
https://yourns/api/v1/devicestatus.json

from androidaps.

alfureu avatar alfureu commented on July 28, 2024

I am getting this:

{"status":401,"message":"Unauthorized","description":"Invalid/Missing"}

Please note that I am logged in in the tab on the basic page https://myns.com, however, when I add the part /api/v1/devicestatus.json it does not work.

from androidaps.

MilosKozak avatar MilosKozak commented on July 28, 2024

hmmm enable default read access or look directly into mongo database

from androidaps.

alfureu avatar alfureu commented on July 28, 2024

I am already admin, using the standard API_SECRET in the browser.... did you have in mind something else? My AndroidAPS is logged in as admin, so should have all the access too

from androidaps.

alfureu avatar alfureu commented on July 28, 2024

OK, I think I figured it out. So I set up my AndroidAPS' NS Client properly, the connection was working (please note I have also a VPN enabled). All the data have been uploaded, except the pump data.

Now, things changed, when I rebooted the phone, the data from the pump appeared in NS. Hope this info is helpful. It would be nice if AndroidAPS could survive a VPN change, and the connection on the NS Client needs to be investigated thoroughly so no reboot is needed next time.

from androidaps.

alfureu avatar alfureu commented on July 28, 2024

Just a follow-up, I have an exception for Android APS to avoid the VPN connection and route outside of it, however, AndroidAPS somehow does not respect this setup. Using this app for VPN: https://play.google.com/store/apps/details?id=de.blinkt.openvpn&hl=en

from androidaps.

MilosKozak avatar MilosKozak commented on July 28, 2024

what's the problem?

from androidaps.

alfureu avatar alfureu commented on July 28, 2024

The problem is the following: I am using NS+mongo on my self-hosted rig, instead of Heroku+github and the other solutions. I have an OpenVPN access to my server, and some services I connect to through the Internet with my own domain name (example.com).

I initially thought that I can set up NS+AAPS+CGM (Bubble's DiaBox) where all the data will be loaded into NS with the OpenVPN connection from my phone (not using xDrip+, 2 apps are enough for my battery life). The problem is that NS requires a valid SSL certificate to the server, which I am not able to obtain in my LAN (DNS challenge does not work yet with GoDaddy and Caddy v2).

This forced me to open NS to the Internet. However, for some reason, DiaBox does not upload data to NS through https, so I have to VPN back home and use a LAN address to do it successfully (emailed the developers, waiting for their reply). NS cannot do this (see above), so I have to route it through the Internet in order to do this through https. Blinkt's OpenVPN app can do the separation, so AndroidAPS connects through normal Wifi, all other connections go through OpenVPN. The connections are successful (I see all the pings in the logs), all the data are uploaded to NS, except one, and that is the pump status. AndroidAPS uploads all the profiles, treatments, etc., to NS except the pump data. I guess this is some bug. As soon as I disconnect from VPN and restart the phone, the pump data is uploaded correctly, but in this case Diabox cannot upload the BG results to NS.

The best option would be to allow for cases of selfhosting, i.e. for those who are non-stop connected to their self-hosted devices through VPN, to disable the requirement for https in AndroidAPS, as the connection is secured, just not how it expects it.

from androidaps.

alfureu avatar alfureu commented on July 28, 2024

So you do not find it weird that all data is uploaded except pump data (and OpenAPS)? :D I guess there is an issue in implementation, where pump+OpenAPS does not respect the VPN routing on Android...

from androidaps.

MilosKozak avatar MilosKozak commented on July 28, 2024

how do think an app can affect internal android routing?

from androidaps.

alfureu avatar alfureu commented on July 28, 2024

OK, I just want to help you finding the issue. Could you please check again the initial screenshot I posted and explain me why all the other data is loaded from AAPS except the pump data? This data is available in AAPS, I have no explanation why it is not being uploaded to NS, while the connection was established "2 minutes ago" ... Again, all the basals, boluses, etc. is updated correctly from AAPS -> NS.

from androidaps.

MilosKozak avatar MilosKozak commented on July 28, 2024

pump data is provided by pump driver. i can imagine situations like pump not initialized where pump data is not provided by driver

from androidaps.

alfureu avatar alfureu commented on July 28, 2024

How can I check this? The bluetooth connection is made to Insight fw v2.0. The phone receives data from the pump as far as I can see.

from androidaps.

MilosKozak avatar MilosKozak commented on July 28, 2024

whats in devicestatus jsons?

from androidaps.

alfureu avatar alfureu commented on July 28, 2024

I am getting this:

{"status":401,"message":"Unauthorized","description":"Invalid/Missing"}

Please note that I am logged in in the tab on the basic page https://myns.com, however, when I add the part /api/v1/devicestatus.json it does not work.

from androidaps.

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.