Loops

July 3, 2015

Running in circles

Another run without earphones was completed last night – I’ve reverted to using a Polar chest strap hear rate monitor whilst the Jabras are in their non-working state. Relatively faster and slow interval running last night – at over 30C and high humidity it’s not much fun. Jabra have offered to check my failed earphones to help determine root cause analysis (it’s a refreshing change to be on the other end of an RCA issue!), and have offered to send me a set of Sport Coach earphones. They don’t have an integrated heart rate monitor, but are a further development from the Sport Pulse earphones that keep failing on me. The plan is that if these work, then Jabra could incorporate changes to the Sport Pulse headset and resolve the problem I am continually suffering from. Result!

Programming loops …

Last night, The Boy figured that 3:45am was a good time to ‘ask’ for his milk. As usual, I have a lower resistance to staying in bed that the OH, so up I got to prep the milk. He wasn’t in a good mood – we think he’s teething again (although if he had teeth for all the times we thought he was teething he’d have about 30 by now!). Sad, but true, upon walking in to his room, one of my initial thoughts was ‘it’s pretty warm in here, and the aircon hasn’t automatically kicked in’. Milk was duly delivered and drank, followed up by a dose of Nurofen – at which point the OH appeared to provide comfort as well (The Boy was noisy enough to ruin her chances of a restful night too!).

Whilst OH was settling The Boy, as I was fully awake by now I couldn’t help myself but to check the thermostat code. As I suspected, the code had entered an infinite loop and then been called again and again every 5 minutes. I’m still not sure why the Raspberry Pi is occasionally unable to reach the WiFi enabled plug, and that it stays unreachable, as it did last night. I performed some manual pings from the Raspberry Pi, checked arp tables, and the WiFi plug (seemingly) randomly started responding to pings, which cleared the looped thermostat scripts, and kicked in the air con unit to work.

We were back to bed for 4:15am or so, and I then had my brain pondering why the plug occasionally becomes non-responsive and how to ‘fix’ this.

  • Restrict the looping code to 5 iterations and then exit with an error code (probably a good idea)
  • Try a different (or additional) connection to the WiFi plug (maybe using UDP?)
  • Clear the arp table prior to pinging
  • Try an arping instead of a regular ICMP ping

It’s stuff like this that is keeping me awake at night … that and The Boy of course!

More running

June 30, 2015

Running

Unfortunately, it’s more running without heart rate monitoring earphones, as the fifth pair have now failed. I make that just about 5 pairs failed inside 5 months. I am not going to warranty replace these ones – there is quite clearly a flaw and I don’t really see the point in continuing to trek out to Kwun Tong every couple of weeks.

I’ve passed this news onto the Jabra Director of Product Management, so we’ll see where we go with this …

https://www.strava.com/activities/335366121

It was hot last night – over 30C and it felt pretty humid too, so I changed my regular steady run into a kind of fartlek run, by pushing harder on the straights of the race track, and taking it easy round the bends. It was a convenient coincidence that most of the hilly parts are on the bends! 3 external and 1 internal lap was the distance – reasonably accurately tracked by the watch at about 3.5 miles.

Baby Monitoring

The IR camera and temperature monitoring Raspberry Pi in The Boy’s room continues to work well – there were some minor issues with the monitoring code and the code that turns the air con unit on and off. I’ll happily hold my hand up here and admit I’m not much of a coder.

https://github.com/jervine/rpi-temp-humid-monitor to see it in all it’s ugliness.

There might still be a problem with the thermostat code that should run on a cron job – as on one (maybe two) occasions the Pi has had lots of cron scheduled jobs running and not exiting. This eventually causes the pi account to fail to complete commands – I’ve a suspicion this is the thermostat code going into an infinite loop, which is theoretically possible, as if the WiFi enabled plug socket doesn’t respond the code should keep pinging the adapter, and retrying the power command until it succeeds. The adapter should always respond eventually though. Maybe I’ll put in some logic where if it hasn’t responded after X number of attempts we give up on it – I’d probably also need a notification system though, so that I can be notified when this failure happens!

Adding more to the thermostat

June 20, 2015

Adding more to the Raspberry Pi

Having already basically created a thermostat using a Raspberry Pi and a temperature monitor in conjunction with the WiFi power socket I was wondering what functionality I could add. Having looked around for a bit I found that there is a camera module available which can pick up infra-red light.

pi-noirThis is the Raspberry Pi-Noir camera module. Basically, it’s the regular camera module with the IR filter removed. The cable is connected to one of the ZIF sockets on the Raspberry Pi board, so that’s quick and easy. The reason I liked the idea of the IR camera is that it could act as a baby monitor camera – particularly at night. However, a camera that doesn’t filter IR light still needs an IR light source though, and this is solved with the Bright-Pi module.

bright-piThis is a board with 8 IR LEDs and 4 regular light LEDs that connect to the pins on the Raspberry Pi board. Unfortunately, the assembly instructions point out that ‘some’ soldering is required. Bugger. Having previously noted that my previous experience with soldering wasn’t entirely positive this did have me slightly concerned. Not being one to back away from a challenge, I duly ordered myself a soldering iron and as small a tip as possible.

