burnedikt / diasend-nightscout-bridge

Synchronize your diasend data to nightscout.
MIT License
18 stars 18 forks source link

Pulling in only Glucose Values (CGM) #23

Closed jay-beco closed 1 year ago

jay-beco commented 1 year ago

Was able to get it running but am seeing only the updated CGM Infos in Nightscout? ... and only in 10min intervals?!

Fetching diasend patient records between 2023-01-01T09:10:42.000Z and 2023-01-01T09:20:48.200Z Number of glucose records since 10 minutes ago (2023-01-01T09:10:42.000Z - 2023-01-01T09:20:48.200Z): 1 Sending 1 entries to nightscout Next run (Entries) will be in in 5 minutes... Fetching diasend patient records between 2023-01-01T09:05:46.706Z and 2023-01-01T09:25:46.706Z Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in 5 minutes... Fetching diasend patient records between 2023-01-01T09:15:41.000Z and 2023-01-01T09:25:48.707Z Number of glucose records since 10 minutes ago (2023-01-01T09:15:41.000Z - 2023-01-01T09:25:48.707Z): 0 Sending 0 entries to nightscout Next run (Entries) will be in in 5 minutes... Fetching diasend patient records between 2023-01-01T09:05:46.706Z and 2023-01-01T09:30:46.706Z Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in 5 minutes... Fetching diasend patient records between 2023-01-01T09:15:41.000Z and 2023-01-01T09:30:48.878Z Number of glucose records since 15 minutes ago (2023-01-01T09:15:41.000Z - 2023-01-01T09:30:48.878Z): 2 Sending 2 entries to nightscout Next run (Entries) will be in in 5 minutes... Fetching diasend patient records between 2023-01-01T09:05:46.706Z and 2023-01-01T09:35:46.706Z Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in 5 minutes... Fetching diasend patient records between 2023-01-01T09:25:41.000Z and 2023-01-01T09:35:49.661Z Number of glucose records since 10 minutes ago (2023-01-01T09:25:41.000Z - 2023-01-01T09:35:49.661Z): 1 Sending 1 entries to nightscout Next run (Entries) will be in in 5 minutes...

How do I get the additional Infos bridged to NS?

burnedikt commented 1 year ago

Was able to get it running but am seeing only the updated CGM Infos in Nightscout? ... and only in 10min intervals?!

The default polling interval to synchronize data from diasend to nightscout is 5 minutes.Generally, CamAPS seems to upload data to diasend only every 5 minutes, that's why the "stupid" default of synchronizing every 5 minutes was taken.

https://github.com/burnedikt/diasend-nightscout-bridge/blob/184691c00b6f4e81dad511006b25d6fbf93d8a3c/index.ts#L224-L225

Of course, you can adapt this to any interval you like, e.g. every minute. Just change the call to startSynchronization so it uses a different time interval like:

startSynchronization({
  // every minute
  pollintIntervalMs: 1 * 60 * 1000 
});

How do I get the additional Infos bridged to NS?

Unsure which additional infos you want to have bridged but if you're thinking about treatments, they're already synchronized as can be seen in your logs (there just were no treatments detected) --> Sending 0 treatments to nightscout.

jay-beco commented 1 year ago

Morning - that helped so far. Thanks! Still figuring stuff out, but the update of the intervall did the trick!

jay-beco commented 1 year ago

Even though I'm fetching Data now every minute I'm getting data holes for up to 15minutes.. and than it's fetching multiple entries in one poll again... Any idea why?

Fetching diasend patient records between 2023-01-03T10:30:47.000Z and 2023-01-03T10:32:34.468Z Number of glucose records since 2 minutes ago (2023-01-03T10:30:47.000Z - 2023-01-03T10:32:34.468Z): 0 Sending 0 entries to nightscout Next run (Entries) will be in in a minute... Fetching diasend patient records between 2023-01-03T10:00:01.000Z and 2023-01-03T10:32:28.761Z Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Fetching diasend patient records between 2023-01-03T10:30:47.000Z and 2023-01-03T10:33:34.652Z Number of glucose records since 3 minutes ago (2023-01-03T10:30:47.000Z - 2023-01-03T10:33:34.652Z): 0 Sending 0 entries to nightscout Next run (Entries) will be in in a minute... Fetching diasend patient records between 2023-01-03T10:00:01.000Z and 2023-01-03T10:33:28.761Z Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Fetching diasend patient records between 2023-01-03T10:30:47.000Z and 2023-01-03T10:34:34.866Z Number of glucose records since 4 minutes ago (2023-01-03T10:30:47.000Z - 2023-01-03T10:34:34.866Z): 0 Sending 0 entries to nightscout Next run (Entries) will be in in a minute... Fetching diasend patient records between 2023-01-03T10:00:01.000Z and 2023-01-03T10:34:28.761Z Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Fetching diasend patient records between 2023-01-03T10:30:47.000Z and 2023-01-03T10:35:35.114Z Number of glucose records since 5 minutes ago (2023-01-03T10:30:47.000Z - 2023-01-03T10:35:35.114Z): 0 Sending 0 entries to nightscout Next run (Entries) will be in in a minute... Fetching diasend patient records between 2023-01-03T10:00:01.000Z and 2023-01-03T10:35:28.761Z Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Fetching diasend patient records between 2023-01-03T10:30:47.000Z and 2023-01-03T10:36:35.281Z Number of glucose records since 6 minutes ago (2023-01-03T10:30:47.000Z - 2023-01-03T10:36:35.281Z): 0 Sending 0 entries to nightscout Next run (Entries) will be in in a minute... Fetching diasend patient records between 2023-01-03T10:00:01.000Z and 2023-01-03T10:36:28.761Z Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Fetching diasend patient records between 2023-01-03T10:30:47.000Z and 2023-01-03T10:37:35.510Z Number of glucose records since 7 minutes ago (2023-01-03T10:30:47.000Z - 2023-01-03T10:37:35.510Z): 0 Sending 0 entries to nightscout Next run (Entries) will be in in a minute... Fetching diasend patient records between 2023-01-03T10:00:01.000Z and 2023-01-03T10:37:28.761Z Fetching diasend patient records between 2023-01-03T10:30:47.000Z and 2023-01-03T10:38:35.707Z Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Number of glucose records since 8 minutes ago (2023-01-03T10:30:47.000Z - 2023-01-03T10:38:35.707Z): 0 Sending 0 entries to nightscout Next run (Entries) will be in in a minute... Fetching diasend patient records between 2023-01-03T10:00:01.000Z and 2023-01-03T10:38:28.761Z Fetching diasend patient records between 2023-01-03T10:30:47.000Z and 2023-01-03T10:39:35.957Z Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Number of glucose records since 9 minutes ago (2023-01-03T10:30:47.000Z - 2023-01-03T10:39:35.957Z): 0 Sending 0 entries to nightscout Next run (Entries) will be in in a minute... Fetching diasend patient records between 2023-01-03T10:00:01.000Z and 2023-01-03T10:39:28.761Z Fetching diasend patient records between 2023-01-03T10:30:47.000Z and 2023-01-03T10:40:36.229Z Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Number of glucose records since 10 minutes ago (2023-01-03T10:30:47.000Z - 2023-01-03T10:40:36.229Z): 0 Sending 0 entries to nightscout Next run (Entries) will be in in a minute... Fetching diasend patient records between 2023-01-03T10:00:01.000Z and 2023-01-03T10:40:28.761Z Fetching diasend patient records between 2023-01-03T10:30:47.000Z and 2023-01-03T10:41:36.514Z Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Number of glucose records since 11 minutes ago (2023-01-03T10:30:47.000Z - 2023-01-03T10:41:36.514Z): 0 Sending 0 entries to nightscout Next run (Entries) will be in in a minute... Fetching diasend patient records between 2023-01-03T10:00:01.000Z and 2023-01-03T10:41:28.761Z Fetching diasend patient records between 2023-01-03T10:30:47.000Z and 2023-01-03T10:42:36.788Z Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Number of glucose records since 12 minutes ago (2023-01-03T10:30:47.000Z - 2023-01-03T10:42:36.788Z): 0 Sending 0 entries to nightscout Next run (Entries) will be in in a minute... Fetching diasend patient records between 2023-01-03T10:00:01.000Z and 2023-01-03T10:42:28.761Z Fetching diasend patient records between 2023-01-03T10:30:47.000Z and 2023-01-03T10:43:37.034Z Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Number of glucose records since 13 minutes ago (2023-01-03T10:30:47.000Z - 2023-01-03T10:43:37.034Z): 0 Sending 0 entries to nightscout Next run (Entries) will be in in a minute... Fetching diasend patient records between 2023-01-03T10:00:01.000Z and 2023-01-03T10:43:28.761Z Fetching diasend patient records between 2023-01-03T10:30:47.000Z and 2023-01-03T10:44:37.336Z Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Number of glucose records since 14 minutes ago (2023-01-03T10:30:47.000Z - 2023-01-03T10:44:37.336Z): 0 Sending 0 entries to nightscout Next run (Entries) will be in in a minute... Fetching diasend patient records between 2023-01-03T10:00:01.000Z and 2023-01-03T10:44:28.761Z Fetching diasend patient records between 2023-01-03T10:30:47.000Z and 2023-01-03T10:45:37.579Z Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Number of glucose records since 15 minutes ago (2023-01-03T10:30:47.000Z - 2023-01-03T10:45:37.579Z): 0 Sending 0 entries to nightscout Next run (Entries) will be in in a minute... Fetching diasend patient records between 2023-01-03T10:00:01.000Z and 2023-01-03T10:45:28.761Z Fetching diasend patient records between 2023-01-03T10:30:47.000Z and 2023-01-03T10:46:37.820Z Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Number of glucose records since 16 minutes ago (2023-01-03T10:30:47.000Z - 2023-01-03T10:46:37.820Z): 3 Sending 3 entries to nightscout Next run (Entries) will be in in a minute... Fetching diasend patient records between 2023-01-03T10:00:01.000Z and 2023-01-03T10:46:28.761Z Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Fetching diasend patient records between 2023-01-03T10:45:46.000Z and 2023-01-03T10:47:38.691Z Number of glucose records since 2 minutes ago (2023-01-03T10:45:46.000Z - 2023-01-03T10:47:38.691Z): 0 Sending 0 entries to nightscout Next run (Entries) will be in in a minute... Fetching diasend patient records between 2023-01-03T10:00:01.000Z and 2023-01-03T10:47:28.761Z Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Fetching diasend patient records between 2023-01-03T10:45:46.000Z and 2023-01-03T10:48:38.861Z Number of glucose records since 3 minutes ago (2023-01-03T10:45:46.000Z - 2023-01-03T10:48:38.861Z): 0 Sending 0 entries to nightscout Next run (Entries) will be in in a minute... Fetching diasend patient records between 2023-01-03T10:00:01.000Z and 2023-01-03T10:48:28.761Z Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Fetching diasend patient records between 2023-01-03T10:45:46.000Z and 2023-01-03T10:49:39.047Z Number of glucose records since 4 minutes ago (2023-01-03T10:45:46.000Z - 2023-01-03T10:49:39.047Z): 0 Sending 0 entries to nightscout Next run (Entries) will be in in a minute... Fetching diasend patient records between 2023-01-03T10:00:01.000Z and 2023-01-03T10:49:28.761Z Fetching diasend patient records between 2023-01-03T10:45:46.000Z and 2023-01-03T10:50:39.198Z Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Number of glucose records since 5 minutes ago (2023-01-03T10:45:46.000Z - 2023-01-03T10:50:39.198Z): 0 Sending 0 entries to nightscout Next run (Entries) will be in in a minute... Fetching diasend patient records between 2023-01-03T10:00:01.000Z and 2023-01-03T10:50:28.761Z Fetching diasend patient records between 2023-01-03T10:45:46.000Z and 2023-01-03T10:51:39.470Z Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Number of glucose records since 6 minutes ago (2023-01-03T10:45:46.000Z - 2023-01-03T10:51:39.470Z): 1 Sending 1 entries to nightscout Next run (Entries) will be in in a minute... Fetching diasend patient records between 2023-01-03T10:00:01.000Z and 2023-01-03T10:51:28.761Z Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Fetching diasend patient records between 2023-01-03T10:50:47.000Z and 2023-01-03T10:52:40.435Z Number of glucose records since 2 minutes ago (2023-01-03T10:50:47.000Z - 2023-01-03T10:52:40.435Z): 0 Sending 0 entries to nightscout Next run (Entries) will be in in a minute... Fetching diasend patient records between 2023-01-03T10:00:01.000Z and 2023-01-03T10:52:28.761Z Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Fetching diasend patient records between 2023-01-03T10:50:47.000Z and 2023-01-03T10:53:40.671Z Number of glucose records since 3 minutes ago (2023-01-03T10:50:47.000Z - 2023-01-03T10:53:40.671Z): 0 Sending 0 entries to nightscout Next run (Entries) will be in in a minute... Fetching diasend patient records between 2023-01-03T10:00:01.000Z and 2023-01-03T10:53:28.761Z Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Fetching diasend patient records between 2023-01-03T10:50:47.000Z and 2023-01-03T10:54:40.825Z Number of glucose records since 4 minutes ago (2023-01-03T10:50:47.000Z - 2023-01-03T10:54:40.825Z): 0 Sending 0 entries to nightscout Next run (Entries) will be in in a minute... Fetching diasend patient records between 2023-01-03T10:00:01.000Z and 2023-01-03T10:54:28.761Z Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Fetching diasend patient records between 2023-01-03T10:50:47.000Z and 2023-01-03T10:55:41.011Z Number of glucose records since 5 minutes ago (2023-01-03T10:50:47.000Z - 2023-01-03T10:55:41.011Z): 0 Sending 0 entries to nightscout Next run (Entries) will be in in a minute... Fetching diasend patient records between 2023-01-03T10:00:01.000Z and 2023-01-03T10:55:28.761Z Fetching diasend patient records between 2023-01-03T10:50:47.000Z and 2023-01-03T10:56:41.191Z Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Number of glucose records since 6 minutes ago (2023-01-03T10:50:47.000Z - 2023-01-03T10:56:41.191Z): 1 Sending 1 entries to nightscout Next run (Entries) will be in in a minute... Fetching diasend patient records between 2023-01-03T10:00:01.000Z and 2023-01-03T10:56:28.761Z Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Fetching diasend patient records between 2023-01-03T10:55:46.000Z and 2023-01-03T10:57:42.121Z Number of glucose records since 2 minutes ago (2023-01-03T10:55:46.000Z - 2023-01-03T10:57:42.121Z): 0 Sending 0 entries to nightscout Next run (Entries) will be in in a minute... Fetching diasend patient records between 2023-01-03T10:00:01.000Z and 2023-01-03T10:57:28.761Z Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Fetching diasend patient records between 2023-01-03T10:55:46.000Z and 2023-01-03T10:58:42.278Z Number of glucose records since 3 minutes ago (2023-01-03T10:55:46.000Z - 2023-01-03T10:58:42.278Z): 0 Sending 0 entries to nightscout Next run (Entries) will be in in a minute... Fetching diasend patient records between 2023-01-03T10:00:01.000Z and 2023-01-03T10:58:28.761Z Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Fetching diasend patient records between 2023-01-03T10:55:46.000Z and 2023-01-03T10:59:42.417Z Number of glucose records since 4 minutes ago (2023-01-03T10:55:46.000Z - 2023-01-03T10:59:42.417Z): 0 Sending 0 entries to nightscout Next run (Entries) will be in in a minute... Fetching diasend patient records between 2023-01-03T10:00:01.000Z and 2023-01-03T10:59:28.761Z Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Fetching diasend patient records between 2023-01-03T10:55:46.000Z and 2023-01-03T11:00:42.555Z Number of glucose records since 5 minutes ago (2023-01-03T10:55:46.000Z - 2023-01-03T11:00:42.555Z): 0 Sending 0 entries to nightscout Next run (Entries) will be in in a minute... Fetching diasend patient records between 2023-01-03T10:00:01.000Z and 2023-01-03T11:00:28.761Z Fetching diasend patient records between 2023-01-03T10:55:46.000Z and 2023-01-03T11:01:42.698Z Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Number of glucose records since 6 minutes ago (2023-01-03T10:55:46.000Z - 2023-01-03T11:01:42.698Z): 0 Sending 0 entries to nightscout Next run (Entries) will be in in a minute... Fetching diasend patient records between 2023-01-03T10:00:01.000Z and 2023-01-03T11:01:28.761Z Fetching diasend patient records between 2023-01-03T10:55:46.000Z and 2023-01-03T11:02:42.927Z Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Number of glucose records since 7 minutes ago (2023-01-03T10:55:46.000Z - 2023-01-03T11:02:42.927Z): 0 Sending 0 entries to nightscout Next run (Entries) will be in in a minute... Fetching diasend patient records between 2023-01-03T10:00:01.000Z and 2023-01-03T11:02:28.761Z Fetching diasend patient records between 2023-01-03T10:55:46.000Z and 2023-01-03T11:03:43.239Z Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Number of glucose records since 8 minutes ago (2023-01-03T10:55:46.000Z - 2023-01-03T11:03:43.239Z): 0 Sending 0 entries to nightscout Next run (Entries) will be in in a minute... Fetching diasend patient records between 2023-01-03T10:00:01.000Z and 2023-01-03T11:03:28.761Z Fetching diasend patient records between 2023-01-03T10:55:46.000Z and 2023-01-03T11:04:43.483Z Number of glucose records since 9 minutes ago (2023-01-03T10:55:46.000Z - 2023-01-03T11:04:43.483Z): 0 Sending 0 entries to nightscout Next run (Entries) will be in in a minute... Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Fetching diasend patient records between 2023-01-03T10:55:46.000Z and 2023-01-03T11:05:43.726Z Fetching diasend patient records between 2023-01-03T10:00:01.000Z and 2023-01-03T11:04:28.761Z Number of glucose records since 10 minutes ago (2023-01-03T10:55:46.000Z - 2023-01-03T11:05:43.726Z): 0 Sending 0 entries to nightscout Next run (Entries) will be in in a minute... Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Fetching diasend patient records between 2023-01-03T10:55:46.000Z and 2023-01-03T11:06:44.002Z Fetching diasend patient records between 2023-01-03T10:00:01.000Z and 2023-01-03T11:05:28.761Z Number of glucose records since 11 minutes ago (2023-01-03T10:55:46.000Z - 2023-01-03T11:06:44.002Z): 2 Sending 2 entries to nightscout Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Next run (Entries) will be in in a minute... Fetching diasend patient records between 2023-01-03T10:00:01.000Z and 2023-01-03T11:06:28.761Z Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Fetching diasend patient records between 2023-01-03T11:05:46.000Z and 2023-01-03T11:07:44.868Z Number of glucose records since 2 minutes ago (2023-01-03T11:05:46.000Z - 2023-01-03T11:07:44.868Z): 0 Sending 0 entries to nightscout Next run (Entries) will be in in a minute... Fetching diasend patient records between 2023-01-03T10:00:01.000Z and 2023-01-03T11:07:28.761Z Fetching diasend patient records between 2023-01-03T11:05:46.000Z and 2023-01-03T11:08:45.068Z Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Number of glucose records since 3 minutes ago (2023-01-03T11:05:46.000Z - 2023-01-03T11:08:45.068Z): 0 Sending 0 entries to nightscout Next run (Entries) will be in in a minute... Fetching diasend patient records between 2023-01-03T10:00:01.000Z and 2023-01-03T11:08:28.761Z Fetching diasend patient records between 2023-01-03T11:05:46.000Z and 2023-01-03T11:09:45.298Z Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Number of glucose records since 4 minutes ago (2023-01-03T11:05:46.000Z - 2023-01-03T11:09:45.298Z): 0 Sending 0 entries to nightscout Next run (Entries) will be in in a minute... Fetching diasend patient records between 2023-01-03T10:00:01.000Z and 2023-01-03T11:09:28.761Z Fetching diasend patient records between 2023-01-03T11:05:46.000Z and 2023-01-03T11:10:45.523Z Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Number of glucose records since 5 minutes ago (2023-01-03T11:05:46.000Z - 2023-01-03T11:10:45.523Z): 0 Sending 0 entries to nightscout Next run (Entries) will be in in a minute... Fetching diasend patient records between 2023-01-03T10:00:01.000Z and 2023-01-03T11:10:28.761Z Fetching diasend patient records between 2023-01-03T11:05:46.000Z and 2023-01-03T11:11:45.840Z Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Number of glucose records since 6 minutes ago (2023-01-03T11:05:46.000Z - 2023-01-03T11:11:45.840Z): 0 Sending 0 entries to nightscout Next run (Entries) will be in in a minute... Fetching diasend patient records between 2023-01-03T10:00:01.000Z and 2023-01-03T11:11:28.761Z Fetching diasend patient records between 2023-01-03T11:05:46.000Z and 2023-01-03T11:12:46.231Z Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Number of glucose records since 7 minutes ago (2023-01-03T11:05:46.000Z - 2023-01-03T11:12:46.231Z): 0 Sending 0 entries to nightscout Next run (Entries) will be in in a minute... Fetching diasend patient records between 2023-01-03T10:00:01.000Z and 2023-01-03T11:12:28.761Z Fetching diasend patient records between 2023-01-03T11:05:46.000Z and 2023-01-03T11:13:46.472Z Number of glucose records since 8 minutes ago (2023-01-03T11:05:46.000Z - 2023-01-03T11:13:46.472Z): 0 Sending 0 entries to nightscout Next run (Entries) will be in in a minute... Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Fetching diasend patient records between 2023-01-03T11:05:46.000Z and 2023-01-03T11:14:46.779Z Fetching diasend patient records between 2023-01-03T10:00:01.000Z and 2023-01-03T11:13:28.761Z Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Number of glucose records since 9 minutes ago (2023-01-03T11:05:46.000Z - 2023-01-03T11:14:46.779Z): 0 Sending 0 entries to nightscout Next run (Entries) will be in in a minute... Fetching diasend patient records between 2023-01-03T10:00:01.000Z and 2023-01-03T11:14:28.761Z Fetching diasend patient records between 2023-01-03T11:05:46.000Z and 2023-01-03T11:15:47.123Z Number of glucose records since 10 minutes ago (2023-01-03T11:05:46.000Z - 2023-01-03T11:15:47.123Z): 0 Sending 0 entries to nightscout Next run (Entries) will be in in a minute... Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Fetching diasend patient records between 2023-01-03T11:05:46.000Z and 2023-01-03T11:16:47.371Z Fetching diasend patient records between 2023-01-03T10:00:01.000Z and 2023-01-03T11:15:28.761Z Number of glucose records since 11 minutes ago (2023-01-03T11:05:46.000Z - 2023-01-03T11:16:47.371Z): 2 Sending 2 entries to nightscout Sending 1 treatments to nightscout Next run (Entries) will be in in a minute... Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Fetching diasend patient records between 2023-01-03T11:15:46.000Z and 2023-01-03T11:17:48.308Z Fetching diasend patient records between 2023-01-03T11:00:01.000Z and 2023-01-03T11:16:28.761Z Number of glucose records since 2 minutes ago (2023-01-03T11:15:46.000Z - 2023-01-03T11:17:48.308Z): 0 Sending 0 entries to nightscout Next run (Entries) will be in in a minute... Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Fetching diasend patient records between 2023-01-03T11:15:46.000Z and 2023-01-03T11:18:48.546Z Fetching diasend patient records between 2023-01-03T11:00:01.000Z and 2023-01-03T11:17:28.761Z Number of glucose records since 3 minutes ago (2023-01-03T11:15:46.000Z - 2023-01-03T11:18:48.546Z): 0 Sending 0 entries to nightscout Next run (Entries) will be in in a minute... Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Fetching diasend patient records between 2023-01-03T11:15:46.000Z and 2023-01-03T11:19:48.850Z Fetching diasend patient records between 2023-01-03T11:00:01.000Z and 2023-01-03T11:18:28.761Z Number of glucose records since 4 minutes ago (2023-01-03T11:15:46.000Z - 2023-01-03T11:19:48.850Z): 0 Sending 0 entries to nightscout Next run (Entries) will be in in a minute... Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Fetching diasend patient records between 2023-01-03T11:15:46.000Z and 2023-01-03T11:20:49.080Z Fetching diasend patient records between 2023-01-03T11:00:01.000Z and 2023-01-03T11:19:28.761Z Number of glucose records since 5 minutes ago (2023-01-03T11:15:46.000Z - 2023-01-03T11:20:49.080Z): 0 Sending 0 entries to nightscout Next run (Entries) will be in in a minute... Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Fetching diasend patient records between 2023-01-03T11:15:46.000Z and 2023-01-03T11:21:49.377Z Fetching diasend patient records between 2023-01-03T11:00:01.000Z and 2023-01-03T11:20:28.761Z Number of glucose records since 6 minutes ago (2023-01-03T11:15:46.000Z - 2023-01-03T11:21:49.377Z): 0 Sending 0 entries to nightscout Next run (Entries) will be in in a minute... Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Fetching diasend patient records between 2023-01-03T11:15:46.000Z and 2023-01-03T11:22:49.617Z Fetching diasend patient records between 2023-01-03T11:00:01.000Z and 2023-01-03T11:21:28.761Z Number of glucose records since 7 minutes ago (2023-01-03T11:15:46.000Z - 2023-01-03T11:22:49.617Z): 0 Sending 0 entries to nightscout Next run (Entries) will be in in a minute... Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Fetching diasend patient records between 2023-01-03T11:15:46.000Z and 2023-01-03T11:23:49.846Z Fetching diasend patient records between 2023-01-03T11:00:01.000Z and 2023-01-03T11:22:28.761Z Number of glucose records since 8 minutes ago (2023-01-03T11:15:46.000Z - 2023-01-03T11:23:49.846Z): 0 Sending 0 entries to nightscout Next run (Entries) will be in in a minute... Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Fetching diasend patient records between 2023-01-03T11:15:46.000Z and 2023-01-03T11:24:50.128Z Fetching diasend patient records between 2023-01-03T11:00:01.000Z and 2023-01-03T11:23:28.761Z Number of glucose records since 9 minutes ago (2023-01-03T11:15:46.000Z - 2023-01-03T11:24:50.128Z): 0 Sending 0 entries to nightscout Next run (Entries) will be in in a minute... Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Fetching diasend patient records between 2023-01-03T11:15:46.000Z and 2023-01-03T11:25:50.433Z Fetching diasend patient records between 2023-01-03T11:00:01.000Z and 2023-01-03T11:24:28.761Z Number of glucose records since 10 minutes ago (2023-01-03T11:15:46.000Z - 2023-01-03T11:25:50.433Z): 0 Sending 0 entries to nightscout Next run (Entries) will be in in a minute... Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Fetching diasend patient records between 2023-01-03T11:15:46.000Z and 2023-01-03T11:26:50.726Z Fetching diasend patient records between 2023-01-03T11:00:01.000Z and 2023-01-03T11:25:28.761Z Number of glucose records since 11 minutes ago (2023-01-03T11:15:46.000Z - 2023-01-03T11:26:50.726Z): 2 Sending 2 entries to nightscout Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Next run (Entries) will be in in a minute... Fetching diasend patient records between 2023-01-03T11:00:01.000Z and 2023-01-03T11:26:28.761Z Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Fetching diasend patient records between 2023-01-03T11:25:46.000Z and 2023-01-03T11:27:51.770Z Number of glucose records since 2 minutes ago (2023-01-03T11:25:46.000Z - 2023-01-03T11:27:51.770Z): 0 Sending 0 entries to nightscout Next run (Entries) will be in in a minute... Fetching diasend patient records between 2023-01-03T11:00:01.000Z and 2023-01-03T11:27:28.761Z Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Fetching diasend patient records between 2023-01-03T11:25:46.000Z and 2023-01-03T11:28:51.908Z Number of glucose records since 3 minutes ago (2023-01-03T11:25:46.000Z - 2023-01-03T11:28:51.908Z): 0 Sending 0 entries to nightscout Next run (Entries) will be in in a minute... Fetching diasend patient records between 2023-01-03T11:00:01.000Z and 2023-01-03T11:28:28.761Z Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Fetching diasend patient records between 2023-01-03T11:25:46.000Z and 2023-01-03T11:29:52.039Z Number of glucose records since 4 minutes ago (2023-01-03T11:25:46.000Z - 2023-01-03T11:29:52.039Z): 0 Sending 0 entries to nightscout Next run (Entries) will be in in a minute... Fetching diasend patient records between 2023-01-03T11:00:01.000Z and 2023-01-03T11:29:28.761Z Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Fetching diasend patient records between 2023-01-03T11:25:46.000Z and 2023-01-03T11:30:52.194Z Number of glucose records since 5 minutes ago (2023-01-03T11:25:46.000Z - 2023-01-03T11:30:52.194Z): 0 Sending 0 entries to nightscout Next run (Entries) will be in in a minute... Fetching diasend patient records between 2023-01-03T11:00:01.000Z and 2023-01-03T11:30:28.761Z Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Fetching diasend patient records between 2023-01-03T11:25:46.000Z and 2023-01-03T11:31:52.387Z Number of glucose records since 6 minutes ago (2023-01-03T11:25:46.000Z - 2023-01-03T11:31:52.387Z): 0 Sending 0 entries to nightscout Next run (Entries) will be in in a minute... Fetching diasend patient records between 2023-01-03T11:00:01.000Z and 2023-01-03T11:31:28.761Z Fetching diasend patient records between 2023-01-03T11:25:46.000Z and 2023-01-03T11:32:52.539Z Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Number of glucose records since 7 minutes ago (2023-01-03T11:25:46.000Z - 2023-01-03T11:32:52.539Z): 0 Sending 0 entries to nightscout Next run (Entries) will be in in a minute... Fetching diasend patient records between 2023-01-03T11:00:01.000Z and 2023-01-03T11:32:28.761Z Fetching diasend patient records between 2023-01-03T11:25:46.000Z and 2023-01-03T11:33:52.783Z Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Number of glucose records since 8 minutes ago (2023-01-03T11:25:46.000Z - 2023-01-03T11:33:52.783Z): 0 Sending 0 entries to nightscout Next run (Entries) will be in in a minute... Fetching diasend patient records between 2023-01-03T11:00:01.000Z and 2023-01-03T11:33:28.761Z Fetching diasend patient records between 2023-01-03T11:25:46.000Z and 2023-01-03T11:34:53.048Z Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Number of glucose records since 9 minutes ago (2023-01-03T11:25:46.000Z - 2023-01-03T11:34:53.048Z): 0 Sending 0 entries to nightscout Next run (Entries) will be in in a minute... Fetching diasend patient records between 2023-01-03T11:00:01.000Z and 2023-01-03T11:34:28.761Z Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Fetching diasend patient records between 2023-01-03T11:25:46.000Z and 2023-01-03T11:35:53.550Z Number of glucose records since 10 minutes ago (2023-01-03T11:25:46.000Z - 2023-01-03T11:35:53.550Z): 0 Sending 0 entries to nightscout Next run (Entries) will be in in a minute... Fetching diasend patient records between 2023-01-03T11:00:01.000Z and 2023-01-03T11:35:28.761Z Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Fetching diasend patient records between 2023-01-03T11:25:46.000Z and 2023-01-03T11:36:53.776Z Number of glucose records since 11 minutes ago (2023-01-03T11:25:46.000Z - 2023-01-03T11:36:53.776Z): 0 Sending 0 entries to nightscout Next run (Entries) will be in in a minute... Fetching diasend patient records between 2023-01-03T11:00:01.000Z and 2023-01-03T11:36:28.761Z Fetching diasend patient records between 2023-01-03T11:25:46.000Z and 2023-01-03T11:37:53.941Z Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Number of glucose records since 12 minutes ago (2023-01-03T11:25:46.000Z - 2023-01-03T11:37:53.941Z): 0 Sending 0 entries to nightscout Next run (Entries) will be in in a minute... Fetching diasend patient records between 2023-01-03T11:00:01.000Z and 2023-01-03T11:37:28.761Z Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Fetching diasend patient records between 2023-01-03T11:25:46.000Z and 2023-01-03T11:38:54.449Z Number of glucose records since 13 minutes ago (2023-01-03T11:25:46.000Z - 2023-01-03T11:38:54.449Z): 0 Sending 0 entries to nightscout Next run (Entries) will be in in a minute... Fetching diasend patient records between 2023-01-03T11:00:01.000Z and 2023-01-03T11:38:28.761Z Fetching diasend patient records between 2023-01-03T11:25:46.000Z and 2023-01-03T11:39:54.620Z Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Number of glucose records since 14 minutes ago (2023-01-03T11:25:46.000Z - 2023-01-03T11:39:54.620Z): 0 Sending 0 entries to nightscout Next run (Entries) will be in in a minute... Fetching diasend patient records between 2023-01-03T11:00:01.000Z and 2023-01-03T11:39:28.761Z Fetching diasend patient records between 2023-01-03T11:25:46.000Z and 2023-01-03T11:40:54.891Z Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Number of glucose records since 15 minutes ago (2023-01-03T11:25:46.000Z - 2023-01-03T11:40:54.891Z): 0 Sending 0 entries to nightscout Next run (Entries) will be in in a minute... Fetching diasend patient records between 2023-01-03T11:00:01.000Z and 2023-01-03T11:40:28.761Z Fetching diasend patient records between 2023-01-03T11:25:46.000Z and 2023-01-03T11:41:55.167Z Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Number of glucose records since 16 minutes ago (2023-01-03T11:25:46.000Z - 2023-01-03T11:41:55.167Z): 0 Sending 0 entries to nightscout Next run (Entries) will be in in a minute... Fetching diasend patient records between 2023-01-03T11:00:01.000Z and 2023-01-03T11:41:28.761Z Fetching diasend patient records between 2023-01-03T11:25:46.000Z and 2023-01-03T11:42:55.422Z Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Number of glucose records since 17 minutes ago (2023-01-03T11:25:46.000Z - 2023-01-03T11:42:55.422Z): 0 Sending 0 entries to nightscout Next run (Entries) will be in in a minute... Fetching diasend patient records between 2023-01-03T11:00:01.000Z and 2023-01-03T11:42:28.761Z Fetching diasend patient records between 2023-01-03T11:25:46.000Z and 2023-01-03T11:43:55.662Z Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Number of glucose records since 18 minutes ago (2023-01-03T11:25:46.000Z - 2023-01-03T11:43:55.662Z): 0 Sending 0 entries to nightscout Next run (Entries) will be in in a minute... Fetching diasend patient records between 2023-01-03T11:00:01.000Z and 2023-01-03T11:43:28.761Z Fetching diasend patient records between 2023-01-03T11:25:46.000Z and 2023-01-03T11:44:55.906Z Sending 0 treatments to nightscout Scheduling 0 records for processing in next run Next run (Treatments) will be in in a minute... Number of glucose records since 19 minutes ago (2023-01-03T11:25:46.000Z - 2023-01-03T11:44:55.906Z): 0 Sending 0 entries to nightscout Next run (Entries) will be in in a minute...

