Switchmate

MrMobileWill bluetooth, HomeAutomation, indiegogo 8 Comments

Last year my friend and I backed the Switchmate on Indiegogo.  At the time I didn’t have much of a home automation setup – just two window nodes and the slider.  Not even any connected bulbs and I was still on DomoitaGA so I didn’t have any of the fancy rules I now have in openHAB.  Over the course of the campaign, they had different deals so I ended up with three rewards.  I had actually forgotten about them, in part because since switching to openHAB and getting connected light bulbs, the need for these switches seemed diminished.  But one day I was pleasantly surprised to receive a shipping notice.  A few days later I received the package in the mail and boy was I surprised!  The quality and presentation was excellent – not what I expected at all.  Curious about them?  Read on!

<

 

Now added to my home automation system the Switchmate, “a sleek, minimalist lighting device that magnetically snaps on to any standard light switch, enabling users to control the switch via the Switchmate companion app.” When you live in a rental, oftentimes you cannot modify any electrical hardware (or anything really), so I think these switches have become the missing link in a home automation system.  It is a Bluetooth LE magnetic overlay switch for your wall switches.  You can get a version that works with either the toggle or rocker style switches.  The magnets are surprisingly very strong and attach firmly to any wall switch.  We have the rocker switches and so far it works quite well.  Bonus, the process of setting up the app and using the switch was very quick and straight forward.

 

One caveat (that my wife quickly pointed out) is that when pressed, it is a bit loud, but not too bad.  This is probably not something for a sleeping beauty.  It has a motor to flip the switch and a button on the front to control it locally.  The last thing you want from a home automation system is make simple tasks more difficult and time consuming, like turning on the light. Currently if you use the switch it turns the connected bulb off and therefore you loose control from the system. These switches solve that problem and then you wouldn’t need connected bulbs.  The regular LED bulbs would do just fine, but you would loose the dimming ability and color if you get a RGB bulb which I plan on doing when I make lots of money or someone sends me one to review, oh um, I mean when they become much cheaper.

Switchmate Android App

Now on to the fun part! Let’s discuss how to integrate this with my existing system.  During the campaign I had asked if they were going to release the protocol and they said yes that we could talk to it from other devices.  So far their site doesn’t have the documentation but I imagine that is the least of their priorities right now.  I have a support ticket open to see if I can get the documentation without having to wait for them to release something.  I did noticed on their site they have plans to integrate with existing systems and provide a way to control it away from home.  Since it is Bluetooth, I would assume they would need a base station or compatibility with third party devices.

In the meantime though, I thought this would be a fun exercise to try and decode the protocol myself.  I ordered the Adafruit Bluefruit LE Sniffer, so whilst I wait for that to arrive, I decided to do some snooping to see what I can find.  Using the nRF Master Control Panel app from Nordic I can gather some more information on the device.

nRF Master Control Panel – Switchmate

These days there are many more Bluetooth devices around, it isn’t just your cutting edge people that use them (hello 1990’s!).  But by removing the batteries while scanning I can tell right away the first device listed is iBeacon is the Switchmate.  Interestingly they chose to use iBeacon but it makes sense for the auto room detection feature. This app works with non Nordic devices but it turns out they are using a Nordic Bluetooth radio, a very popular chip now.

Switchmate BTLE Profiles

I am not very familiar with iBeacon but I get the gist of it. It’s an advertisement service so your phone can know where you are and send you ads, I mean coupons when you are out around town.  It does support sending small pieces of data. Bluetooth 4 uses GATT profiles and characteristics, very different to classic Bluetooth (<4.0).  In the above picture there are two of interest, “Nordic LED Button Service” and “Device Firmware Update Service”,…hmm can I push my own firmware?  Upon reading each characteristic I found one that returned a value of the firmware version which matches the device information in their app. Nice.

Switchmate Device Firmware Version

At this point without the sniffer, it’s a guessing game of what data to send to which characteristic to trigger the device.  But is it fun to do some poking to see how much you can easily learn about a device without even opening it.  One question I have is security – granted iBeacons are meant to have short range and the device requires you to push the button to connect/control it but if you have one visible from outside of your home it could be a problem.  Once I get the sniffer I will have to see if I can control it without having to pair with it.  Usually with Bluetooth 4.0 you don’t pair – just connect and start receiving/sending data but they may have their own security layer on top.  Even if Switchmate sends me the information first, I still would like to try and figure it out myself.

Comments 8

  1. I also was surprised when I finally received mine after forgetting that I ordered them. On top of the (slight) noise, it's also been difficult to remember to press the light instead of flick a switch. Glad theagnets are so strong because I always bump the thing trying to flick the lights on.

    1. They finally shipped my missing one. I found that if the switch isn't flush with the wall plate the Switchmate doesn't work very well, even with the inserts. So far only one switch works well with it. I really need to get them integrated into openHAB otherwise I don't have a good use for them yet.

      1. I live in a relatively new rental and all the switches are the same style and it's a great product for me. I imagine it's difficult to build a product that is compatible with 100% of existing systems. I have tried to make a similar design myself and gave up before finishing it.

        1. Out place is remodeled but looks like a rush job. Maybe I can 3D print a larger insert. I find that even on the one that does work it doesn't actually push it enough to fully click the switch. How are yours?

  2. Hi, I just got a Switchmate and have been trying to probe it with stock tools like btmon and gatttool with no luck. Did you learn any more about how to control the Switchmate using RPi? Thanks!

      1. I was so fascinated by the idea of Bluetooth sniffing with Wireshark, I forgot to check GitHub!

        I cloned https://github.com/brianpeiris/switchmate and found it does work to turn the switch on and off. It appears that the app can get battery level and current state of the light, so I suppose I’ll order the sniffer board after all and submit a pull request if I figure it out.

        Thanks for your help here!

Leave a Reply