It turns out I’m still not great at soldering, however, it seems I am good enough. It probably took me 45 minutes in total (which is quite slow really), but I managed to solder all the LEDs and the cable connector to the board. Even more amazingly the LEDs worked when the board was connected to the Pi and the control commands sent. I was quite impressed with myself at this point.

Casing

Adding all these modules meant I needed a case for the Pi – and there are loads of cases available. Having looked around, I finally settled on this one:

smartipi_raspberry_pi_case_compatible_with_lego_bricks_2A lego compatible case! With a camera compartment. Given this is going to be in The Boy’s room – it definitely appealed to my geeky side. The only slight drawback was that the Bright-Pi add-on didn’t fit with the camera compartment cover – so the camera module would have to remain fully exposed. Not a disaster, and nothing a bit of Blu-Tac wouldn’t fix. See, I can do low tech solutions too!

The finished article now looks like this:

finished-pi-cam-tempOK, so I bought a few bits of lego as well … so that the camera can be raised up a bit, and a couple of blocks for the temperature/humidity sensor to sit on. The online document for putting the temperature/humidity module together had used glue to attach the module to a case – again, I used Blu-Tac to attach the module to the lego bricks.

The final addition to this project was to make sure that the camera output be available as a webpage – OH approval being important here. There seemed to be quite a few options available, in the end I settled for an implementation using MJPEG and making the results available on a web page – along with lots of configuration options. Making some minor changes I was able to put together a web page that included the live camera feed, and the last 6 hours of temperature/humidity monitoring in a graph. There are even Android and iOS apps available that can interface directly with the web page for viewing the camera output.

I could take things even further and enable motion detection and video recording, but so far I haven’t felt that is necessary.

More running …

Yes, it’s the regular running update. I had a run on Thursday night – unfortunately the GPS wouldn’t lock on the watch, so there was no Strava recording. However, the wireless earphones worked for their second use. I also had another run this evening, and the earphones worked for the third successive run. Unfortunately, it seems that there was a problem with Ghostracer during the run and the last lap has been lost, but the remaining run was recorded but the earphones worked correctly.

Some more geeking around at home …

June 17, 2015

Continuing the techno-geekery at home

As written in a previous post I’d bought some wireless controlled electrical plug adapters primarily for use to remotely control the air conditioning unit in The Son’s room, especially in the evenings after he had been put down for the night. The adapters are controlled via a smartphone application, and certainly meet the functionality they promised. However, I’m a curious sort of person, and am always looking to see if ‘improvements’ can be made, and all the better if those improvements involve a bit of customisation and poking around with the Linux command line, or ‘messing around on my computers’ as the OH would describe it.

I’d already discovered that there was a project called ninjablocks that was set up to automate certain hardware and tasks, however in the negative column is that this project had run out of money and was winding up. In the positive column was they had a framework that ran on a Raspberry Pi Linux system, and allowed control from ‘the cloud’, although given the money has run out, how long this cloud remains is open to question. It’s also slightly overkill for my needs – I don’t really need to control my air con from the cloud. A bit more looking produced a simple perl script hosted on github. I had previously tried simply sending the UDP control packets via a netcat command to the S20 power adapters, but couldn’t reliably ensure that the adapters were switched on and off, and for my intended project I needed to ensure that the adapters were in the state I wanted them in.

From a Linux device on the same wireless network as the plug adapters, I can control their state (and query their current state) using this bauhn.pl script. e.g. ‘bauhn.pl <MAC address of plug adapter> on’ would switch it on. Nice and simple.

Automating the process – step one

As has probably become clear, I’ve been expanding my interest into the Raspberry Pi system boards. If you don’t already know, these are brilliant little system boards, and has recently been updated to version 2, with a multi-core CPU and 1GB of memory to play with.

pi2There’s a nice picture of a Pi 2 board showing the 4 USB sockets, 1 ethernet port (100Mbps), 1 HDMI out, and an audio socket. The 40 pins you can see are available for various uses (data, power, GPIO) allowing lots of (cheap) components to be added and providing a huge number of potential projects that this can be used. There are two ZIF sockets (the black and white ones in the picture), one for camera module, and one for a display module. To this, for my home automation project, I’m adding an AM 2302 temperature/humidity sensor as seen below.

temp-humid There is a great tutorial already written up on connecting one of these monitors to a Raspberry Pi, so I won’t need to go through all the steps here. Some soldering of the wires onto the connectors was listed, however I found using a crimping tool provided a secure enough connection, and avoided me having to try out soldering again – memories of ‘technology’ class at school came flooding back and ugly blobs of solder I’d used to connect two wires together. To say I was not good at soldering is an understatement, and it’s a skill I wasn’t in a hurry to re-visit.

Skipping forward …