burnedikt commented 1 year ago

Even though I'm fetching Data now every minute I'm getting data holes for up to 15minutes.. and than it's fetching multiple entries in one poll again... Any idea why?

The most likely cause here is that simply no new data is available on diasend, e.g. because the client application like CamAPS did not send any new data yet or the data was not yet processed by diasend.

I can only speak for the specific case of CamAPS which only uploads data every 5 minutes. And sometimes, it takes up to 15 or even 20 minutes until new data can be seen on diasend. This can also happen if the phone running CamAPS currently doesn't have internet or the phone is trying to save power or the connection between phone an transmitter has been lost. There's a variety of reasons why there are longer periods where no new data is available on the diasend side.

In case of doubt, you can double-check with the diasend app / website whether there's really no data or whether there's an issue with the diasend-to-nightscout bridge.

jay-beco commented 1 year ago

Fine - using xdrip we were able to circumvent this problem. Much more reliable data. Pretty solid 5min polls. Not having data for up to 15-20min can be a problem ;) Time will tell.. Thanks though.

burnedikt commented 1 year ago

Fine - using xdrip we were able to circumvent this problem. Much more reliable data. Pretty solid 5min polls. Not having data for up to 15-20min can be a problem ;) Time will tell.. Thanks though.

yeah, the xdrip solution gets the blood glucose values as fast as they appear within the notification center (as it intercepts the notification system on Android), which makes the delay for blood glucose much lower than when pulling that data via diasend, however it also has its own shortcomings as discussed here.

Probably the best way would be to combine the two solutions, getting CGM data right from xdrip and using the diasend-nightscout-bridge to fill in missing ones retrospectively, which is relevant for statistics like time in range and of course for any kind of treatments (bolus, carb correction, manual blood glucose measurement).

jay-beco commented 1 year ago

Probably the best way would be to combine the two solutions, getting CGM data right from xdrip and using the diasend-nightscout-bridge to fill in missing ones retrospectively, which is relevant for statistics like time in range and of course for any kind of treatments (bolus, carb correction, manual blood glucose measurement).

Very interesting input.. so you are telling me I can use xdrip and the bridge at the same time? I always turned off xdrip before turning on the bridge script?! Thought both data stream will mess each other up.... Using both would certainly do the trick.

burnedikt commented 1 year ago

Probably the best way would be to combine the two solutions, getting CGM data right from xdrip and using the diasend-nightscout-bridge to fill in missing ones retrospectively, which is relevant for statistics like time in range and of course for any kind of treatments (bolus, carb correction, manual blood glucose measurement).

Very interesting input.. so you are telling me I can use xdrip and the bridge at the same time? I always turned off xdrip before turning on the bridge script?! Thought both data stream will mess each other up.... Using both would certainly do the trick.

I have not tried this myself to be honest but I don't see a reason why not. If xdrip "only" imports CGM values and diasend-nightscout-bridge imports CGM + treatments then you should get CGM close to real-time. If you have the bridge also import the CGM values, you'll eventually have the same values at the same times twice on nightscout but I don't think this will necessarily lead to problems, it's just unnecessary. But I guess you can just keep both running and see what happens.

