Added ‘+1’ and ‘like’ buttons again

After my bad experience of wordpress plugins adding annoying popups, I thought I’d add the Google Plus ‘+1’ and Facebook ‘like’ buttons back myself.

Added the relevant code to the wordpress content-page.php file from https://developers.google.com/+/web/+1button/ and https://developers.facebook.com/docs/plugins/like-button.

Seems to work, but maybe not as nicely formatted as the simple-share plugin.   Not sure I believe that 1.5M people ‘like’ my posts though, which is what the Facebook code is saying…

Updated BenTV Video Monitor Camera

The IP camera that I have been using for the ‘BenTV’ video monitors for Benjamin (Benja-Telly as we call it) started to fail (picture started breaking up more and more, and sound was replaced by an awful loud buzz), so I needed a new one.
The one I was using was a WansView pan and tilt wireless IP camera, and I was using an RTSP audio/video stream encoded using H264 codec to display it on the raspberry PI based monitors.
When I bought it I had bought a spare – a cheaper, lower resolution one, so I just installed that and expected it to work. Alas, in addition to being lower resolution, it also used different audio/video formats – rather than H264 video it uses motion-jpeg, and an audio format I have been unable to fathom – basically, to use my ‘spare’ camera would need significant changes to how I play the audio/video on the raspberry Pi.
So, I gave up and bought a new camera – the WansView one had been ok, but its wifi was always a bit weak, and I suspected it ‘jammed’ my wifi network for a while if you switched off one of the monitors, so I thought I’d try a different manufacturer. FosCam seemed quite popular, so I went for a FosCam FI9821W Version 2.

All started very promising – plugged it into an ethernet port on my router, and I could see it connect to the router and receive an IP address. Pointed a web browser to the correct IP address and I could access the admin interface and tell it to connect to my wifi network. I thought I ought to upgrade to the latest firmware before I commission it, because I know I’ll not touch it once it is working, so I used the admin interface to download the latest firmware from FosCam and then install it.

It was at this point that I suffered a sense-of-humour-failure because under the new software you can not log into the camera unless you have installed a browser plugin…..and that browser plugin only works on Windows, but my computers all run Linux…. Now I don’t mind Linux not being fully supported because I know most users of a commercial product will use Windows…but I do object to it working with Linux then stopping when the firmware is upgraded. I found a very bad tempered forum ‘discussion’ about it from last year, but no apparent answer.

I tried a factory re-set, but that came back with the new firmware.  I tried downloading some older firmware from the FosCam web site, but that did not seem to do anything (newer firmware retained).   Got very tempted to send the thing back….

In the end I got it working by installing the Wine windows ’emulator’ for Linux, and the ‘winetricks’ tool to install extra things (sudo apt-get install wine winetricks), and used winetricks to install the windows version of the firefox web browser.  With that I can download the browser plugins from the camera and access the admin interface.   Not Ideal!

Annoying Popups

Not sure what happened, but this web site suddenly started showing an annoying “join our userbase” popup.
It appears to be due to an upgrade of the ‘Really Simple Share’ plugin that gives the Facebook Like, Google Plus +1 buttons etc.
The popup seems to be from an organisation galled ReadyGraph, but I don’t want it, and the the ‘Really Simple Share’ settings were not accessible, even from my administrator log-in. I have disabled the plugin for now…..

Improved Fault Warnings

I have noticed that most people use the Pebble Seizure Detector app as a background service and rely on the audible beep warnings to prompt them to check on the person wearing the seizure detector watch.

This is fine as long as the whole system is working – watch paired with server phone and client devices connecting to server ok.

I have had some issues with the server disconnecting from the pebble watch if it goes out of bluetooth range for a while (only has to be a few minutes).   The main app screen shows up warnings in bright red if you look at it, but that only works if it is on the screen.

To get around this I have just added system fault warning ‘chirps’ (very short beeps) to both the server and client apps if there is a general system fault such as not being able to communicate with the pebble, or connect to the server – these should appear as version 1.8 of the server app and version 1.3 of the client in the app store sometime today (Sunday 22 March 2015).

Updated Android App for Pebble Based Seizure Detector

Screenshot_2015-03-03-23-15-19A few improvements to the Android App associated with the pebble based seizure detector over the last couple of days.

  • Version 1.2
    • Updated service so that alarm beep will sound even if main app display is not visible.
  • Version 1.3
    • Added logging to sd card – records data to sd card regularly (every minute) and when a warning or alarm is raised.
    • Added app version number to main display so users know which version they are using to report issues.

Version 1.3 should appear on the Google Play Store in a few hours.

Benjamin wears his new watch

Benjamin wearing his new Pebble Watch Seizure Detector
Benjamin wearing his new Pebble Watch Seizure Detector

Quite a success today – Benjamin is tolerating wearing his new Pebble Watch Seizure Detector – pressure on me to get the Android alarm server application working properly now!

We have had a couple of spurious alarms from some of his more ‘odd’ behaviours, but when he is bouncing around like that he is so noisy that we know he is ok, so that’s not such a concern.

 

(For an explanation of why an 18 year-old wearing a watch is a success, see About Benjamin).

 

 

Pebble Smart-Watch Version – Progress Update

The Pebble Smart-Watch seizure detector is looking very promising.   The software to run on the watch itself seems to be quite reliable at detecting shaking, without giving false alarms during normal activities.

The watch application is published on the Pebble App Store.

diagram

 

We have a rudimentary android app working that talks to the Pebble watch and acts as a web server that clients can query to get the alarm status etc.   This is on the Google Play Store.

You can see a demo here:  https://plus.google.com/+GrahamJones/posts/P9mWstgqP8N?pid=6111006693838101826&oid=106497137253664241170.

The main issue currently is that it works fine with the phone plugged in and charging, but if it is running on battery, the web server goes to sleep so does not work.   For my application this is ok, because we will always be using it in the house, but for it to be useful for others we may want it to work outdoors – I think there is an android permission to stop the phone sleeping that I will have to use.

But, looking promising!

All source code is on the project Github Repository.

Audio Version of Seizure Detector #1

Problem:

  • Sample audio signal
  • Extract breathing sounds from it
  • Determine rate of breathing (or time since last breath)
Breaths are likely to be about 1Hz, but the sound is actually much higher frequency – maybe a few hundred Hz, so I think I am looking for the variation of amplitude of the ~200Hz signal.
How to process this?
Sound card samples at 8 kHz, so we should be able to capture signals at up to 4 kHz, so this is fine – the challenge will be how much data we have to handle.
Go for collecting 1 second of data = 8000 samples, and doing a FFT