With Pebble watches no longer being produced we will need a different hardware platform if we keep the OpenSeizureDetector project going.
We could just leave it and use the Embrace watch, but I am not that happy with Embrace for two reasons:
I am not convinced about its detection reliability – I can not make it go off doing what I think of as seizure-like movements (but other people report it working well for them, so it could just be me).
The alarm annunciation infrastructure is very complex – the watch talks to the paired phone, which uses a wifi or mobile internet connection to connect to the Empathica servers. The servers then use the mobile phone infrastructure to make a phone call. But I mostly want a device in the next room to go ‘beep’, so I would rather have a more direct connection (OpenSeizureDetector uses WiFi so avoids a lot of the infrastructure)
So, given that I am looking for an alternative platform for OpenSeizureDetector. It is very tempting to try to make one – it would be fun to do the electronic design and firmware, but that would be a big undertaking, and not something I could do in my spare time, so I need a commercially available platform.
I have been looking at Android Wear, which has been suggested by a few people – I did not use this before because Android Wear devices are so much more expensive than Pebble Watches. For Android Wear to be feasible, we need to confirm a couple of things:
We can obtain accelerometer readings at a high enough frequency (~50 Hz), and do Fourier analysis on it to do the seizure detection.
The battery consumption has to be reasonable.
I have made a proof-of-concept Android Wear app to test it out. The App does the following:
Starts a background service that collects accelerometer data for about 5 seconds, then calculates a Fourier Transform of the data….then repeats indefinitely.
The activity connects to the service and shows the number of samples collected, so you can see it is doing something.
It does not look very exciting – see picture of it running on my Sony Smartwatch 3 above.
...but most importantly, it is surprisingly (suspiciously so if I am honest) frugal with the battery. The second half of this trace has the new app running, and it is still only draining of the order 1% per hour.
So based on this, I think porting OpenSeizureDetector to Android Wear is feasible. There is quite a lot to do to get it working though:
Communication to the phone (both settings and alarm status updates)
On-watch user interface (mute, manual alarm etc.)
Port Seizure Detection algorithm – the acceleration units are different in AndroidWear compared to Pebble, so we need to do some scaling so that the seizure detector settings can be the same.
Package the Android Wear App – it will probably be a different Google Play Store app, so we will need to integrate that into the OpenSeizureDetector Android App.
Fortunately there are a couple of other people interested in helping, so there is a fair chance of getting this finished this year.
I have just released V2.3.2 of OpenSeizureDetector as the main version of the App on Google Play Store. The main changes in this version are:
Changes to the Watch App to improve efficiency (Note this will also make it more sensitive, so you may need to increase the Alarm Ratio Threshold setting from the default of 30 to between 50 and 60 to reduce false alarms).
Improved start-up screen that has buttons to help solve problems with set-up, and make initial set-up easier – updated installation instructions page to match.
Added an initial run message prompting user to subscribe to updates to this web site or the facebook page.
Added facility to auto-start the app on phone boot up.
Added GPS location information to SMS alarm notification messages.
A couple of weeks ago Pebble announced that they have been bought by Fitbit (who make fitness tracking devices), and no longer sell or support smart watches.
A few people have asked what this means for OpenSeizureDetector. My thoughts are:
Short Term (around 1 year)
No change – if you already have a Pebble watch or can buy one, you will be able to install the Pebble Android App from Google Play Store to connect your pebble to the phone, and install OpenSeizureDetector on it.
It is possible that Pebbles may become scarce (or looking more positively, they may get cheap – Argos and Amazon are selling them for £49, and cheaper if you like pink! Amazon.co.uk currently says they only have 5 in stock (17 December).
Medium Term (1-3 years)
The Pebble Android App and Pebble firmware may no longer be available from Pebble. There is an open source project that implements the Bluetooth communication with the watch, so I think it will be possible to bypass the Pebble Android App and build this all into OpenSeizureDetector (OpenSeizureDetector does not need any of the Pebble web services to work) – I will look at doing this over the winter while the Pebble software is still available.
Long Term (>3 years)
Pebble watches are unlikely to be available so we will need an alternative device. The options are:
If we are very lucky FitBit may release a pebble-like device with software development kit so you can program it like you can the Pebble, as they bought all the Pebble intellectual property. I am not too hopeful about this – I did try to work out how to program a fitbit before I discovered Pebble, and it is all closed-source protocols….
Android Wear – Android Wear watches such as Moto 360 should be capable of doing what OpenSeizureDetector does on the pebble, and use the same Android App infrastructure (since Verison 2 I have the internal structure of the code set up to use different devices). I haven’t done this yet because Pebbles were so much cheaper than Android Wear devices, so no point using anything else….but now I’ll have to look at it.
Embrace – the Embrace ‘watch’ is doing something very similar to OpenSeizureDetector and includes skin electrodes to detect stress. This should give better false alarm discrimination than just using Acceleration like I do with the Pebble. But, up to now I am not impressed with the reliability of the device – it drops bluetooth connections without any of the fault warning beeps that we have built into OpenSeizureDetector – I am minded to try to use Embrace as a data source for the OpenSeizureDetector alarm notification system rather than use their Android App, which relies on an active internet connection to raise alarms.
Another Device – I had looked at AngelSensor, and I do have a device to work on, but I am not sure if the company still exists – no point developing for a device that no-one can get hold of….
Anything else? I’m open to suggestions for alternative devices with accelerometers that we could use the OpenSeizureDetector system with.
OpenSeizureDetector will continue to work while Pebble Watches are available (I am confident enough that I just bought Benjamin two spares for when his current ones break).
But we need to decide what to do once Pebble Watches are not available any more…
This release introduces three changes requested by users:
Add the user’s location to the SMS alarm notifications – it now sends two SMS messages – the first one gives the last known location (if we have one). It then spends a minute trying to get the best location information it can, and sends that location as a second SMS after a minute.
Added an option in the General Settings screen to auto-start the app when the phone boots.
Improved Start-Up screen that now checks whether the Pebble App is installed and provides a button to install it for you if not.
To install this version you need to register as a Beta tester here.
Please let me know if you have any issues with this version.
(note on version numbering – I messed up the version numbers on the last few releases – the first two figures are supposed to match the version of the Pebble App that the Android App works with, but I forgot. Version 2.3 of the Pebble App is included as part of the Android package, so the Android Package is V2.3.0).
I originally set up OpenSeizureDetector to detect long (>1 minute) seizures so it waits to see seizure-like shaking for several seconds before raising alarms.
A couple of users said they would like to detect short (few second) seizures, so I have created a new version of the app that allows the sample period to be set by the user, so you can tell it to analyse data say every second rather than the default 5 seconds.
I suspect that doing this will give a lot of false alarms, but I have provided this so the users can try it and see if it works for them.
This feature is available in version 2.0.7 of the OpenSeizureDetector Android app, and version 2.3 of the watch app. The correct version of the watch app is included in the Android package so you can install it from the OpenSeizureDetector menu.
It is available on the Beta testing channel of Google Play Store – subscribe here to access it.
As usual, feedback would be appreciated – if you do not change the settings, it should behave the same as before – please let me know if this is not the case.
We have been woken up during the last couple of nights with the annoying warning pip from OpenSeizureDetector. I am not sure what the issue is because I don’t think any of the software has changed for a few weeks and it just started happening.
There have been two issues
the ‘server’ phone disconnected from our home wifi for some reason and only re-connected when I turned its screen on (no idea why, but not too much of a worry – probably some sort of wifi interference from somewhere).
the ‘server’ phone showed a ‘Fault’ warning with ‘Watch App Not Running’ – this means it has not received any data from the Pebble watch recently. The watch appears to be working ok, so I don’t know if it is a problem with the watch not sending data, or the Android Pebble App on the phone not telling OpenSeizureDetector that it has received some data for it.
I have set up our spare watch and phone to see if they do the same – I might end up swapping over the watches – the spare is older though and its battery is not as good and its screen keeps corrupting, which might annoy Benjamin…..
Before Christmas I released an updated version of the OpenSeizureDetector watch app that will run on a Pebble Time, and at least one user got it working ok. Another user recently reported that although the app runs on the Pebble Time, it does not send data to the phone.
I have made an updated version of the phone app addresses these issues, so if you are using OpenSeizureDetector on a Pebble Time, or a Pebble Classic using the “Pebble Time” phone app, I would recommend using version 2.0c of OpenSeizureDetector. Screenshots of V2.0 shown below – it now includes ‘approach to alarm’ indicator bars.
(Note that this version is a test one, so you may have to allow ‘untrusted sources’ in your android settings to get it to install – once I am happy that it is working ok, I will release it on Play Store.)