If it leads to problems, you could still disable the CGM part of the diasend-nightscout-bridge. In the current state of the software, there's anyways two distinct polling loops, one for synchronizing treatments from diasend to nightscout, one for synchronizing just the CGM data. If you turn off / don't start the latter, you can rely fully on xdrip for having a more real-timeish experience regarding CGM.

jay-beco commented 1 year ago

Great inputs > after 12 hours! CGM data close to real-time and all additional data available!

I'm getting the basal rate, the carb corrections and the carbs on board. Still wondering why there is no pump info in "my diasend". ?! > https://github.com/burnedikt/diasend-nightscout-bridge/issues/24#issuecomment-1370295605

Is that the reason why I don't see the Bolus and therefore no IOB?

burnedikt commented 1 year ago

Regarding the missing pump settings, I was made aware that within diasend's patient profile, you probably need to select the correct pump (if there are multiple) at https://international.diasend.com/patient/profile.

burnedikt commented 1 year ago

Great inputs > after 12 hours! CGM data close to real-time and all additional data available!

I'm getting the basal rate, the carb corrections and the carbs on board

So the combination of xdrip companion + this bridge works? Good to know! Might want to put this into the readme as well. @jay-beco Do you by chance have a good guide at hand for setting up the xdrip companion with CamAPS for reference?

