Release of V2.5.5 of OpenSeizureDetector

I have just released a beta test version of V2.5.5 of OpenSeizureDetector on Google Play Store.

The only change in this version is improvements to logging of network connections to help with de-bugging issues with the Network Data Source function, that allows you to monitor OpenSeizureDetector remotely via wifi.

This has been produced because we are having issues with fault warning pips sounding every now and then, and are not sure why.   By running this version on both the main phone and the device running with the network data source, we will be able to tell which one is disconnecting from the network.

Release of V2.5.4 of OpenSeizureDetector

I have just made the current Beta test version of OpenSeizureDetector (V2.5.4) the main release – this adds an option to use MP3 alarm sounds rather than computer generated ones, as some users have reported problems with the tone generated ones not working on some phones.

You should not notice any change unless you enable MP3 alarm sounds – please let me know if you do! (

Problems with Samsung Tablet

We use a Samsung Tab A that we use in ‘network datasource’ mode to raise alarms from Benjamin’s watch using wifi (it connects to the phone in his bedroom that is connected to the pebble watch).

When we first started to use it the ‘power saving’ feature used to shut down the OpenSeizureDetector background process that caused it to fail silently, but Sandie found the option to disable this.

There was a software update yesterday that upgraded it to Android 7.1.1, which broke it again.   If the device is running on battery and the screen is switched off, OpenSeizureDetector starts to give fault warning pips after 6-8 minutes.  I am pretty sure it is the wifi going to sleep, because as soon as you put the screen on, OpenSeizureDetector changes to OK and the fault pips stop.

The Wifi Advanced settings are set to always on, so it should have been ok, but it turns out there is now a more specific setting….

In Settings–>Apps–>[Three dots]–>Special Access–>Optimise Battery Usage. You can then select “All apps” and OpenSeizureDetector.  This prevents OpenSeizureDetector being ‘optimised’ for battery usage (from

This ‘optimisation’ is a pain if you want something to just keep running!

Problems with Audible Alarms on Some Devices?

A user reported that audible alarm notifications were not working on a high end Samsung phone.

I have not been able to work out why, so I have just published a beta version (V2.5.4) which uses audio files to make the sounds rather than a tone generator. You can test it by signing up for beta testing here:…/testing/

Has anyone else seen this problem? Please feed back any issues.


Release of OpenSeizureDetector V2.5.3

I have just published V2.5.3 of OpenSeizureDetector on the Android Play Store.

This comes with a new version (V2.6) of the Pebble app that will improve alarm annunciation reliability by avoiding the system resetting back to ‘OK’ straight away if, for example the user falls over during a seizure.

Please upgrade to this version, and also use the option on in the app to install the new watch App.

Improved Alarm Reliability

When Benjamin had his seizure a couple of weeks ago I was surprised that OpenSeizureDetector re-set for a while after alarming – I had expected it to stay in alarm continuously until the shaking movements stopped.   I think that this was because he fell backwards and the algorithm saw that as a lot of movement outside of the shaking frequency range, so said it was ok.   This is not what I want to happen……

I have adjusted the algorithm slightly so that the system is in an ‘ALARM’ state in one analysis period, but the alarm thresholds are not met in the next one, it goes back to ‘WARNING’ rather than ‘OK’.   This means that if the next analysis period satisfies the alarm thresholds again it will go back to full ALARM.

In practice this means that the system will make beeping noises throughout rather than going quiet for 10 seconds or so.

I have put a video on the Facebook page.

This change is not as well tested as things that I usually publish, so I have not released another version of the Android App, but have made the watch app available here: DOWNLOAD Watch App V2.6.

To install,

  • access this post from the device running OpenSeizureDetector.
  • Click on the Download Link above (accept any warnings about downloading files).
  • When Download completes, open the file.  If given the option, select the Pebble app to open it.
  • Say Yes to the question about installing an external file.
  • The OpenSeizureDetector watch app should

Problem on Android V6?

We recently set up a Samsung Galaxy Tab A (Running Android V6.0.1) to run as a Network Data Source to act as a remote alarm annunciator for Benjamin’s seizure detector, connected using WiFi.   We have been using this system for a couple of years – we were just using a different tablet computer.

Since we set it up it has go into an odd state twice – where it appears like it should be in a Fault condition, issuing fault ‘pips’, but it is not, and the status is shown as OK, with the data time shown as 00:00 – see screenshot below.

This is a significant failure of OpenSeizureDetector, because I designed it to do self checking to warn the user if something was not right, and it is not doing it.

Has anyone else seen this and not reported it?   It may be limited to the ‘Network Data Source’ mode of operation, and I don’t think many people are using that, but please let me know if you have seen it, as I haven’t spotted the cause of it yet.










Tonic Clonic Seizure Detected

Benjamin had a tonic-clonic seizure this morning, so I thought it would be useful to describe how OpenSeizureDetector performed in detecting it.

What Happened

  • Benjamin sat up and contorted in an unusual way – head looking up and to the left.
  • Sandie saw this on his video monitor and recognised it as a fit and set off up the stairs to check him.
  • When she found him, Benjamin was lying on his back with arms shaking, but not out stiff (his elbows were bent).
  • It was not one of his worst tonic-clonic seizures – he was not paralysed after it, just needed to sleep it off for a few hours.
  • OpenSeizureDetector alarmed as expected.

OpenSeizureDetector Performance

    • Sandie spotted the seizure using the video monitor from Benjamin’s odd behaviour before OpenSeizureDetector did – this is because OpenSeizureDetector needs the shaking associated with a seizure to detect it, but Sandie spotted the odd movement before the shaking started.
    • The first OpenSeizureDetector warning sounded about the time Sandie reached his bedroom.
    • The warning re-set unepectedly.  I think this was Benjamin falling bakwards, resulting in  a lot of low frequency movement, which the detection algorithm assumes is not seizure-like movement..
    • About 30 seconds later the warning re-initiated followed by full alarm.
    • When the full alarm sounded, Benjamin was lying on his back with arms shaking, but not out stiff (elbows bent).
    • Two full alarm initiations occurred before the seizure detector re-set as the movement subsided.
  • The spectra of the alarm and warning conditions are shown below.
  • The initial warning occurred at a peak frequency of 7 Hz. The full alarm occurred with peak movement at around 4-6 Hz.
  • These spectra are consistent with the type of movement OpenSeizureDetector is set up to detect – an excess of movement in the 3 to 8 Hz range compared to the rest of the spectrum.


  • It is encouraging that OpenSeizureDetector detected a tonic-clonic seizure as expected – the spectrum is consistent with the movement the system is designed to detect.
  • The re-set when Benjamin fell backwards is not what I had expected to happen.   I think we need to add some hysteresis so we have to see a reset condition for a few analysis periods before resetting the alarm.   This will increase the false alarm rate though…..

New Release of OpenSeizureDetector

A new release of OpenSeizureDetector (V2.5.1) will be available on Google Play Store shortly.   I recommend all users upgrade to this version and enable the ‘Latch Alarms’ option in settings.

This release introduces better support for short duration seizures – enabling the ‘Latch Alarms’ option means that when the system goes into alarm the alarm will continue to sound for a given period before resetting, even if the alarm condition clears quickly.

We have been testing this with Benjamin for a few months following his last seizure that was on the limit of detectability so only raised an alarm briefly – with this feature it will sound for at least 10 seconds (or whatever the user specifies in the settings) irrespective of how quickly the alarm condition clears.

Custom Hardware Power Management

I have managed to get the ESP8266 board into MODEM_SLEEP mode if I use Espressif’s RTOS SDK instead of esp-open-rtos.  This is a shame because I liked the esp-open-rtos sdk build system, but I don’t have time to try to modify the SDK.

Using the Espressif SDK allows us to get the current consumption down to 25mA, which should give about 6 hours with the 150 mAh batteries I have in mind for the project – a bit too short still, so may need to use 2 bateries, or think of something else to make the board sleep more – but it is looking feasible which is promising.

See update here: