Pages

Sunday, 27 September 2015

We're Not Waiting - Remote Alarms on the 640g

Janki's recently started school, 'big' school. It's a big event for everyone, not least Janki. It's also a big thing for us as parents of a little PWD. At preschool, the ratio of key workers to little people is significantly higher and the classroom and play environment was acoustically kinder to the 640g's alarms and alerts. Alerts and alarms seem to get missed more at school than before.

don't have NightScout running with Janki's 640g (I'd really like to...)

But I do have a way of remotely monitoring her 640g pump alerts and alarms 24/7 (so long as there's 3G/4G or WiFi coverage of course). Alerts are picked up by the sound recognition app and relayed to my mobile phone and Pebble watch. Read on if you'd like to find out more.

Janki's 640g pump, wired mic in the pump pouch, monitoring phone behind

Wouldn't it be great to keep half-an-eye on Janki's numbers remotely?
Well of course, if we were using the Dexcom G4 we'd have the option of Nightscout, giving us full remote access to Janki's SG numbers. And if we were on the older Medtronic pumps (Veo, 500 series) we'd also have access to the Medtronic port of the Nightscout solution. The Nightscout implementation looks robust and professional and I'd have no hesitation on using it with Janki.


But Nightscout is not available for the 640g. Not only is the 640g operating on a different frequency (2.4GHz, actually a minor irritation in terms of a port), but my understanding is that the whole data-packet structure is different. And encrypted. Possible workarounds may include using a Bayer Contour Next 2.4 meter to unlock pump communications (as it appears to do for a standard Carelink session) but that's beyond my brains (and available time) at this time (plus I don't have a spare Contour to play with).

Is this a conspiracy to keep DIYers out of the 640g or just a sound upgrade to an RF protocol that's been unchanged (and potentially open to abuse) for a number of years? Who knows, but the bottom line is that, right now, I can't get Nightscout on Janki's 640g.

Then there's the official Medtronic MiniMed Connect solution, sharing SG (and more) with an iPhone (and Android to follow). It's currently out in the States for the previous generation of pumps and, apparently, due for release at some point in the EU. And also due to bring in the 640g at some point (in fact photos of it - or a prototype - already working on a 640g in the US are up on social media already). Medtronic have been silent on when it's expected to hit the EU with 640g support.
MiniMed Care Connect - not on the 640g yet...

At the other tech-extreme, several people have posted online about using a baby-monitor or baby-monitor / sound alert app to monitor their little pwd overnight. We've been using a baby-monitor overnight, which works pretty well, but it means I (literally) keep one ear open all the time. It's been a long time since I last listened to Spotify in stereo at any volume :-) And those sound apps, are great for picking up and alerting to a noise, but they are likely to pick up all alerts and alarms, every dual bolus that's finished, every murmur she makes at night and every time she kicks off the duvet... And none of these solutions are going to work in the daytime, particularly in a busy school environment (where they would probably not even be allowed anyway, due to audio recording / transmitting).

Ok, so what next...
Let's think about what we really need...

If possible: We'd like to keep tabs of all of Janki's sensor data and alarms.
Bottom line: Let us know remotely when an alert or alarm sounds AND identify which alarm has been triggered.

If possible: It's the size of a Tic-Tac.
Bottom line: It's light and easy for Janki to carry it around all day.

Nonnegotiable : It must not interfere with the safe operation of the pump or CGM.
(even if the risk is just theoretical...)

So here's a possible solution...

1) OtoSense

Introduction
OtoSense is a sound recognition application, available on both Android and Apple iOS platforms. It costs around £5 for both versions (August 2015). Update: it's now free on both platforms :-)

It has been designed, primarily to give people with hearing difficulties awareness of important sounds in their local environment (e.g. a smoke alarm, cooker timer, door bell). It doesn't just listen for a given sound level, like a baby crying or a smoke alarm, it tries to identify the sound it is hearing.

For me it has a couple of key features for our particular application:
  • Bespoke sound library (you can add up to ten - I think - samples)
  • Remote notifications (to other devices either via data or SMS)
  • It does not continually record sound whilst listening for the trigger alarms, which should make it acceptable to use anywhere (and improve battery life)*
