
The absolute horror of WiFi light switches - edent
https://shkspr.mobi/blog/2016/03/the-absolute-horror-of-wifi-light-switches/
======
rlpb
Traditional light switches have evolved to have the perfect UX (within their
scope). I can tell the state of the switch from its physical position and it
has a nice click when switching to give me instant and appropriate tactile
feedback.

Losing this is a step backwards. For me, this device would be a downgrade even
if it worked well.

I understand that the state of the switch might end up wrong, but we already
have that in standard 2-way switches. Ultimately, perhaps we'll see mechanical
switches that can also move themselves.

You can get both Z-Wave and Insteon switch inserts that continue using the
existing physical switch but also relay the switch position to a controller. I
plan to use these instead.

I like Insteon's dual bus system (RF and also encoded into the lighting
circuit itself) but it doesn't have encryption. Z-Wave has encryption but I
don't know how good it is. So I haven't decided between the two yet.

~~~
edent
That's very true. The switches I reviewed had good "click" when pressed and
used an LED to indicate state.

I did look at Z-Wave switches, but it seems they also need a neutral wire.

Perhaps I'll just hire a servant to turn things on and off for me. Uber for
electrical switches...

~~~
delinka
"...LED to indicate state."

This will not do when I'm trying to sleep in a darkened room.

~~~
pjc50
This is funnier because by definition it _already has a many-watt light to
indicate state!_

~~~
Decade
Doesn't work when you are in a poorly designed space with several adjacent
3-way switches that control interleaved lights. Oh, how many times I've wished
those switches had some indicator.

------
Klathmon
TL;DR: Someone buys cheap no-name brand chinese light switches and is
surprised when they don't include instructions, have poor security, and don't
work very well or at all.

I see these kinds of "IOT hate" articles on HN a lot recently, and most of
them are judging an industry based on the cheapest and worst quality parts.

~~~
edent
Well, I don't consider £50 (US$70, €65) to be particularly cheap. They're
certainly more expensive than some of the competition
([http://www.wifiplug.co.uk/wifiplug-
glass.html](http://www.wifiplug.co.uk/wifiplug-glass.html)).

If you can find me a more expensive and/or higher quality switch - I'll gladly
buy and review it.

~~~
delinka
"Inexpensive" and "cheap" are not synonymous. I've experienced plenty of cheap
things with a high price, and it produces the perception that the entire
industry is terrible.

~~~
frobozz
I've never seen a thesaurus that agrees with you.

~~~
stephenhuey
The OS X Dictionary app's thesaurus lists "poor-quality" and "low-grade" and
"shoddy" as synonyms of cheap. Merriam Webster's online dictionary gives this
for definition 3a of cheap:

"of inferior quality or worth"

[http://www.merriam-webster.com/dictionary/cheap](http://www.merriam-
webster.com/dictionary/cheap)

~~~
frobozz
Both of the sources you cite list "inexpensive" as a synonym of "cheap", and
vice versa.

In fact, I've just looked at the OSX app, and "CHEAP" is the first word after
the context in the "inexpensive" entry, and "INEXPENSIVE" is the first word
after the context in the "cheap" entry.

[http://www.merriam-webster.com/thesaurus/inexpensive](http://www.merriam-
webster.com/thesaurus/inexpensive) [http://www.merriam-
webster.com/thesaurus/cheap](http://www.merriam-webster.com/thesaurus/cheap)

~~~
Sanddancer
Yes, in some contexts, they're synonymous. However, they tend to have
different connotations. Inexpensive usually implies low in cost, but of
reasonable quality. Cheap tends to imply low in cost, and low quality. For
example, someone cheaping out on a part.

~~~
frobozz
Yes, but apart from the case of a low quality and cost item ending up more
expensive in the long run because of replacements and high maintenance costs;
it doesn't tend to mean high in cost,low in quality.

The relationship between the words,in the sense you describe, is
hypo/hypernymy.

My original comment was in response to an apparent claim that the two words
are entirely unrelated.

~~~
jvickers
Things can indeed be both cheap and expensive. It takes two different
perspectives, both being correct in their own right, and not directly
contradicting each other.

There can be different ways of looking at the cost of an item: 1) The cost of
the parts and manufacture. 2) The retail price.

An item could be cheap from perspective 1 and expensive from perspective 2.

------
rvense
I still struggle to understand why this is worth the trouble even if it did
work. Maybe if you were a head in a jar living a life of quiet dignity like in
Futurama. But you're not. You want to turn the lights on you go flick the
switch. What's the problem?

~~~
prof_hobart
I don't know about his particular setup, but remote control lights do have
their uses.

I've got a couple of wifi-controlled Philips Hue lights. There isn't a simple
"on" or "off" for these - they can be set to just about any colour and
brightness. One, for instance, is set to wake my daughter up with an
artificial sunrise over the space of about 15 mins in the morning, is off
automatically during most of the day when there's no one in the house, and
goes a very dim red at night.

As my wife has a habit of forgetting that they switch themselves off, she
still fairly frequently physically switches it off at the wall. If it's still
of at the point that the "dim for the evening" program is due to run, then it
doesn't get triggered and I have to dig out my phone app to kick it off.

So I've just built a little switch using a Pi and a very cheap (in both senses
of the word) touch screen running a web page with buttons on it that triggers
various actions on the light such as setting the dimmer colour.

