Commit Graph

43 Commits

Author SHA1 Message Date
Paul Plant a7edde85b4 Merge branch 'develop' into watch-app-3 2024-03-12 14:59:01 +00:00
Johan Degraeve f631d54bd8 DexcomG7 companion mode
Identifies the Dexcom G7 without the need for filling in the device name. Requires that the official Dexcom App always runs in parallel.
2024-02-25 12:15:25 +01:00
Paul Plant 0e51afe250 Merge branch 'develop' into watch-app 2024-02-13 22:16:52 +01:00
Johan Degraeve 89b03ec2ee Libre3 and/or Dexcom G7 and/or OmniPod as heartbeat
- Libre 3 or Dexcom G7 as heartbeat
  - Libre 3 as heartbeat: avoids the need for audioPlayer that keeps the app alive in the background. When Libre 3 sends data, xDrip4iOS will wake up and fetch a reading from LibreView
  - Dexcom G7 as heartbeat: only useful in combination with Loop. Loop must read the Dexcom G7 readings and upload to NightScout. xDrip4iOS will wake up when G7 sends data and will fetch the latest reading from NightScout. This occurs with a delay (Thread.sleep) of 1 second, to give time to loop to upload the reading to NightScout. Sometimes xDrip4iOS is still to early to fetch the reading. In that case, it may help to delete the heartbeat and recreate it.
  - OmniPod as heartbeat: for OmniPod users, this is a useful additional heartbeat. OmniPod has the interesting 'feature' to disconnect and reconnect every few minutes. Which allows to call the heartbeat function.
  - M5Stack as heartbeat: this is implemented as part of the M5Stack transmitter, it does not appear in the list of heartbeat devices. M5Stack will wake up xDrip4iOS if it didn't receive a reading from xDrip4iOS for more than 5 minutes. This allows xDrip4iOS to download the latest reading and send it to the M5Stack. Needs the latest release of M5stack or M5Stick-C software : https://github.com/JohanDegraeve/M5_NightscoutMon or https://github.com/JohanDegraeve/M5_StickC_xdrip_iOS

- the change required also to re-enable alarms, notifications, badge counter, ... when user has chosen followerBackgroundKeepAliveType disabled

- To use Libre 3 has heartbeat:
 - First connect to Libre 3 with official Libre 3 app
 - when connected, go to the iOS settings and read and note the name of the Libre (it's not something with ABBOTT in it, it's more like a random string)
 - force close the Libre 3 app
 - in xDrip4iOS, go to the bluetooth section
 - add a new transmitter of type HeartBeat
 - select Libre 3
 - as transmitter id, fill in the name you read in the iOS settings, just 4 or 5 characters is enough. It's case insensitive.
 - click the scan button. (you will not be asked to do NFC scan)
 - wait till connected
 - now reopen the official Libre 3 app

- To use Dexcom G7 as heartbeat:
 - make sure you connected at least once to the Dexcom G7 with the official Dexcom app and/or Loop.
 - Not necessary to force close other apps (like Official Dexcom G7 app and Loop)
 - go to the iOS settings and read and note the name of the Dexcom G7. It's case insensitive.
 - in xDrip4iOS, go to the bluetooth section
 - add a new transmitter of type HeartBeat
 - select Dexcom G7
 - as transmitter id, fill in the name you read in the iOS settings.
 - click the scan button. (you will not be asked to do NFC scan)
 - wait till connected

- To use OmniPod as heartbeat:
 - Force close any other app that connects to the OmniPod (that should only be Loop)
 -  - in xDrip4iOS, go to the bluetooth section
 - add a new transmitter of type HeartBeat
 - select OmniPod
 - click the scan button
 - wait till connected
 - you can now reopen Loop
2024-02-13 21:52:40 +01:00
Paul Plant bc7801d307 rename old WatchManager to CalendarManager. Add placeholder new WatchManager 2024-02-11 12:54:13 +01:00
Paul Plant 1f77bb89a9 glucose chart x-axis fix for only new values. trace file fixes 2024-02-05 12:34:48 -06:00
Paul Plant ebd5dc2335 update 2024-01-03 16:13:30 +01:00
Paul Plant b314001881 initial implementation background keep-alive modes 2023-11-13 13:15:09 +01:00
Paul Plant e1e32598ff LibreLinkUp Follower - initial implementation 2023-10-24 18:21:29 +01:00
Paul Plant 1aba8029f9 initial commit - bg readings swiftui view 2023-07-30 20:53:15 +02:00
Johan Degraeve 5fdf6b5117 LoopManager : add 5 seconds to timestamp last reading + tracing
- add 5 seconds to last Readings timestamp, because due to the way timestamp for libre readings is calculated, it may happen that the same reading shifts 1 or 2 seconds in next reading cycle
- add tracing, can be deleted later on
2022-05-19 23:54:20 +02:00
eduardopietre 31c9d942ff Added traces to DataExporter. 2022-05-08 19:31:51 -03:00
eduardopietre 956c23b29d Implemented treatment, with persistence and uploading to nightscout. 2022-03-02 00:05:21 +01:00
Johan Degraeve 36c91e589d trace app start : add trace in application didFinishLaunchingWithOptions 2021-03-27 00:14:51 +01:00
Johan Degraeve f068e6df87 atom 2021-02-19 21:33:54 +01:00
Johan Degraeve f2b8434501 Libre : trace in case values are ignored because equal (flat) values are detected 2021-01-19 22:00:40 +01:00
Johan Degraeve 45ca658473 small fix in tracing 2021-01-10 10:33:25 +01:00
Johan Degraeve 2915a11c9b Libre improvements 2020-12-07 23:28:28 +01:00
Johan Degraeve 03381e60cb snooze parameters being stored in core data 2020-10-10 22:01:47 +02:00
Johan Degraeve 74899d8fb4 housekeeping for breadings and calibrations, readings older than 90 days will be deleted from core data. Calibrations older than 90 days and that do not have anymore readings referring to it, will be deleted 2020-10-04 21:21:41 +02:00
Johan Degraeve ef8f6ebbb5 Libre2 direct connectivity, just prepared, not tested at all 2020-08-30 09:45:31 +02:00
Johan Degraeve ed10d51585 Trace : changed timestamp format, from y-MM-dd-HH:mm:ss.SSSS to y-MM-dd HH:mm:ss.SSSS 2020-07-19 13:46:58 +02:00
Johan Degraeve f034133488 redesign Libre Utilities 2020-06-29 21:38:18 +02:00
Johan Degraeve 139cbefdcf adding option to send trace file 2020-05-02 22:54:03 +02:00
Johan Degraeve 710932352b fix #80 - improvements nightscout settings
- a new row in the NightScout settings which allow to test the url and api key
- by default set url https://yoursitename.herokuapp.com
2020-04-09 23:53:37 +02:00
Johan Degraeve 3698775472 message shown when starting the scanning 2020-04-06 22:12:17 +02:00
Johan Degraeve 3e8d7839c5 bt redesign, DexcomG5 2020-04-06 21:57:29 +02:00
Johan Degraeve 5bb63fd169 Option to write latest glucose value in Calendar event. This allows to make reading visible in Apple Watch.
Following instructions are copied from Spike :
On your Apple Watch or the Watch app in your iOS device select the
"Modular" watch face and make sure you also select the "Calendar Complication" to be present in the middle of the watch face
Your glucose values should now start syncing to your watch when you receive your next reading from your CGM transmitter.
If by any chance you're not getting readings in your Apple Watch, go to the Watch app and under "General", "Reset"
click the "Reset Sync Data" and wait a few minutes.
2020-01-24 21:13:34 +01:00
Johan Degraeve fe2b988b7c resolve merge conflicts 2020-01-19 21:24:16 +01:00
Johan Degraeve 1429922bd5 Option to enable NSLog so that all tracing can be found with cfgutil
When enabled, all logging can be viewed on a Mac:
- install Apple Configurator 2 on a Mac (it's not necessary to run the application)
- Open a Terminal session (on Mac click Search button top right, type 'Terminal', double click on the Terminal app)
- change directory to Downloads folder , type :
cd Downloads
- copy paste this :
/Applications/Apple\ Configurator\ 2.app/Contents/MacOS/cfgutil syslog | grep xDrip-NSLog | awk -F "xDrip-NSLog " '{print $2}'  > xdriplog.txt
and press enter

Now use the app, all logging information can be found in the file xdriplog.txt
You can also leave out the redirection to file.
2020-01-18 00:02:58 +01:00
Johan Degraeve 14fe568e65 watlaa master connect working, receives packages 2020-01-09 18:09:11 +01:00
Johan Degraeve 4a95c2c50d connects to watlaa, discovers services and characteristics 2020-01-07 23:13:18 +01:00
Johan Degraeve 4248d359e1 redesign M5Stack stuff, as preperation to move all bluetooth stuff to that page 2019-12-11 18:13:31 +01:00
Johan Degraeve cd8850b2d2 renamed M5StackManaging to BluetoothPeripheralManaging and M5StackManager to BluetoothPeripheralManager 2019-11-26 21:47:58 +01:00
Johan Degraeve 81128ff7ee bluereader, not tested, battery level not supported 2019-11-01 14:07:15 +01:00
Johan Degraeve 2bbe99f8d8 small fix in log category name 2019-10-30 23:19:53 +01:00
Johan Degraeve 9fd842b75d compiles and shows chart but without content 2019-10-26 18:48:15 +02:00
Johan Degraeve 46bf878bfe Scanning for M5Stack transmitters, connect, disconnect, .. 2019-10-05 23:25:39 +02:00
Johan Degraeve b44be99f83 connects to M5 stack 2019-09-12 08:37:35 +02:00
Johan Degraeve 3f98a5c3dc Reworked for support oop web, however sitll not used because wrong values are being shown 2019-08-13 23:47:04 +02:00
Johan Degraeve 032425f733 Droplet-1 2019-08-02 23:03:27 +02:00
huyan_18040019 0c8b330d0e add bubble 2019-07-29 16:42:48 +08:00
Johan Degraeve 6490d8df25 Constants.swift splitted in different files 2019-07-28 14:22:47 +02:00