Amazingly, I have my Raspberry Pi board connected to my temperature and humidity sensor and it all works exactly as listed. I made some modifications to the C code for recording the readings so that any obviously wrong readings were silently ignored and not added to the database of results. At the same time I discovered that my C coding is really not very good at all, so I’m in the process of putting together a python program/script to replace the C code that reads the sensor. This has all demonstrated to me that I’m also not much of coder at all – but I can quite happily lift pieces of code from around the Internet and put together a hodge podge of code that will work for my needs. Using python, as it’s a nice high level language, makes this even easier for me …

Anyway, with the components all working, I cobbled together an HTML page that draws a Google Chart from data in the MySQL database:

temp-humidAwesome! I can draw charts that automatically update themselves! I did discover that reading all records from the database would result in slower load times for the graphs, so I’ve limited the main page to just show the last six hours of readings.

Automating the process at home – step two

On my Raspberry Pi, I have set up a cron job that runs a bash script every five minutes between 7:00pm and 6:00am. This bash script queries the last record in the MySQL database, and if the temperature is above a threshold it will then call the aforementioned bauhn.pl script to turn the power adapter on. If the temperature is below a threshold then the same script will turn the adapter off.

temp-humid2As can be seen, the temperature (and humidity) fluctuate whilst the script runs. Basically, I have created a thermostat … Whoo! Admittedly, not the most exciting thing in the world – and given the bill of materials came to about US$50 or so, it probably wasn’t the most cost effective either. It was fun doing it though, and there is a sense of achievement that it actually works, or in the words of the OH ‘you’re such a geek’.

Running …

No post is complete without my latest running update: I ran last night. The GPS on the watch worked throughout my run! I used a wrist sweatband under the watch, so undoubtedly looked a bit naff, but I know where I ran! (round Happy Valley). I have warranty replaced my Jabra earphones for a fourth time, so had heartrate monitored whilst I ran – but had no music to listen to, as I had reset my watch which wiped the cached music and I hadn’t thought to resynchronise it:

doh Strava link: https://www.strava.com/activities/326531149 and https://www.strava.com/activities/326943413

Ran a bit further than usual – and due to mucking about with wondering why my music wasn’t working the run record was split into 2 activities. On the subject of the earphones – I’ve been contacted by the Director of Product Management and passed on my experience to him, so it will be interesting to see where that leads. I’m not expecting the current (fifth) set of earphones to last any longer than the previous sets though.

Even more fitness and tech stuff

June 13, 2015

I’ve started so I’ll finish

Those who know me, know I’m really quite stubborn … Even so, I really had thought I’d finished with writing about my challenges with being a running geek. Honest! Hopefully this won’t be yet another lengthy whinge update.

The Watch and GPS

I’d already said that my Sony Smartwatch 3 had been updated to Android 5.1.1, and that the last few runs have been somewhat inaccurate with the GPS tracking. Another run was ‘performed’ (i.e. I shuffled round Happy Valley none to fast) on Thursday evening:

https://www.strava.com/activities/323146055

There’s a couple of arrow straight lines where the GPS has lost it’s signal only to reacquire it. And, it finally lost it’s lock at the ‘1.9 mile’ mark. Once again, another inaccurate GPS recording. I’d tried a suggestion of removing Android Wear from my phone, and resetting the watch. That didn’t work very well then.

For my next trick I’m going to be the retro-runner, and will be running with a sweat wristband. All very 1980s. Maybe some day-glo running gear would complete the look. Anyway, the reason for this is to wear the watch on top and try and reduce the (copious) amount of sweat that it gets in contact with. Watch this space, or not …

The earphones …

Having once again been refused the option to swap my broken earphones via postage, and had no helpful response from a couple of support requests to Jabra (admittedly, one was to the Jabra US support page), I have finally had a response … by using twitter [1]. I’ll hold my hand up here and admit I don’t like twitter. I really don’t see the point in it. I think it’s pretty pointless. I work in tech, and I know I should probably be more pro-twitter, but I just think it’s daft. I do have a twitter account (handle?) though.

Tweeting (ugh!) @We_Are_Jabra produced a really fast response. They’ve offered to put me in email (thank god) contact with a product manager to discuss the problems I’ve had. This is great for me personally, but I really don’t like ‘having to go public’ to get this kind of response. I work in a tech support role, so I do appreciate this kind of behaviour is pretty annoying, however it pretty much demonstrates that he who shouts loudest and most publicly gets a better response.

I’d already mentally given up on the Jabra earphones – asking for a refund that had been point blank refused. Looking around, the following caught my attention:

Sony B-Trainer
Bragi Dash
SMSAudio (although this uses the wire cable to provide power … not much use on my smartwatch)

There was another German product kickstarter project, but I now can’t find the site (not very memorable obviously). These all look very version 1.0, or prototype-y though, so I’m somewhat skeptical (or is it sceptical?) as to whether they’d survive the punishment. The Sony’s are tempting though – and available in Hong Kong.

Like an addict who knows no better, I’m probably going to give the Jabra’s ‘one last go’ given I have now contacted them directly.