I'm waiting for the day when there's a cheap and good off the shelf switch
that does this kind of thing properly for home automation.

~~~
Dan_in_Brighton
@prof_hobart, your 'smart' switch (Pi/http/touch-screen) sounds nifty. Are you
willing to share any tips, methods, or even code for that hack?

~~~
prof_hobart
Sure. I can post some more details (such as scripts and photo) when I get home
if you're interested.

But at a high level, it's pretty straightforward, and there's also almost
certainly far better ways of doing it.

The key components are

\- a Philips Hue light

\- The Openhab[1] open source home automation server (currently running on an
old Windows box that's always on for various other reasons). This controls the
lights.

\- Apache, also running on the same box. This provides a very simple web UI
for the Pi.

\- A Raspberry Pi - it's one of the original Pi model Bs.

\- Firefox (Iceweasel version) on the Pi - the built-in one didn't seem to run
the jquery that I needed.

\- A cheapo touchscreen [2] attached to the Pi.

The OpenHab server has a plugin for Hue lights, and you can write scripts to
make it do various things, such as switch on/off at a particular time, or on
getting a command from somewhere else. It also has a REST API interface.

It's this API interface that the web app is calling. That's made up at the
moment of 3 buttons (on, off and dim), and when one is pressed it sends a
jquery REST call to the OpenHab server to trigger one of the commands.
Technically, what it's doing is setting one of 3 OpenHab "buttons" to ON. This
triggers the OpenHab rule to change the light.

The touchscreen attaches straight onto the Pi's GPIO pins. I pointed Firefox
at the Apache on my server and set it to full screen mode. The screen's not
great - it feels as cheap as you'd expect for £16 - but it works, and most
importantly my daughter loves it.

Like I say, there's almost certainly better/simpler ways to achieve some of
this - I suspect I could run the entire thing on the Pi for example, or
replace the Pi with an old iPhone that I've got lying around. The OpenHab
software also allows you to build a custom UI itself. But I like playing, and
there's a bunch of tech things that I wanted to try out, and this seemed like
a fun and useful project to test them out on.

My next plan is to get an Arduino and connect some dials to it to allow direct
control of brightness and RGB.

[1] [http://www.openhab.org/](http://www.openhab.org/) [2]
[http://www.amazon.co.uk/dp/B00YE0UPES](http://www.amazon.co.uk/dp/B00YE0UPES)

------
raldi
_> The UK has a unique way of wiring houses which doesn't lend itself well to
automated control._

I never heard of this. Does anyone know what it refers to?

Edit: Free karma points for anyone who sketches ASCII art diagrams of the
replies! The links are nice, but none of them show how switches and lightbulbs
work in ring vs radial.

~~~
pjc50
Neutral is not usually present at the switch, which makes it hard to power
things.

There is a lighting ring main through the lights, and each switch is a spur
that gets "live" and "to lightbulb". Whereas it looks like other countries run
power to the _switches_ , and then to the light.

Edit for diagrams: [http://www.howtowirealightswitch.com/2-way-switch-with-
power...](http://www.howtowirealightswitch.com/2-way-switch-with-power-feed-
via-light/) ("UK") versus [http://www.howtowirealightswitch.com/2-way-switch-
with-power...](http://www.howtowirealightswitch.com/2-way-switch-with-power-
feed-via-switch/) (neutral at switch, suitable for powering other electronics)

~~~
raldi
Okay, I think I get it. They're both electrically equivalent to this circuit:

    
    
        White main --- Bulb ----+
                                |
        Black main --- Switch --+
    

But "equivalent circuits" are not actually equivalent when you're an
electrician. It makes a big practical difference whether the main goes to the
bulb, with the switch as a spur (UK), or whether the main goes to the switch,
with the bulb as a spur (US and others).

P.S. Everybody please give pjc50 the karma I promised.

------
dfc
I skipped to the section that is titled "Decompiling the Software" hoping for
something interesting. Spoiler alert the author "was too scared to port scan
the light switch." These IoT rage posts are starting to get monotonous.

There should be a law against that many "pull quotes" from your twitter
account.

~~~
joshuaheard
Ha, and he was quoting himself. Why not just say it. I felt like I was
switching back and forth between an alternate reality.

------
api
I bet someone in China can turn off your lights now. Am I the only one who
sees this as a degradation?

IoT will hit it's stride when it moves beyond "put a chip in it." The killer
apps will be entirely new things impossible to build without chips, not chips
in old things that work perfectly fine already.

------
adysan
Regarding that fake CE (China Export) mark
[https://twitter.com/StudioBezombie/status/703039494975414273](https://twitter.com/StudioBezombie/status/703039494975414273)

------
RRRA
Ubnt mFi gives you root access over ssh, a rest API and a web page that'll
probably work from your phone...

They're not perfect, but damn, we should stop treating IoT devices like closed
crap that'll never get updated and they at least try...

~~~
andrewpe
Another +1 for Ubnt mFi. I'm running 2 of them in my apartment for the last 3
months with no problems.

~~~
edent
Sadly they don't seem suitable for UK voltages.

------
orestes910
While pricey, the Hue Tap seems to be a good middle ground. Its powered by the
press of the button itself, so no wiring needs to take place. Pair, stick it
onto a wall, and then you have 3 light switches ready to go.

~~~
sundaeofshock
As an owner of Hue lights, I can unequivocally state that the Tap sucks. I
have all sorts of alarms and geofences so that my lights turn off and on with
little or no manual intervention, so the Tap might get used only a few times a
week. Since the device didn't hold much of a charge, I would have to tap it
multiple times before it responded. The damn thing also turned out to be
pretty flimsy; it just plain stopped working after about 6 months.

~~~
tyleo
Interesting. I have about 10 Hue Taps in my house. The nice thing about this
is that I was able to gauge the performance of each switch against the others.
In my experience, some of the switches work better than others. The poor ones
can be so bad that they are borderline useless while the good ones function
more or less like a standard light switch. I returned and replaced all of my
finicky switches. I recommend that you do the same if you are experiencing
issues.

------
fit2rule
Here's the (open) User Manual for the MagicShifter3000, which is an open-
source wifi-controlled light synthesizer:

[https://github.com/magicshifter/MS3000/wiki/UserManual](https://github.com/magicshifter/MS3000/wiki/UserManual)

You can use the MagicShifter3000 as a remote-controlled LED light .. among
other things.

More details here: [http://magicshifter.net/](http://magicshifter.net/)

------
skoczymroczny
[https://twitter.com/internetofshit](https://twitter.com/internetofshit)

------
Ixiaus
We don't have a 220v version of the Plum Lightpad, otherwise I would offer to
send one to you, but not all "smart" switches are quite as bad as your
experience. We've done our best to focus on build quality, security, and
usefulness (we do need a neutral though).

~~~
edent
Yours do look lovely. Might get an electrician to give me a quote on rewiring
some of the switches.

Either that or move to the USA ;-)

~~~
ValentineC
You could alternatively use a stepdown transformer, I suppose.

~~~
edent
Bit hard to squeeze into a light switch :-)

------
mdip
I've got a couple of these WiFi switches (different brands and configuration)
and most of them are variants of the Broadlink SP1/SP2 switches/plugs.

They work by sending UDP packets between the device and the app, either over
the internet (Ankuoo attaches to AWS hosts in the US and EU) or on the local
network segment. The AWS host is used for time sync and to allow internet
control of devices behind NAT firewalls. I've traced the packets and they're
pretty benign (though I haven't grabbed the traffic of the initial "connect it
to the network" part, so there may be scary bits there). The packets are UDP
port 80 and the most frequent is the sending of the device MAC and IP/Port to
AWS which is replied to with the same packet and the server's time appended.

As best I can tell, no encryption is used anywhere, however, the reply to a
Device Query command contains data I can't make any sense of so part of it
_might_ be encrypted. The devices have a 4-byte code associated which appears
to be used by a method in the firmware that looks to be creating an AES key
and doing an AES-CBC encryption/decryption, but other than that Device Query
command, the other packets are easy to parse and have no encrypted parts, so
I'm not sure where that's actually used, yet.

The traffic between the different brands is extremely similar, varying mostly
only by the hosts they contact and the first 32-bytes of each packet which I
believe is a key identifying the variant of the Broadlink based device so that
the different apps don't pick up devices that aren't meant for them (since
capabilities of each vary, as well). The Ankuoo device has two ports open, one
on port 80 and one other, UDP way up in the user ports, that I can't figure
out. They listen on UDP port 80 for everything. The other device brand has an
http web service exposed, as well, which makes interacting with it a lot
easier, but adds one more attack vector.

Though the lack of encryption bothers me, these devices are also completely
proprietary, very cheap and lack any API or any way to work with any home
automation solutions other than their apps, so the fact that it's unprotected
is allowing me to easily write a plug-in to tie these in with my home
automation tools.

My plan is to block them from communicating with the internet and replace
their heartbeat packets with replies from a local host. They're already
running on a separate wireless network that's isolated from my home network
and all but the hosts they contact. I did this because of another ugly
limitation: the devices _all_ require your network be WPA-PSK (or WEP, I
assume). WPA2 is not supported and the passphrase has a maximum length of 32
characters. When I do this, the (worthless) apps will stop working but since
I'm tying into my home automation solution, that's no issue from where I sit.

As for the neutral wire, it's purpose is pretty obvious when you think about
it: The neutral wire is required to power the switch when the switch is turned
off. Without it, there's no current going to the switch and therefore nothing
to power the device -- bye, bye WiFi connection. My house was built in the
1980s and includes neutral wires in all of the switches. Whether or not a
house has neutral wires, though, seems to be pretty random. Since a lot of
switches include LEDs for making finding the switch easier in the dark (though
many are battery powered), a lot of house wiring includes the neutral wire to
some/all switches. Code in my area _requires_ it for new wiring and I assume
that's common, but my parent's house built in the late 90s lacks the neutral
wire in the switches I looked at. I'm a _little_ surprised they didn't include
this in bold lettering in the listing, but if you do a bit of home wiring
you'd assume this limitation was there, anyway.