jay-beco commented 1 year ago

Yup - seems to work fine. Since the update this morning the basal rate is not showing anymore..... ?

image

Not sure if that's a problem on my end or if it has anything to do with the update itself.. Fetched the "newest" version through GitHub Desktop. Ran yarn install in the source directory... set the env through source .env and started with yarn run run... since then. No more basal rate graphs in Nightscout ;)

jay-beco commented 1 year ago

@jay-beco Do you by chance have a good guide at hand for setting up the xdrip companion with CamAPS for reference?

I don't, but I can try to set something up/create something. You need a a few screenshots?... a short guide/todos about how to get xDrip running?

burnedikt commented 1 year ago

@jay-beco Do you by chance have a good guide at hand for setting up the xdrip companion with CamAPS for reference?

I don't, but I can try to set something up/create something. You need a a few screenshots?... a short guide/todos about how to get xDrip running?

just something I can link to within the readme as one "best practice" of setting up diasend-nightscout bridge as well as xdrip. I guess this might do? https://bionicwookiee.com/2022/08/21/mixing-camaps-with-xdrip/

jay-beco commented 1 year ago

I guess this will be even easier: https://navid200.github.io/xDrip/docs/How-to-follow.html for CamAPS (Companion App) and https://navid200.github.io/xDrip/docs/Nightscout-Settings.html for setting up Xdrip to send data to Nightscout.