NightscoutFoundation / xDrip

Nightscout version of xDrip+
https://jamorham.github.io/#xdrip-plus
GNU General Public License v3.0
1.41k stars 1.15k forks source link

Implement Bonjour/mDNS for Nightscout/REST-API hosts. #400

Open dcacklam opened 6 years ago

dcacklam commented 6 years ago

Right now, only IP addresses and valid internet DNS names work as nightscout uploader destinations.

Adding mdns support (to resolve .local addresses) would allow resolution of local uploader targets (eg, OpenAPS) when offline or behind a DNS filtering firewall.

Navid200 commented 3 years ago

@dcacklam Is this still good to have? Would you please update considering it's been almost 3 years? Thanks

dcacklam commented 3 years ago

It is still a good ask, as OpenAPS utilizes MDNS to propagate hostnames.....

On Mon, Feb 15, 2021, 12:14 PM Navid200 notifications@github.com wrote:

@dcacklam https://github.com/dcacklam Is this still good to have? Would you please update considering it's been almost 3 years? Thanks

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/NightscoutFoundation/xDrip/issues/400#issuecomment-779428860, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHAS6ZTS77RV5N3H7HEKCATS7F6D5ANCNFSM4E3H2RNQ .

Navid200 commented 3 years ago

Even though it may seem obvious to you why it is a good idea to have this, would you please state what a user needs to do now and what he/she would have to do after this is implemented? I would like to understand what this is and how it would benefit the users so that I can label it accordingly. Thanks

dcacklam commented 3 years ago

The OpenAPS closed loop system can use xDrip as a direct CGM source.

This allows a closed loop user to continue looping even when internet access is lost (via WiFi or bluetooth tether to a phone running xDrip, even if that phone has no service)

OpenAPS also enables mDNS, such that every OpenAPS device broadcasts ip info for a hostname.local (eg myopenaps.local) mDNS domain name.....

However, because there is no mDNS support in xDrip, xDrip cannot resolve .local domain names (eg, myopenaps.local), and as a result ip addresses for wifi and bluetooth have to be entered into the nightscout rest-API field manually.

If the ip changes (and these are DHCP assigned IPs, so they can change), offline looping fails.

With MDNS support, the .local domain name could be entered, and would work for all variants of wifi or bluetooth connectivity.

On Wed, Feb 17, 2021, 9:14 AM Navid200 notifications@github.com wrote:

Even though it may seem obvious to you why it is a good idea to have this, would you please state what a user needs to do now and what he/she would have to do after this is implemented? I would like to understand what this is and how it would benefit the users so that I can label it accordingly. Thanks

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/NightscoutFoundation/xDrip/issues/400#issuecomment-780710767, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHAS6ZX7XAM5VXGWV3ALUADS7P2Q7ANCNFSM4E3H2RNQ .

Navid200 commented 3 years ago

Let's say I am using AAPS with xDrip as is. Let's say I have no access to WiFi or any cell network. Are you saying the loop will go open?

dcacklam commented 3 years ago

This applies to OpenAPS not AAPS.

Rather than relying on a user's phone (ala Loop or AndroidAPS), OpenAPS uses a separate computing device (Raspberry Pi or Edison) running Linux to do everything other-than CGM functions.

That device requires CGM data as an input - and in the use-case I am talking about, it recieves that data from XDrip via emulating the Nightscout REST-API interface (eg, XDrip sees an OpenAPS system as-if it were a second nightscout site).

If IP network connectivity between the Xdrip phone and the OpenAPS system is broken, the loop goes open due to lack of CGM data.

Presently, that connectivity (For this specific use-case) is maintained via entering every possible offline IP address (both WiFI or bluetooth) into the XDrip nightscout-site configuration, and changing them manually if DHCP changes the address being issued.

If MDNS/Bojour were implemented, the list of configured IPs could be reduced to the OpenAPS system's hostname.local MDNS domain

On Wed, Feb 17, 2021 at 10:39 AM Navid200 notifications@github.com wrote:

Let's say I am using AAPS with xDrip as is. Let's say I have no access to WiFi or any cell network. Are you saying the loop will go open?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/NightscoutFoundation/xDrip/issues/400#issuecomment-780764836, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHAS6ZTFOWUYPBDLAMMW35DS7QEPJANCNFSM4E3H2RNQ .

clvsjr9 commented 1 year ago

Very interesting and very useful to facilitate the usability of users: https://developer.android.com/training/connect-devices-wirelessly/nsd