-
Notifications
You must be signed in to change notification settings - Fork 25
Pod Setup
omnipy cannot activate a pod at the moment (feature in testing, coming soon) you have to activate the pod with the pdm. This is done as the usual pod activation sequence, i.e. fill the pod with insulin, run the activation commands through the pdm and once it shows basal rate and everything running, that's it.
If you want to simultaneously run a pod for testing with omnipy, but also run a second pod for yourself to be controlled by the PDM, read carefully:
That's straightforward. Just use the pdm that is not controlling the "live-pod" (the one on your body) to activate the test-pod.
-
You don't have any running pods (in between pod change or else): First activate the test-pod, then follow the procedure below to register it for omnipy. After this is done, deregister the pod from pdm by choosing deactivate while the test-pod is not in the range of pdm. After clicking "deactivate anyway" you can initialize your live-pod.
-
You have a running live-pod on you and want to keep it running: There is nothing you can do, you MUST wait until the pod needs replacing. If the pod is dead at the time of replacing, see option 1. If it's still working but you still need to change it (bad site, not enough insulin) then go to option 3.
-
You have a running pod on you and want to use it for testing: Take the pod out but don't deactivate it! Follow the omnipy registration procedure below for this pod. After it's done deregister the pod from the pdm as described in option 1. And activate and attach your new live-pod afterwards.
Login to your raspberry pi with ssh and then change to the omnipy installation directory via:
cd omnipy
Now run the following command (note the . at the beginning of the command)
./omni.py readpdm
The command will enter a waiting state and will wait to hear from the PDM. Now take the PDM out, turn it on and make sure it retrieves the status of the POD.
This is the command for spying on the pdm for the pod address. Once you run it, it won't display anything and will simply wait to hear something from the pdm.
Once it hears a status request from the pdm it will show something like:
"result": {
"address": 521046514
},
"success": true
}
Note down the radio address returned by readpdm - 521046514 here.
Also, on the pdm, check in pdm records for the lot & serial number (press the ? on the record for pod insertion) and note these down.
Then put pdm well away - you might want to remove the batteries or wrap it in foil.
On the pi, type:
./omni.py newpod LLLLL SSSSSS RRRRRRRRR
Where LLLLL is the lot number, SSSSSS is the pod serial number and RRRRRRRRR is the radio address.
Confirm you have a "success": true
Then type:
./omni.py status
this should take a few seconds and then print a large text a bit like this:
"result": {
"address": 3332222,
"alert_states": 0,
"basalSchedule": [],
"basalState": 1,
"bolusState": 0,
"canceledInsulin": 0.0,
"extendedBolus": [],
"fault_event": null,
"fault_event_rel_time": null,
"fault_immediate_bolus_in_progress": null,
"fault_insulin_state_table_corruption": null,
"fault_internal_variables": null,
"fault_progress_before": null,
"fault_progress_before_2": null,
"fault_table_access": null,
"faulted": false,
"information_type2_last_word": null,
"lastNonce": 3870148995,
"lastUpdated": 1551542177.0886214,
"last_enacted_bolus_amount": null,
"last_enacted_bolus_start": null,
"last_enacted_temp_basal_amount": 4.65,
"last_enacted_temp_basal_duration": 0.5,
"last_enacted_temp_basal_start": 1551542177.1038814,
"log_file_path": "data/pod.log",
"lot": 44226,
"maximumBolus": 15,
"maximumTempBasal": 15,
"minutes_since_activation": 92,
"msgSequence": 10,
"nonceSeed": 3,
"packetSequence": 25,
"path": "data/pod.json",
"progress": 8,
"radio_low_gain": null,
"radio_rssi": null,
"reservoir": 51.150000000000006,
"tempBasal": [],
"tid": 659956,
"totalInsulin": 10.8,
"utcOffset": 0
},
"success": true
At this point the pod is all set up and you should be able to control things from AndroidAPS.
You may find it helpful to monitor the log files during AndroidAPS connection - to do this type
tail -n 60 -f ~/omnipy/data/omnipy.log
You'll be able to spot any errors:
- References like this are all fine:
2019-03-06 22:09:20,850 - OMNIPY - DEBUG - SENDING PACKET EXP RESPONSE: Pkt PDM Addr: 0x1f11da79 Addr2: 0x1f11da79 Seq: 0x0d Body: b'18030e0100'
- References like this indicate that the RileyLink can't reach the pod
"Exceeded retry count while send and receive"In this case you might want to replace your antenna (see link below on increasing radio range)
When you want to stop a pod (after 3 days), log in to your raspberry pi with ssh type ./omni.py deactivate
Then also stop the pod on PDM.
-
Hardware setup:
3.2. (optional) DIY rig setup
3.3. (optional) Increase RF range of RileyLink
-
4.1.AAPS setup
4.3 Upgrading
4.4 (optional) Wifi tethering on android
4.5 (optional) Wifi tethering on raspberry pi
-
User Intefaces
5.1 Pod activation and deactivation
5.2 SSH Console