A suggestion to go for Jaybird Bluebuds X was made – been there, done that, and knackered two pairs in quick succession. Oddly enough, in a similar fashion to the Jabras they stopped holding a charge too.

[1] The OH used twitter to contact the Hong Kong British Passport people last year over the fiasco we had getting The Son’s UK passport, and got a far better response than any calls or emails to the proper channels. Might be another future whingey post on that subject.

The Running Geek … part 2

June 10, 2015

As I was saying …

At the start of this year I’ve tried to go running using bluetooth earphones, and met with mixed poor results. Alongside the bluetooth earphones I had also decided to try and do away with bringing my phone with me whilst running. I previously owned a Sony Xperia Z, and the earphone socket showed the pink hue on the hydration detector suggesting it had at some point come into contact with water, and the back had begun to lift away from the chassis. The waterproof flaps were also showing signs of regular use, and overall it was just feeling a bit tired – and on the odd occasion the microphone wouldn’t work on phone calls. All of this was probably not helped by being brought on runs in an armband which would inevitably end up quite damp, due to running in the rain, and also due to my previously mentioned propensity to sweat profusely. The fact that the armband was designed for the slightly smaller Galaxy Nexus phone (at times I can be quite cheap [not that the OH would believe me] and re-use stuff that isn’t quite right for the job) didn’t help either. Anyway … I quite liked the idea of a new Nexus phone, but the Nexus 6 wasn’t available quite yet, so I ended up with a Huawei Ascend Mate 7. I could write lots about what I like and don’t like about this phone, however that’s not really the point here.

Ditch the phone, and get a watch

The Ascend Mate 7 definitely doesn’t fit the armband to go running, and is pretty large, so I had in mind to get some kind of watch. I liked the idea of a Garmin, Polar, or TomTom fitness watch, preferably with heart rate sensor. However, these are quite expensive (see, I really can be cheap!) – especially for a watch that I’d likely only wear whilst running, which given my available time might amount to one hour per week. I then quite liked the look of the FitBit Surge, however it was also not available at the time I was buying. Also, I’ve learnt that although getting data into FitBit is easy, getting that data out is not so straightforward and as far as I’m aware the FitBit Surge wouldn’t really integrate with other apps I might like to use. None of these options also provided an ability for listening to podcasts whilst running either. At this point I decided to look to smartwatches as a potential option.

GPS was a necessity – the whole point is to ditch the phone so I didn’t have to run with it. That narrowed the options drastically to either the Samsung Gear S Watch which runs Tizen or the Sony Smartwatch 3 which runs Android Wear. Neither of which would pass the OH’s ‘is it ugly?’ test though. Not being a fan of the Samsung Android styling, and having liked the Sony phone I had, I went for the Sony Smartwatch 3.

The Not-so Good

Almost immediately I found some limitations – syncing media content to the phone is not something that many apps do. As far as I’m aware only Google Play Music and the Sony Walkman will sync music across to the watch. Pocketcasts is my podcast app of choice and at the time had no Android Wear support. OK, slight compromise, I’ll listen to music whilst I run. I had tried a number of running apps on my phone – Endomondo, Runtastic, Strava, and Runkeeper (I’m persistent …), and whilst some of these did support Wear, it was really only to remote control the app on the phone. In other words you were expected to take the phone with you! Not exactly what I had in mind – but probably due to not many watches having GPS therefore not being a focus of development. This has improved lately, however the best application is still the independently developed Ghostracer which could upload data to Strava (and now Runkeeper too).

The watch also takes a bit of time to acquire a GPS lock – phones typically use their SIM to help optimise the location identification, whereas this is not available on the watch, and as far as I’m aware phones can also cache Satellite data to help speed up location services, and this is also not available on the watch. You can manually start the GPS under the watch’s ‘developer options’ which I generally do on my walk over to where I run hoping that a lock has been acquired by the time I get there (the subway tunnel does not help this though). Otherwise there’s a bit of standing around looking like a dork waiting for the watch to lock onto the GPS satellites …

The Good

When the bluetooth earphones worked it was great running with just the watch and listening to music. When not running, having the watch mirror notifications from the phone was something I got used to quite quickly and would have to say it’s ‘nice to have’, but not exactly essential. The watch also supports Google Fit, and counts steps so this could at some point replace the FitBit I still use (although it seems as though the Google Fit step counting can be a bit varied at times). The Sleep as Android app could also potentially replace the sleep monitoring function of the FitBit too. And, it tells the time too, which is a bit of a bonus (except for the embarrassing time I changed the watch face and read the time wrong when asked … problem exists between watch and brain [pebwab] in this instance).

The annoying …

The recent update to version 5.1.1 added wifi, wrist gestures, and a screen lock – but does seem to have introduced GPS lock problems.

Here’s a nice Strava entry from early February: https://www.strava.com/activities/250676755

This was run in the halcyon days of the watch and wireless earphones working in perfect harmony. 3 external laps and one internal lap, all neatly recorded.

Here’s a not-so nice Strava entry from last night: https://www.strava.com/activities/321682771