* It does record each alert sound encountered (5 seconds), which is then accessible to anyone with your OtoSense login. This has proved very useful when validating alerts remotely.


Installation and Setup
  • Download and setup an account using the links above.
    • I've only tested the Android version of the application so far
    • Install it on both a local (Janki) device and a remote device. If you use the same Google Account on both devices you only have to buy the app once.
  • Add your pump alerts and alarms. 
    • I recorded the pump alarms overnight using the Smart Voice Recorder app, as this skips silence and allowed me to record overnight for several nights until I'd collected all the alerts and alarms I wanted (sigh...) [this only recognised the built-in mic on the E1]
    • In OtoSense, I added On Low (Alarm), Predicted Low (Suspend, descending tone) and Predicted High (ascending tone) alarms.




  • I also deleted the pre-loaded Smoke Alarm library, as OtoSense seemed to mistake Janki's spoon tapping at breakfast with a Smoke Alarm... Not an auspicious start, but let's keep going ;-)

Other similar applications are available, but I have not evaluated any others in any detail. Braci Pro would probably be top of my list on the Android platform (by the way, it's not compatible with the E1 phone). The MyEardroid app also looks interesting.

It's worth mentioning at this point, that I would love to have access to high quality audio samples of the alarm and alert tones direct from Medtronic, in a similar way Dexcom have theirs publicly available here (scroll to the bottom of the page). I think they make a superb educational tool and allow new users and carers to 'get their ear in' to the differences in the tone sequences.

Although Medtronic are unable to supply the tones, they do publish the alarm tone frequencies in the 640g user guide:

Tone name
Frequency tolerance (+/- 1%)
Alarm
1655 Hz followed by 3310 Hz
Alternate Alarm
1850 Hz
Siren (escalated alarm)
1655 Hz, followed by 3310 Hz
Alert
934 Hz
High Sensor Glucose
1312 Hz, followed by 1410 Hz, 1500 Hz, 1619 Hz, 1722 Hz
Low SG
1722 Hz, 1619 Hz, 1500 Hz, 1410 Hz, 1312 Hz
Lost SG
1485 Hz, followed by 1395 Hz, 1320 Hz, 1395 Hz
Message tone
1655 Hz
Reminder tone
934 Hz
Fill tubing tone
1850 Hz
Bolus delivery cancellation tone
1485 Hz, followed by 1655 Hz and 1485 Hz
Loading complete tone
934 Hz
Reservoir loading in progress tone
1850 Hz

Armed with that information, I produced simulated ("perfect") alerts for the "Alarm", "Low SG" and "High Sensor Glucose" sequences above, which you can find here. I also added these into the OtoSense sound library. It's worth pointing out, that although they sound similar to the real thing, there is some additional aliasing going on in the actual 640g alerts, generating additional frequencies (as expected in any digital system with finite sampling).


2) Sony Xperia E1

I picked up a Sony Xperia E1 mobile phone. It's light weight (120g), reasonable size (4" screen). Crucially, it runs Android 4.4 (OtoSense requires 4.1 and above), has a 1700 mAh battery and was only £40 sim free. It was also available in purple, one of Janki's favourite colours :-)

It also comes with Sony's Stamina Power Management mode. Enabling this is straight-forward, but remember to add OtoSense to the list of applications allowed to run in background mode (ideally OtoSense will be the only non-core application allowed to run in background mode if you're just using the handset to monitor the pump).


Other budget Android handsets my well work as well - or better - but I haven't tested them. You may have to root Android on some of them to turn off the numerous background Android tasks that suck the life out of your mobile battery.

Now I experienced some WiFi connection issues using Stamina mode (even though, in theory, OtoSense should override this when requesting data transmission) and so I turned it off in the end, but you may have more luck. To counter the loss of Stamina mode, I turned off automatic syncing for most Google Services and made sure other apps weren't running or syncing in the background (e.g. no Facebook, Twitter or other email accounts on this handset).


