reliably detecting the presence of IOS devices on your network

One of the challenges in having a good home automation system is how to detect the presence of people in the house. I’ve had many tries on doing this, among them:


– Movement sensors.

These work – but for a big house you need a lot of movement sensors if you are going to have good coverage, and they do not work in practice in our house.

– iBeacons

Generally need to track a Bluetooth device, and unless you can get every household member to carry a bluetooth device, this is unworkable. The best idea would be to use a ibeacon running one a mobile phone, but these would include installing software on every household members mobile phone, not workable in practice. The option is to detect each phones bluetooth interface, but this is again not applicable for IOS devices (more about that later) – or without reducing battery life when the phone is outside the range of your house. The range is also very short, and means that you would need (potentially) a lot of receivers.

– Check for the presence of mobile phones.

You can unfortunately not ping IOS devices after that have entered deep sleep, nor use ARP to detect them.


As our household is run on iPhones the last has been a problem – until I found a reference to how to wake up a IOS device from deep sleep by sending packets to port 5353 (mDNS port) to wake it up, and the use ARP to check for the presence on the network.

This is a excellent way of doing detection, as the only downside is that it will lead to more battery usage (as deep sleep reduces the devices power consumption drastically). And of course it was very clear that a way to do this had to exist – otherwise you would not get alerts/messages/emails wen the IOS device was in deep sleep.


How to do this in practice

After installing hping3 (I did this on a Raspberry Pi by using arp-get install hping3) i made a very short shell script


sudo hping3 -2 -c 10 -p 5353 -i u1 $1  2> /dev/null 1>/dev/null

arp -an | egrep -w $1


it works (though not perfectly) as it wakes up the IOS devices, and responds like this when it finds a device



? ( at b4:f0:ab:c5:62:dc [ether] on eth0


and for a device that is asleep 



? ( at <incomplete> on eth0





Raspberry PI zero music distribution for the house

I have a new and small hobby project in music distribution for the house.

We have a “big” hifi in the library with 2 QUAD electrostatics and a REL sub – which we almost never fire up these days. But I still want to play music around the house. And in the living room we have 2 small JBL Control1’s (they are fairly unobtrusive and not too bad (you’d never know that I used to build recording studios for a living (-;)

So the current plan is to user Airfoil to distribute music to all our amplifiers/speakers/etc in the house. The master Airfoil will be on a server running iTunes/Apple Music, and the audio output will be through a combination of Apple Airports and AppleTV’s around the house. 

But for the JBL Control1’s i wanted to experiment and do it differently. The idea was to take a Raspberry Pi ZeroW (the tiny £9 wireless (and bluetooth) version of the Raspberry Pi and add a JustBoom Zero Amp to it. The fantastic thing is that there is a Airfoil Satellite for Linux and the Raspberry PI!

And I got it all working now.



This is a partial screenshot of the server in action – you can see the audio sources around the house on the left hand side of the screen, and behind everything iTune/Apple Music running, pumping out music to the tiny Raspberry Pi Zero, and using the JustBoom amp playing on the JBLs!

I’m very pleased that the test seems to work!!!

A smart home automation camera with MotionEyeOS and Raspberry Pi

I just built a reasonably small and inexpensive home automation camera using


Raspberry Pi Zero W

Raspberry Pi camera

5V micro-USB power supply

Memory card.

It was very simple to put together and it actually works quite well – now on to find a case for it, unless I use a window mount.

The software is quite good – and can deal with motion detection, remote storage, alerts etc.


This is a screenshot of the results – and btw. you can control many such cameras from one UI.

How to use Google Home speaker from your Apple computer

As I a just trialling a Google Home Speaker at home – and as we use iTunes/Apple Music etc. I had to find a way to play all our music through the Google Home speaker.


Test 1

Moving all our music to Plex – and then it’s really easy, just select output from Plex


and the Google Home pops up. Easy.


Test 2

Use Airfoil – just start up Airfoil and


Select iTunes as source – and the Google Home speaker pops up in the destination list. It even works!

Brew #13 – Brewdog 5AM Saint

Did brew #13 using the Grandfather today, and this included a lot of firsts for us :

– This was a Brewdog pre-packed recipe.

– Our first Lager (even if it is described as a American Red IPA).

– The first Dry-Hop. Ie. hop pellets added after the boil, straight into the fermentation bin.

– And it came out clear, but very dark.

This was in other words a unusual brew, with very few directions in how to perform the brewing process, and at least one of the calculations for the boil went wrong, as we only got around 20litres of brew into primary fermentation. The Gravity (1050) was spot on though.

It also used a lot of different hops – so the taste should be interesting.