Same route, GPS locked at the start of the run – no earphones, and using the Polar chest strap heart rate monitor.

Both of these should be following the same route. Last night I’d noticed the distance wasn’t updating after a while so paused for a bit to try and re-acquire GPS lock (with a bit of swearing at the watch too). Apparently, GPS issues have been reported by other users (on all versions of Android Wear on the Smartwatch 3). I’d be quite tempted to downgrade back to an earlier release, but that seems to be impossible (or at least very difficult – so possibly a weekend job). Some suggestions are to factory reset the watch after the update to 5.1.1, so I’ve done that and will be testing again later this week.

Ignoring the garbage statistics – I do know that I definitely run faster in the winter months. Given it was 30C and horribly humid last night, this isn’t exactly surprising though.

Where does this leave things?

I have a suspicion I’ll be back out running with a phone in the next few weeks – it acquires GPS better, and I can listen to my podcasts/music more reliably. In conclusion – this has not been one of my more successful technology ideas …

[Another 1100+ words – this time on wearing a watch …]

The Running Geek

June 6, 2015

I’m not angry … I’m just disappointed.

Two posts in a week. A relative flurry of activity it would appear. I had planned to write about running and the various bits of technology I use, or have used, in a future update. Circumstances have come together to persuade me to write it now. I like to do a bit of running. I don’t run very far, and I don’t run very fast. Some of this is due to heat and humidity of Hong Kong, but mostly it is due to not finding sufficient time. So, on average I get out for a 30 minute run, which means actual running time of between 20-25 minutes. This is just about perfect for a 3-3.5 mile run. Being able to run round the infield of Happy Valley racecourse is a bonus – whilst not the most exciting run to do it does provide consistency and I can get a general measure of how fast I’m running, and how well I’m lasting. My regular run is therefore 3 ‘external’ laps, and 1 ‘internal’.

That’s all incredibly fascinating, I’m sure you’ll agree. Times have moved on from the 1980s when a digital watch could have a stopwatch and ‘lap’ timer. Being the geeky tech guy I am, I bought a FitBit nearly two years ago (ok, I’m actually onto my second Flex as the first one died on me). I also like to listen to podcasts whilst running, and I also bought myself a Polar heart rate monitor. I don’t need all these vital measurements, this stuff, but I do kind of like knowing it, and as the OH would attest, I like my gadgets.

Running without wires

The wired earphones are annoying, and the chest heart rate monitor does sometimes feel a bit restrictive round the chest. It was with a degree of excitement when I saw Jabra wireless earphones that can also measure your pulse become available. This could be the perfect solution for what I want when running. I duly bought a pair at the end of January, and they were awesome. Working exactly as advertised – Bluetooth connection to listen to music or podcasts, and a Bluetooth Low Energy connection for heart rate recording. Apparently, the heart rate is measured by recording blood flow in your ears, I didn’t care how they measured rate though – these seemed great. And they were, right up until they broke, after about 15 runs, by the middle of March. The central power button had seemed to collapsed, and they could no longer power on.

The joys of warranty

There is a 12 month warranty period with these earphones – although you do have to go the warranty repair centre in Kwun Tong, with the original packaging, and the store receipt. I’ll admit I have a bad habit of throwing receipts away quite regularly, and that was the case here. Fortunately, the shop were happy enough to reprint the receipt, so all I had to do next was get myself out to Kwun Tong … First off; I know Hong Kong is geographically quite small, and incredibly well connected, so it’s a bit childish to complain about travelling whilst living here. However, that’s what I’m going to do. And yes, Kwun Tong is on an MTR line – although the warranty repair centre is nowhere near the station. Similarly there are plenty of buses going through Kwun Tong. However, it’s still an HK$150 taxi trip, or 45-50 minutes by bus/MTR to get to the warranty centre. In order to swap my now broken earphones over for a new working pair would cost me HK$300 in taxis, or 1.5-2 hours of my time. Did I mention the warranty centre only opens Mon-Fri, and is closed between 12:00-2:00pm for lunch? Brilliant – it’s only open during the working day, and you need to physically bring the earphones to swap them. No mailing in of broken equipment here. That’s a big negative for customer service right there.

Trip #1

A swap was duly made, and to be fair, this was as painless as I could have hoped for, and a new working pair of earphones was provided when I went to the warranty centre to swap them over. These earphones worked for about 3-4 runs before they too failed. This time, the power button (and volume buttons) were still working, but they would not charge, and the red charging LED would never light up green to show a full charge. I think this is symptomatic of a battery problem.

Trip #2

Having made the first trip using expensive taxis, I realised if I had to make six of these trips I’d have shelled out enough for another set of earphones. This time I took the bus from just outside my office during lunch to try and arrive just as they re-opened after lunch. Again, no hassles swapping the earphones over. I had expressed my disappointment in emails to the warranty centre that the earphones had failed again, and fruitlessly asked for the option to mail swap the earphones. Earphone set number 3 … lasted one run! On my second time wearing them, they would not switch on. Exactly the same fault as set number 2.