3) Putting it together
I now have a sound recognition app running on the a Smartphone. But to get a nice, clear sound, and pick up those pump alerts and alarms in a busy, noisy classroom environment, I need to get the phone's microphone close to the pump.

I know some people who do put their insulin pump and mobile phone in the same pocket. However, I decided not to do that for Janki. Why? Well, in theory, there are a couple things that might not be good news for the pump, and they are RF (radio-frequency) emissions and Magnetic fields (B fields).

The phone has radio antennae to both transmit and receive data. These are both in the so-called radio-frequency range and cover cellular (mobile) transmissions over 2G, 3G and 4G in the UK and WiFi (usually on the 2.4GHz range).

At low power, the transmissions from the phone could just interfere with the wireless transmissions the pump relies on to and from the G2L transmitter and Bayer BG meter.

At high power (particularly with the cellular transmitter) there is a theoretical risk that it may induce a tiny current in a circuit in the pump and cause the pump to error - or worse - malfunction. I've not heard of it happening with insulin pumps. However, I have experience of it happening with large-scale syringe drivers in a hospital ward setting and, as an insulin pump is essentially a (clever) miniature syringe driver, I'm not prepared to take the risk.

By the way, Medtronic recommend cellular phones (all frequencies) are kept at least 30 cm away from the pump. For Janki that essentially means carrying a phone on the other side of her body than her pump.That's doable (in another pump pouch for example), but the clarity of the alarm audio is now severely diminished. To get a microphone closer, I simply used a wired hands-free set, with it's cable running from the phone to the pump pouch. I just tuck the microphone behind the pump in the pouch to keep it in place.

But that's not quite it, because we haven't yet dealt with the second potential hazard, magnetic fields. The Earth's magnetic field strength varies, but is around 0.5 gauss. In our setup, the biggest sources of magnetic field are likely to be the phone's speaker and the headphones of the hands-free set, both of which use the movement of a permanent magnet to make the speaker's diaphragm move. The phone's microphone and earpiece are also likely to contain a small magnet, but it will be tiny.

I used a simple Gauss meter app to estimate the order of magnitude of the strength of this field:
  • Background magnetic field was around 0.5 gauss (good, as expected)
  • The magnetic field from the E1's speaker was around 30 gauss (around the same as a fridge magnet). Good job we're keeping that bit of her phone away from her pump then
  • The field around the headphones was still up to 12 gauss (i.e. ~20x as strong as background)

I don't know what the safe field strength is for the pump, but I do know it has a very finely engineered motor, which enables it to deliver such teeny-tiny amounts of insulin. And the motor will be using magnets to drive delivery and possibly also magnets to verify the status of the reservoir (e.g. confirming the motor gearing has made one revolution without directly touching any of its gearing).

The simple solution I employed to enable me to use the wired hands-free kit as a remote microphone and pick up a clear signal from Janki's pump was to simply cut off the headphones on an old hands-free kit. I sealed the ends with a small piece of electrical insulation tape.

The E1 phone lives in here, with the wired mic lead coming out...
... and feeding into her pump case


4) Alpha Testing
Come in / down D2005, your time is up.
You can change the name of your mobile to
make this message more friendly
Ready to Roll
A quick check list:
  • Sign-in to OtoSense on both Janki's E1 and my remote device (my Android phone)
  • Both phones have radio (cellular and WiFi) turned on
  • Make sure I've set notifications 'on' from OtoSense on my Pebble watch app
  • Janki has to have the remote (headset) mic in the pouch bag or very near the pump



Clarity
It's important to get as clear a recording as possible. In practice this means recording your sample alert and alarm tones with very little background noise and with the mic close to the pump to get a decent sound level.

Alert and alarm accuracy is definitely improved by having the microphone held close to the pump. For us, this means popping the mic into Janki's pump pouch and using the pouch zip to hold it in place.

What Goes Up Must Come Down
One thing I have found is that sometimes the OtoSense app gets confused with the rising and falling tones of the high SG and low SG alarms respectively. What tends to happen is that the app records a flurry of alerts - Predicted Low, Predicted High, Predicted Low or vice versa - in quick succession. Predicted High was more susceptible. It rarely happened on Predicted Low alerts.

The true event below was Predicted High at 21:32; an hour later, at 22:37, after too timid a correction, it gets it right first time, identifying another predicted high:-



I'll continue to tweak the sample tones used to generate triggers.In the meantime, I tend to use the remote playback option (the grey > arrows above) to play back 5 seconds of audio recorded with the event to verify what's going on. This is the only audio that is recorded and shared between your devices as far as I know.

Power
With Stamina switched on (and OtoSense on the allowed apps list), the E1 phone pushed through well over 12 hours of service. Easily enough to get through the school day. With Stamina turned off (to minimise the risk of connectivity drops), the phone typically got through between 8-12 hours with OtoSense running continuously. That's a full school day for Janki, but it would be nice to have a little extra in the tank.Yes, I could add a small additional battery pack, but as I think Janki already has more than enough to carry around with her, I'll focus on power-saving on Android first as testing goes forward.

What's missing?
It would be nice if the remote handset didn't have to run the app (in background mode). The user guides on You Tube suggest you don't need to, as OtoSense makes use of Google's Cloud Messaging System, but I've yet to receive a remote notification unless I have it running, which is unfortunate. If you have the app running it will drain your battery (I don't have my remote mobile in Stamina mode as that would stop my phone helping me through the day, so I can just about get a day's worth of battery out of it instead of 1.5 or 2 days).

GCM messages can take up to three minutes to get through, often quicker. Again, I have other apps using GCM that manage to relay GCM just about instantaneously, so hopefully that's just something screwy with my overloaded Android handset. The other downside to having the OtoSense app running in the background is that it appears to conflict with the camera on my particular Android mobile. I have to exit OtoSense, use the camera and then restart OtoSense. Fortunately, selfies are not actively encouraged in my (hospital) work environment so this one is workable for me, but not ideal.

Of course, using the SMS alert messaging option bypasses all of this, but means you won't have immediate access to the alert playback to validate.

One thing I'd love to have is confirmation that my phone's OtoSense app is online and 'listening' for events from Janki's device. Very occasionally it just drops that connection and alerts don't make themselves known on my phone. Is that the OtoSense app? Is it Android? I don't know. At this point, iPhone owners can roll their eyes and tell me I should have got an iPhone :-)


5) Summary
  • I don't have NightScout running with Janki's 640g.
  • But I do have a way of remotely monitoring her pump alerts and alarms 24/7 (so long as there's 3G or WiFi coverage of course).
  • Alerts are picked up by the sound recognition app and relayed to my mobile phone and Pebble watch, making both vibrate and the phone flash (if I want it to).
  • It's NOT perfect in identifying pump alarms, so...
  • Validate alerts on the remote handset by playing back the 5 second audio sample 
I've been using it overnight to check on all alerts and alarms, using the traditional baby monitor as a further backup.

Its use in school will probably depend on how her teachers and classroom assistants settle in to the task in hand - looking after Janki whilst also keeping 30 other kids in check (not easy). I envisage potentially using it to automatically send a text message to one of the classroom assistant's phones to help them be aware than Janki's pump is alarming. And I can also see myself glancing at the alert notifications whilst I'm away from Janki and calling up / texting the school to double-check things are ok if I see multiple alarms or an escalating alarm (indicating Janki's pump has not been looked at in a while).

It's not perfect (see testing above). It currently gets some alerts wrong and has missed a few alerts; it seems most reliable at picking up the alarms (e.g. on low SG); there's a ton more testing to do, and it's not NightScout :-/

But for a total cost of £45 £40 and little setup time, I'll take its limitations and go back to enjoying some music in stereo in the evenings.



Important Notes.
As ever, this post is provided to let you know what we've found works for us and how we've been able use it to enhance our management of Janki's diabetes. It's something we've decided to do for our situation. It is not my intention to offer advice or guidance of any kind. It just plain might not work for others.

I'm not linked to OtoSense in any way. I didn't get paid or receive any incentive from OtoSense to write this post.

Feel free to comment below or on Facebook at www.facebook.com/littlet1d.

No comments:

Post a Comment