-
Notifications
You must be signed in to change notification settings - Fork 46
Command 19 Configure Alerts
Command $19 can used to configure a number of different alerts. This command is used multiple times during initial setup and for various other configuration situations like changing the low reservoir or Pod expiration alerts and for Confidence Reminders, The $19 command can also follow a Command 1F Cancel-Request, when the user issues a suspend.
19 LL NNNNNNNN IVXX YYYY 0ZZZ [IVXX YYYY 0ZZZ]...
-
LL
= Length of command -
NNNNNNNN
(4 bytes) = Nonce -
IVXX
(2 bytes) of the bit format0iiiabcx xxxxxxxx
-
0iii
is the 3-bit alert number (0..7). - The
a
($08) bit being set indicates that an audio alert is to be sounded when the limit is reached. - The
b
($04) bit being set indicates that this command is for setting a reservoir level alert and not time based alert. - The
c
($02) bit appears to be a modifier for thea
bit. If thea
bit timer expires and thec
bit is set, an internal event is logged and the alert is sounded instead of actually being processed where a audio alert generated. -
x xxxxxxxx
is a 9-bit value that gets multiplied by 60 and then stored. Could be some sort of an alert timer specified in minutes being converted to seconds.
-
-
YYYY
(2 bytes) = 14-bit value for the alert amount. If theb
is set, this value is the number of units for low reservoir alert x 10 (i.e., the # of 0.05U pulses / 2) and must not exceed 500 (i.e., 50U x 10). If theb
bit is clear, this value is the number of minutes before alerting and must not exceed 4,800 (i.e., 80 hours). -
0ZZZ
(2 bytes) = 12 bit alert type consisting of two bytes: 0Z and ZZ. The bottom nibble of the top byte is a 3-bit value (0..7). [Need to finish tracking down how this are used and what they encode???]
The three-word entries can be repeated an arbitrary number of times
for setting multiple alerts with the same command.
The command length LL
for a single alert $19 command is $0a,
for a double alert $19 command is $10,
and for a triple alert $19 command is $16.
A number of $19 commands have been collected in All-0x19-commands for easy reference. Here are some of the observed $19 command alert uses for different values of I:
0: 020f 0000 0202 3rd alert of triple, meaning unclear
1: Alert #1 hasn't been found
2: 2800 1283 0602 2nd alert of triple, 78.98 hour Pod End-Of-Service alert?
Repeats every 15 minutes during the last hour of Pod's life
3: 3800 0ff0 0302 Pod startup #3 & expiration configure, 68 hr (default) Pod expiration warning alert
2 beeps every 3 minutes, repeats every 60 min until acknowledged
4: 4c00 00c8 0102 Pod startup #1 & low reservoir configure: Low reservoir warning alert
2 beeps every 3 minutes, repeats every 60 min until acknowledged
5: 5000 0000 0000 \ Confidence Reminder: set basal, resume insulin, probably others
6: 6000 0000 0000 / Confidence Reminder: set basal, resume insulin, probably others
5 & 6 only seen together as a pair (i.e., 1910 NNNNNNNN 5000 0000 0000 6000 0000 0000)
7: 7837 0005 0802 Pod startup #2: 5 minute hard timeout for priming to complete?
786e 000a 0802 Fake internal call uses this constructed command, a 10 minute hard alert?
79a4 10df 0502 1st alert of triple: ~71.98 hr
7964 003c 0502 $3c = 60 minute alert found in [[Status packets 33U left in reservoir]]
The initialization sequence typically sends the
command $19 three separate times for alerts
4 ($4c00
), 7 ($7837
) and 3 ($3800
) in that order.
Different initialization sequences are very similar,
but can have differing YYYY
values depending on the
PDM settings for the IVXX=4c00
(low reservoir)
and IVXX=3800
(Pod expiration) alerts.
19 LL NNNNNNNN IVXX YYYY 0ZZZ
19 0a ae01a66c 4c00 0064 0102
This command uses alert #4 to be the default low reservoir alert at $0064 = 100/10 = 10U.
If the PDM has a different low reservoir amount set,
YYYY
will have a different value.
The low reservoir alert type is $102.
19 LL NNNNNNNN IVXX YYYY 0ZZZ
19 0a 305a108b 7837 0005 0802
This command uses alert #7 to set an alert for 5 minutes using alert type $802. Perhaps some sort of hard timeout for the length of the priming during pairing?
19 LL NNNNNNNN IVXX YYYY 0ZZZ
19 0a 365deab7 3800 0ff0 0302
This command uses alert #3 to set default
Pod expiration alert of $0ff0 = 4080/60 = 68 hours from now
(i.e., 4 hours before the 72-hour Pod expiration time).
If a different Pod expiration has been set,
the YYYY
value will vary.
The Pod expiration alert type is $302.
19 LL NNNNNNNN IVXX YYYY 0ZZZ
19 0a ae01a66c 4c00 0064 0102
19 0a 305a108b 7837 0005 0802
19 0a 365deab7 3800 0ff0 0302
19 LL NNNNNNNN IVXX YYYY 0ZZZ
19 0a 8c61ee59 4c00 00c8 0102
19 0a c0256620 7837 0005 0802
19 0a acf076ca 3800 10a4 0302
19 LL NNNNNNNN IVXX YYYY 0ZZZ
19 0a b83db892 4c00 0064 0102
19 0a d14d9c49 7837 0005 0802
19 0a fddb8e55 3800 0ff0 0302
19 LL NNNNNNNN IVXX YYYY 0ZZZ
19 0a c8a1e987 4c00 00c8 0102
19 0a e3955e60 7837 0005 0802
19 0a b76fae1a 3800 10a4 0302
Examples taken from Pairing, Pairing 4 and Pairing 5 respectively.
19 LL NNNNNNNN IVXX YYYY 0ZZZ IVXX YYYY 0ZZZ IVXX YYYY 0ZZZ
19 16 feb6268b 79a4 10de 0502 2800 1282 0602 020f 0000 0202
19 16 4aa23e25 79a4 10df 0502 2800 1283 0602 020f 0000 0202
19 16 ba952b8b 79a4 10df 0502 2800 1283 0602 020f 0000 0202
These three different examples all have the nearly the same format
and set 3 alerts (LL
= $16) at the same time.
It is unknown why these triple alarms settings for
alerts #7, #4, and #0 are configured
in some example pairings and not others.
- Alert #7 is set for $10df=4319/60=71.98 hours
with alarm type $502 with an
x xxxxxxxx
value of $1a4=420 minutes=7 hours. - Alert #2 is set for $1283=4739/60=78.98 hours (hard Pod End-of-Life at 72 hours + 8 hours grace) with alarm type $602.
- Alert #0 has the 'c' bit set and an
XX
value of $f=15 minutes (repeat every 15 minutes?) for alarm type $0202. [What is this alert used for???] It appears to be the only example without the 'a' bit set and is also the only example with the 'c' bit set. Also, it is the only example for alert #0 which has some special case handling in the Pod firmware.
19 LL NNNNNNNN IVXX YYYY 0ZZZ IVXX YYYY 0ZZZ
19 10 d4106aba 5000 0000 0000 6000 0000 0000
These double $19 alerts for alert #5 and #6 always have only been seen together and always have all zero values and can be found in multiple locations:
- Resume insulin delivery packets
- Enable Different Preset Basal (Lytrix)
- Full life of a pod (omni-flo)
- Temp basal (pc) with suspend cancel (csholmq)
- Temp basal with suspend cancel (csholmq)
Perhaps these could be used as a way to cancel existing alerts with its unique all zero values with none of the 'a', 'b' or 'c' bits being set.
Consider the following example of setting the maximum 50U low reservoir alert.
19 LL NNNNNNNN IVXX YYYY 0ZZZ
19 0a df72f66d 4c00 01f4 0102
To set a low reservoir alert,
the PDM uses an IVXX
value of $4c00
which
has 0iii
=4, a
=1, b
=1, c
=0, and x xxxxxxxx
=0.
The I
value of $4c00
says to use timer #4,
the b
bit indicates that this is a low reservoir level alert
and so the YYYY
value is the number of units x 10.
The YYYY
value of $01f4
is 500/10 (or 500x2x0.05U) = 50U and
the 0ZZZ
value of $0102
is alarm type $102.
The default low reservoir alert is for 10U
which has a YYYY
value of 10U x 10 = 100 = $0064
.
Examples from Set Low Reservoir Alert (Lytrix)
19 LL NNNNNNNN IVXX YYYY 0ZZZ
19 0a 76305e3b 4c00 0064 0102 // 10U
19 0a 84e4ce3d 4c00 0096 0102 // 15U
19 0a 25ceba2b 4c00 00c8 0102 // 20U
19 0a 260744b0 4c00 00fa 0102 // 25U
19 0a 483d195a 4c00 012c 0102 // 30U
19 0a 701a7f18 4c00 015e 0102 // 35U
19 0a c70532a2 4c00 0190 0102 // 40U
19 0a 29363c0a 4c00 01c2 0102 // 45U
19 0a df72f66d 4c00 01f4 0102 // 50U
Consider the following example of setting the Pod expiration alert to 2 hours.
19 LL NNNNNNNN IVXX YYYY 0ZZZ
19 0a cd665f5c 3800 1065 0302
To set a Pod expiration alert,
the PDM uses an IVXX
value of $3800
which
has I
=3, a
=1, b
=0, c
=0, and XX
=0.
In this case,
alert #3 is for the Pod expiration alert with YYYY
giving the number of minutes from now for alert type $302.
In this example, YYYY
was $1065
=4197/60 = 69.95 hours from now.
Since the Pod is considered expired at 72 hours and 2 hours earlier would be 70,
the 69.95 value indicates that 0.05 hours has passed since Pod pairing
until this $19 command was run.
The default Pod expiration alert is 4 hours before the
72-hour Pod expiration immediately upon Pod startup
and has a YYYY
value of 68x60 = 4080 = $0ff0
.
Examples from Set Pod Expiration Alert (Lytrix)
19 LL NNNNNNNN IVXX YYYY 0ZZZ
19 0a 997f9642 3800 10a0 0302 // 01H
19 0a 9d18848d 3800 1065 0302 // 02H
19 0a 681a38bc 3800 1029 0302 // 03H
19 0a cd665f5c 3800 0fed 0302 // 04H
19 0a 13ae006c 3800 0fb1 0302 // 05H
19 0a 71fcc666 3800 0f75 0302 // 06H
19 0a f3a41f97 3800 0f39 0302 // 07H
19 0a 0cde7b40 3800 0efd 0302 // 08H
19 0a 9d827ce7 3800 0ec1 0302 // 09H
19 0a 5c67daba 3800 0e85 0302 // 10H
19 0a 48843a93 3800 0e49 0302 // 11H
19 0a a767d583 3800 0e0d 0302 // 12H
19 0a ea764dd7 3800 0dd1 0302 // 13H
19 0a 15bad026 3800 0d95 0302 // 14H
19 0a 476eaddb 3800 0d59 0302 // 15H
19 0a a7318e50 3800 0d1d 0302 // 16H
19 0a 2935cbc0 3800 0ce1 0302 // 17H
19 0a 6500694d 3800 0ca5 0302 // 18H
19 0a 6012d12a 3800 0c69 0302 // 19H
19 0a ca334fac 3800 0c2d 0302 // 20H
19 0a 3372c7fb 3800 0bf0 0302 // 21H
19 0a 5239fe3f 3800 0bb4 0302 // 22H
19 0a bf4723b3 3800 0b78 0302 // 23H
19 0a 8f266624 3800 0b3c 0302 // 24H
The YYYY
values of 0b3c
to 10a0
(2877 to 4256)
means that alarm type $302 will be delivered between
47.95 and 70.93 hours from now
which is about 24 to 1 hour before the 72-hour Pod expiration.