Trip #3

At least I knew exactly which bus to catch and where to get off this time. Another wasted set of email exchanges pleading to exchange via mail as well. The warranty centre ‘helpfully’ suggested I could get a friend to swap them. Because, of course, my friends don’t work, and have nothing better to do than traipse out to Kwun Tong for me … What would be more helpful is if the earphones actually worked. Earphone set number 4 were a 100% improvement on set number 3. They worked for 2 running sessions, and had failed by the time I went for a third run with them. They are now sitting on a table beside the couch mocking me every time I look at them. The OH has suggested that I simply ask for a refund this time, and I think she might be right.

What have I learnt?

Not a great deal – I suspect the first set lasted as ‘long’ as they did due to it winter here and less humid. As the humidity cranked up, the lifespan of the earphones dropped dramatically, and I, like my Dad, and it seems I’ve passed this delightful trait onto The Son as well, am a heavy sweater when exercising. Clearly the Jabra earphones aren’t up to working well in humid conditions. It’s a product I so dearly wanted to like and enjoy using, and it’s probably all the more frustrating that when they did work they were great, and meant I had no dangly earphone wire, and no chest strap heart rate monitor as well. Like I said, I’m not angry, I’m just so disappointed that a product that promised so much, ultimately delivered so little.

WordPress says that is 1100 words … Over a thousand words on earphones (that don’t work), to follow up a previous lengthy post on plugs. Fascinating stuff, eh? The readers will just be poring in at this rate.

Back again … no idea if this means more frequent updates though

June 3, 2015

Some Techno-Geekery at Home

Obviously the blog hasn’t been updated for a long time. That either means nothing of note has happened or so much has been happening I just haven’t had time to keep things updated. It’s a little bit of the latter, and predominantly because I simply couldn’t be bothered. Anyway, today’s post is very much a first world problem and my current solution.

Problem: 

When putting ‘The Son’ [1] to bed in the evenings we like to switch on the air conditioning unit in his room so it’s not too hot and humid. Unfortunately, the aircon in his room is of the non-remote control, plugged into the wall and manually switched on variety. The switching on is obviously no problem – however, at some point it does need to be switched off, and this means going back into the room and running the gauntlet of potentially waking him up. And that’s a quick way to ruin the evening … Like I said, first world problem, but still one that needs solving.

[1] You mean you didn’t know? This probably falls into the first category of reasons as to why this hasn’t been updated for so long …

The Solution:

The other half (OH from now on I think), had suggested putting some kind of ‘plug timer’ device on the socket that the aircon was plugged into. This would certainly have worked as designed, but wouldn’t have given a huge amount of flexibility, and to be honest, is a bit too boring for my liking. And let’s face it, we’re living in the 21st century now, and supposedly the Internet of Things means everything is going to be connected.

Clearly this called for something a bit more geeky. The answer, unsurprisingly, is a wifi enabled plug socket passthrough adapter. With this gizmo, it plugs into the socket, and the aircon then plugs into it. The power can be controlled by an app on Android or iPhone. Early research (i.e. using google and amazon) suggested there were quite a few options available. However, the requirement of a UK plug socket limited choices a bit, and then limited options completely as it seems Amazon UK wouldn’t ship them to Hong Kong. I suspect they don’t like exporting electrical related products – even though Hong Kong has the same electrical system as the UK. Prices were also looking slightly higher than I imagined, e.g. 40GBP per unit.

Not to be deterred, it occurred to me that these things are going to be made in China, and I live in China Hong Kong then surely there must be a more local solution. And indeed there is … alibaba.com (OK, not so much local as massively global these days). No such shipping restrictions here. And choices galore. In fact it was difficult to decide which suppliers to contact.

The fact I didn’t want to order 100s or 1000s of units, as well as the strict design guidelines I had in mind (i.e. it wouldn’t fail the ‘it’s ugly’ test from the OH) helped narrow this down somewhat and I think I sent off contact requests to about 5 different suppliers. Of which only one responded and asked for my WhatsApp contact details. Not exactly ideal, but I figured I would be providing contact details if an order went ahead, so duly contacted ‘Crystal’ via WhatsApp.

Despite my initial caution, this started very well. The company was based in Shenzhen, had the units in UK format in stock, and could ship the following week. Each unit would be US$20 – so I ordered three. The only problem was that Crystal required a delivery address in Chinese … I had decided to get delivery to my office, and even though the official address is English in Hong Kong, I still needed to supply a Chinese address for delivery.

The double sided printing of business cards here, with one side in English, and one side in Chinese came to the rescue. A quick scan provided the address in Chinese, and sure enough a few days later three wifi enabled plug adapters turned up. one of which has been installed into The Son’s room for his aircon, and we’re now happily remotely controlling the aircon without the danger of waking him up and ruining our evening.

Epilogue:

The plugs are Orvibo S20 models, and it seems they’re not particularly security conscious. Initial pairing sends your supposedly secret WPA2 passphrase in cleartext to the S20. However, the easy setup didn’t work for me – probably due to so many wifi signals in our vicinity, so I had to use the AP set up method where the S20 hosts a wifi network which your smartphone joins, and then you configure the S20 for the real wifi network. Once this was completed, then I could use the app on my phone whilst connected to my home wifi network.

Kind of. The S20 app on Android called Wiwo looks pretty modern and seems to adhere to Google’s material design guidelines (suggesting it might be reasonably recently coded). Unfortunately it kept crashing on my phone (running Kit Kat). It worked on my tablet though (running Lollipop), even if it didn’t really conform to the tablet layout. Fortunately, the older Wiwo app (designed for S10 plugs apparently) does work on the phone, even if it is a bit ugly. The OH gave this solution the thumbs up, and even installed the iPhone app … which promptly refused to find the S20 plug. Fiddling about in the app settings, I randomly added the wifi details, and lo! it found the S20. Overall app experience felt a bit flaky.

Doing a bit of network scanning, it seems that the S20 listens for UDP traffic on port 10000. There’s a couple of blogs that go into way more detail than I needed, but it shows some promise for being able to control the socket outside of the app. Even better, I found that someone had put together a driver for Orvibo kit (including the S20) for a solution called ninjablocks. Unfortunately, ninjablocks was a Kickstarter project that as of a couple of weeks has run out of money, and is starting to wind up, which is a shame.

The outcome of this is that I could install the ninjablocks software on a Raspberry Pi, register this to the ninjablocks cloud, and then remotely control the aircon via this cloud dashboard. For however long the ninjablocks cloud remains in operation anyway.

Sorry – a much longer post that I initially imagined. Well done on getting this far, just to read about me plugiing an aircon in.

The Towering Inferno

January 18, 2011

So, last night was certainly one of the most dramatic I’ve had whether in the UK or over here. Myself and my table sharer (TS) had taken ourselves to bed at about 10:30pm (no, don’t worry this blog entry is not going there …) and having read for a bit (or played Angry Birds in her instance) were about to turn off the lights for some sleep when there’s a semi-distant ringing set off. After we both ignored this for about 10 seconds the discussion is along the lines of ‘do you think that alarm is coming from our building?’. Again, another pause whilst I consider whether to get up, put clothes back on, and see what the fuss is about.

With just about my jeans and t-shirt on the rather worrying sight of flashing lights outside and below the bedroom window confirms the worst. The alarm is indeed in our building, and judging by the arrival and activity of the fire engines appliances (yes, plural) then this doesn’t seem to be a drill or an alarm being mistakenly set off. Crap. Really crap …

The first thought was what to take with me – I thought about the little NAS box containing all my photos and irreplaceable documents. In the short space of time available I decided not to. Still in my mind this didn’t seem to be a building burning down moment…

Once outside our apartment (we’re on the 7th floor) it’s a case of taking an internal stairway down. We must have been on about the 1st or 2nd floor when a fireman shouts, at the by now group of people, that we should go back up. No indication as to how far back up though. Our apartments? The roof? Who knows! Even the local Canto speakers don’t know what’s going on, so we retrace our steps this time going up. With the distinct smell of smoke in the stairwell… And the sense that all is not so good after all definitely rising. At each floor of the stairwell are windows that look out into a small area that runs next to the lift shaft. Through one of these windows you can now see the smoke coming up, and just to really top things off, some more embers than I’d care to see shoot up also. The air outside this window is warm, and looking down there is just a lot of smoke to see. As of now, going up doesn’t really appeal to me.

With nowhere else to go we’ve reached floor 18 (the building has 23), and TS decides it’s time to call 999. At the time I thought this was a bit odd, the police and fire services were already here after all, but it turns out this is a good decision, as the operators can (after checking with someone presumably) tell you what you should be doing, rather than simply following a single shouted instruction ‘Go Up!’.

Having been going down and up in the stairwell for about 20 minutes or so a fireman finally arrives on the 18th floor in the stairwell and instructs everyone to return to their apartments. He doesn’t mention whether the fire is out or what is going on. The view from the stairwell window is still smokey but no more embers are visible (which is reassuring) and we traipse back down to our apartment thinking we’re not going to sleep very well tonight with the adrenaline definitely pumping (and the alarm still ringing).

About 50 minutes after the alarm first started ringing and it stops, shortly followed by a fireman knocking on the door to give the all-clear – and confirm with TS that she was ok, as she’d called 999. Definitely a dramatic night, and true enough, not easy to get to sleep afterwards either. The lingering smell of smoke in our clothes didn’t exactly help matters either.

The Next Day …

One of the two lifts (the one servicing our floor) is still out of action, and getting out via the staircase reveals the extent of the damage from the fire. There is a small open area, probably about the size of a lift shaft that runs next to the actual lift shaft. A door on the ground floor to this area is open and all you can see is the blackened remains of whatever was there previously. And black walls. And still quite a bit of water around. With it being an enclosed space I can imagine the risk of the fire spreading quickly would have been pretty high – not a very nice thought. Well, using all the knowledge I’ve gleaned from watching CSI, I’d hypothesise (they don’t guess on those shows after all), that some idiot has been smoking a cigarette in the stairwell, we’d later traipse up and down, and tossed his cigarette butt out the window. A bit later and we get to play a bit part in a Hong Kong version of the Towering Inferno*.

Bit of a puzzle as to why our lift is out of action being opposite the side where the fire seemed to be, and the lift that is next to the fire site is still operating. Answers welcome.

* 23 floors isn’t quite a tower, and it probably wasn’t much of an inferno (but is as close as I’d like to be to one)

The windy city

June 1, 2010

It’s been getting hotter, wetter, and more humid again in Hong Kong … a sure sign that the typhoon season isn’t too far away. Fingers are crossed for T8s in the morning on week days.

The hockey season has finally finished again – HK organisation being what it is meant that nearly 8 weeks passed between the end of the league season and the cup competition. The 8 week gap had not improved our hockey and we, very disappointingly, went out to a golden goal in extra time having fought back from 2-0 down to draw 2-2 in normal time. It’s fair to say I didn’t cover myself in glory picking up my first ever yellow card.

It did mean that last weekend was free from hockey, and I was able to take advantage of this by going to see the musical Chicago at the Lyric Theatre here. I wouldn’t exactly be classed as a regular theatre-goer. Thinking back, the last trip I’d have made to a show would have been Shaolin monks doing martial art type stuff in London well before moving to Hong Kong. Chicago has had quite a lot of publicity, as it’s on tour from London – where it has received good reviews apparently.

Overall it was an enjoyable night, with a few things that just mark it out as Hong Kong. It was a hot and humid night, so the ample opportunity to work up an uncomfortable sweat when walking to the theatre was taken. I still haven’t learnt that the direct path between where I am and where I want to be isn’t necessarily the right route to take, especially with the amount of building work going on meaning roads can be randomly blocked off. Three years and you’d think I’d be aware of this.

Upon arrival in the foyer an announcement is made asking everyone to make their way upstairs as the show was about to begin. This was at least 30 minutes before the scheduled start which seemed odd, as I didn’t imagine we’d be getting trailers for upcoming shows somehow. Arriving at the upstairs section, and enthusiastic usher points us towards the section labelled on the ticket … at which point I’m asked ‘where is my sticker?’. I don’t have a sticker. A company called OOCL have sponsored tonight and have two areas which dominate the upstairs section of the entrance. To be part of this party you need a rather flimsy looking sticker. The woman asking for my sticker doesn’t look too impressed with my answer that I don’t have one and I’m just looking for theatre entrance B. Entrance B is nearby, and very obviously not open.

After standing round looking like a lemon thinking there surely must be somewhere I can get a drink for about 5 minutes, a quick enquiry about drinks to the staff member on the door means she has to ask someone else. Following on from this, someone with a clue points back in the direction where the stairs are. It seems the original usher had been a bit over-zealous, and rather than initially offering directions to the bar thought directions to a closed door far more apt.

With the bar found, a pre-show sparkling wine could be enjoyed before having to move back to the door in order to actually get in. This was yet another bar that used a token system. I’m not convinced of the efficiency of token bars. Particularly when the table to buy tokens from is right next to the bar itself. I’m sure in London upon arrival you’d be directed straight to the bar to be parted from your cash in return for over-priced drinks. Here, sometimes, it can be a battle to buy over-priced drinks.

As I said, I found the show itself to be very enjoyable – it was (presumably) subtitled for the Chinese with electronic displays either side of the stage displaying Cantonese* when the speaking parts were in action. Quite how much a non-English speaker would follow when the songs are sung is debatable as they weren’t subtitled. It must make for quite a strange experience. The seating, like the buses here, aren’t designed for Westerners. It’s not even as though I have long legs, but legroom was definitely at a premium, and it was a bit of a squeeze when people had to move through.

There was the expected glow from mobile phones dotted throughout the audience, but as far as I was aware there wasn’t a mobile phone ring during the performance. There was, unfortunately, an annoying child who must have been about 6 years old though in the row behind. I’m not entirely sure what the parents were thinking about bringing a 6 year old to Chicago. It’s not as though the storyline is exactly aimed for that age group, and when he starts fidgeting and whining he’s just upsetting everyone else nearby. Besides, considering the show started at 8:00pm (and finished at 10:30pm), shouldn’t he have been in bed by then? This is what people have live-in maids for in Hong Kong …

I think the biggest surprise of the night though was at the end when they announced the cast and that it was Craig McLachlan playing Billy Flynn, or rather it was ‘Henry from Neighbours’. When it was announced it was definitely an ‘oh yeah, of course!’ moment, and felt as though I should have realised that beforehand. Still, at least I have the excuse I’m not Australian, so could be sort of expected not to know that … unlike who I was with!

* Could have been Mandarin … let’s face it after three years and no knowledge whatsoever of Cantonese, I’m not going to be able to read the difference between Mandarin and Cantonese either.


Follow

Get every new post delivered to your Inbox.