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.
"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.
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:
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.
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.
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.
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.
Indeed. I was just now commenting on another thread about how smart homes are shit. The problem is that smart homes work, just not if you can't afford custom professional installation and maintenance. J. Random Blogger can't afford a smart home that works, can't afford to upgrade it, and hasn't got the right use cases, like a large home with a security system, telephone/intercom system, media room, multi-car garage, pool, etc.
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.
Actually, I think on that specific switch it was the other way round. Personally I'd have preferred your scenario - because it means I can always find the switch.
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.
Generally this is true. That said, there are some Z-Wave switchable outlet adapters or LED bulbs that are on the market that can be used in an existing fixture without changes to the physical wiring, if needed. There was only only place in my house where this ended up being needed (a 3-way switch that left no free AC neutral).
I would love to see some real innovation in this area, because i think there is so much that can be done to retrofit every single switch in a current house with something.
I've currently given up because my house has 4 3 or 4-way circuits and there are really only 2 pretty poor choices for 3-way switches, and none that i can find so far for 4-way that don't require you to fully rewire the circuit and then have the controller to fake the 4-way-ness of the circuit.
The most prominent real innovation I can think of is to not have light switches at all. It should be possible to have some heat/motion detection system hooked up to the lights, so that you don't actually ever have to manually turn the lights on or off any more. For bedrooms, I can even think of something that links to the alarm clock.
My apartment has the worst of both worlds: switches that can't be controlled by WiFi, but are wireless [1].
The switch has no state, so sometimes I press the wrong side of it. Sometimes the light doesn't respond — particularly if I want to switch more than one light on or off. One day the batteries in the switch will run out.
I assume the only advantage is the reduction in wiring needed.
I can't speak to the Insteon but I have Z-Wave devices throughout the house. I chose Z-Wave for the same reason you're interested: in theory they have an attempt at security. I've read about some possible shortcomings, but it frankly seemed like the best option available.
Initial pairing can be awkward because they require that they're within about a meter, maybe two, in order to set up the relationship.
After that, devices that are hard wired typically create a range extending mesh network which has allowed me to get communication with devices all the way across the house and upstairs even though my hub is way too far away for direct communication.
I've got outlets, a thermostat, light switches, temp/humidity sensors, and motion detectors that are all Z-Wave based and they have worked flawlessly for going on a year.
EDIT: With all the IoT horror stories on HN lately- I wanted to add that I purposely chose a set of devices that do not directly connect to the Internet for all the reasons we are hearing about. Phoning home, hidden unsecured networks, etc.
With Z-Wave (and ZigBee, and others) you don't need the Internet at all. If I removed my home hub right now everything would work (except for some macros) as if they were regular ol' non-connected devices. This was the absolute most important thing to me and why I chose a $60 Z-Wave thermostat that looks like an old $20 programmable one instead of Nest or some of the others.
I'm not sure how important security is in a z-wave lightswitch because any vulnerabilities for your network would be in the zigbee-to-lan gateway. The devices are rather dumb themselves, just an address and a little bit of state. If someone did compromise the lightswitch, it would still need the gateway to do malice.
If you're talking about a full processing node, that would be a real concern, like some of these wifi products that can sit on your network, sniff traffic, and compromise you via egress. I have a real concern over all these unknowns.
I've had really good luck wiring about 10 of my home lights (indoors and outdoors) with Z-Wave switches. Integrating them with a broader Python REST API (I have a few other non-Zwave sensors and cameras) and custom mobile control apps was a really enjoyable project of mine last fall.
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?
I'm really pleased you don't have any mobility problems. But for those of us who sometimes struggle to get from one side of the room to the other, it makes a world of difference to be able control things locally. Or set up timers. Or make the lights flash when there's a phone call.
Is it really that big of a leap to have other things be remote controlled?
I feel like every day I want the light turned on while i'm at my desk. Or i remember that i forgot to turn out the living room light when i'm in bed. Or when a friend texts me and i'd like to turn on the outside light for them.
Yeah, it's not a cure for cancer, but it's not useless either.
>Maybe if you were a head in a jar living a life of quiet dignity like in Futurama
People like comfort, a friend of mine says that we come to earth to fight against pain (or discomfort).
There are practical scenarios that you would like to consider,
-e.g. you are on your way to the kitchen and lights turn
on on your way
-(not sure if we have a product with this feature but)
turn the temperature of lightning as it becomes night a
la f.lux
-Wake you up with lights
On the other hand even then with the exception of light temperature I would not consider it price/feature ratio worthy.
For once it might be my turn to tell something interesting that not everyone here knew before:
There is a simple solution to that, using only standard switches and the standard power wire, -in fact I think this is a standard thing for fresh electricians-to-be to learn first year in school here.
Edit: I have this setup at home in my staircase so I don't have to walk up (or down) to turn on/off he lights.
The Philips Hue bulbs are great. I used them for years without problems. You don't need to do anything with your switches since each bulb can connect to wifi. Would be expensive for a large house.
I think the important thing is bulb brightness along with temperature at night. The long term health costs may actually outweigh the cost of bulbs - maybe in another 5 or 10 years there with be some scientific data on that.
I'd quite like to retrofit remote-control lightswitches in a couple of places because the existing lightswitches are badly placed (either behind, or a long way from, the entrance door) without redecorating.
I have a house with nearly 40 light switches. Being able to turn groups of them on and off in coordination is very nice. Hitting one button and having all of the lights desired for dinner guests is cool. Turning off the lights in the TV room, and having them automatically come back on when I pause the movie or turn off the TV is convenient. Switching off all the lights in the house when I go to bed (rather than trudging back downstairs because I forgot to turn off a single light in the kitchen) is really handy.
None of this stuff is life-changing, but it's a very nice convenience and I find it well worth the (really minor) trouble. Though I'm using a zwave-based system, not wifi switches.
Edit: Also, crucially, our system works "as expected" if you don't know anything about it. I've never had a guest surprised or baffled by it, and it works fine if the network and/or controller is down. In some cases a single switch may turn on more than one light, but not in a weird or surprising way -- generally closer to "why didn't they just wire it that way in the first place?"
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.
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.
I posted something similar in an IoT thread here recently, but the main reasons I have them are for security (able to turn on/flash lights in parts of the house if my alarm goes off during the night. Also able to turn lights on/off using a schedule when I am on vacation) and convenience (when my kids were infants I was able to trigger lights on/off as I walked around at 3am. I've also used this when guests are staying in the house). Mine are all z-wave so still function as normal light switches that can be manually toggled on and off.
I created a light alarm with limitlessled/milights. It's actually quite nice to wake up / go to bed with soft orange light. It's also nice to control the bedroom lights from the bed.
Overall it's been a success. But I admit part of fun was actually part of the trouble: writing code to control the lights.
You're getting home with the groceries, you have both hands full, a cat that's trying to escape, and you need to get the lights on. What's easier? Fumbling for the light switch, or saying "Illuminate" when you walk in, and "Deluminate" when you get to the other side of the room and get into the kitchen. Or you're chilling, watching a movie, and you want to pause and get a drink. Your eyes have adapted to the darkness, so turning the lights directly to on is going to blind you for a second. So, you have the lights slowly turn on, and you can see without getting that flash of blindness. There are all kinds of interesting things that having finer grained control of lighting lets you do.
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.
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).
This reminds me of another problem with home automation: there's plenty of cool devices produced in the US that I'm not able to use in a 240V country, because of the voltage difference.
I recently bought a Hue starter kit, but I'm having trouble finding affordable white (4000K-5000K colour temperature) bulbs that are rated for 240V and have Zigbee Lightlink support.
We have a lot of backers waiting on a European compatible version but it's a classic startup story for us: funding is the limitation. It requires a different power board in our product, which we're totally capable of designing, but the cost of maintaining those two versions, the cost and time to certify, and getting the contract manufacturer spun up for it is quite a hurdle in terms of bandwidth and money for us.
I believe we're aiming at building a European version once we've closed our Series A.
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.
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.
Though, in my experience the geofencing stuff works pretty badly if you have multiple devices connected to Hue (so, have multiple people living in the same flat). The lights would turn off when one person leaves, even though others are still inside.
Kind of same thing with alarms: they would turn lights on to dim them when nobody's home, etc
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.
> 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.
It might be referring to the "daisy chain" wiring, which means that every plug has the fuse inside the actual plug itself. This is why UK plugs are so huge. The reason for this is after WWII there was a copper shortage and it was cheaper to wire houses this way.
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.
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.
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.
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.
90 comments
[ 4.7 ms ] story [ 159 ms ] threadI 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.
If you can find me a more expensive and/or higher quality switch - I'll gladly buy and review it.
"of inferior quality or worth"
http://www.merriam-webster.com/dictionary/cheap
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/cheap
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.
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.
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.
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...
This will not do when I'm trying to sleep in a darkened room.
As the bottom of the page says as I write this, "Applications are open for YC Summer 2016"....
Generally this is true. That said, there are some Z-Wave switchable outlet adapters or LED bulbs that are on the market that can be used in an existing fixture without changes to the physical wiring, if needed. There was only only place in my house where this ended up being needed (a 3-way switch that left no free AC neutral).
I've currently given up because my house has 4 3 or 4-way circuits and there are really only 2 pretty poor choices for 3-way switches, and none that i can find so far for 4-way that don't require you to fully rewire the circuit and then have the controller to fake the 4-way-ness of the circuit.
The switch has no state, so sometimes I press the wrong side of it. Sometimes the light doesn't respond — particularly if I want to switch more than one light on or off. One day the batteries in the switch will run out.
I assume the only advantage is the reduction in wiring needed.
[1] http://www.lk.dk/losninger/fa-graveret-dine-tangenter/
Initial pairing can be awkward because they require that they're within about a meter, maybe two, in order to set up the relationship.
After that, devices that are hard wired typically create a range extending mesh network which has allowed me to get communication with devices all the way across the house and upstairs even though my hub is way too far away for direct communication.
I've got outlets, a thermostat, light switches, temp/humidity sensors, and motion detectors that are all Z-Wave based and they have worked flawlessly for going on a year.
EDIT: With all the IoT horror stories on HN lately- I wanted to add that I purposely chose a set of devices that do not directly connect to the Internet for all the reasons we are hearing about. Phoning home, hidden unsecured networks, etc.
With Z-Wave (and ZigBee, and others) you don't need the Internet at all. If I removed my home hub right now everything would work (except for some macros) as if they were regular ol' non-connected devices. This was the absolute most important thing to me and why I chose a $60 Z-Wave thermostat that looks like an old $20 programmable one instead of Nest or some of the others.
Can you provide some links? I'm also looking to automate some lights via z-wave and am having similar difficulty in deciding what to use.
If you're talking about a full processing node, that would be a real concern, like some of these wifi products that can sit on your network, sniff traffic, and compromise you via egress. I have a real concern over all these unknowns.
Until some Goofus installs it sideways.
Is it really that big of a leap to have other things be remote controlled?
I feel like every day I want the light turned on while i'm at my desk. Or i remember that i forgot to turn out the living room light when i'm in bed. Or when a friend texts me and i'd like to turn on the outside light for them.
Yeah, it's not a cure for cancer, but it's not useless either.
People like comfort, a friend of mine says that we come to earth to fight against pain (or discomfort).
There are practical scenarios that you would like to consider,
On the other hand even then with the exception of light temperature I would not consider it price/feature ratio worthy.There is a simple solution to that, using only standard switches and the standard power wire, -in fact I think this is a standard thing for fresh electricians-to-be to learn first year in school here.
Edit: I have this setup at home in my staircase so I don't have to walk up (or down) to turn on/off he lights.
And what if you're a renter and don't have the option of rewiring?
I think the important thing is bulb brightness along with temperature at night. The long term health costs may actually outweigh the cost of bulbs - maybe in another 5 or 10 years there with be some scientific data on that.
They don't connect to your wifi router per se, but create a mesh network among themselves. It's a very cool concept.
> The long term health costs may actually outweigh the cost of bulbs
Care to elaborate?
None of this stuff is life-changing, but it's a very nice convenience and I find it well worth the (really minor) trouble. Though I'm using a zwave-based system, not wifi switches.
Edit: Also, crucially, our system works "as expected" if you don't know anything about it. I've never had a guest surprised or baffled by it, and it works fine if the network and/or controller is down. In some cases a single switch may turn on more than one light, but not in a weird or surprising way -- generally closer to "why didn't they just wire it that way in the first place?"
It's an insane amount of implementation complexity for what is a very simple problem.
A company looking for a billion dollar valuation (see Nest).
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.
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/ [2] http://www.amazon.co.uk/dp/B00YE0UPES
Overall it's been a success. But I admit part of fun was actually part of the trouble: writing code to control the lights.
There should be a law against that many "pull quotes" from your twitter account.
Either that or move to the USA ;-)
I recently bought a Hue starter kit, but I'm having trouble finding affordable white (4000K-5000K colour temperature) bulbs that are rated for 240V and have Zigbee Lightlink support.
I believe we're aiming at building a European version once we've closed our Series A.
This feature is in Android 6.0.
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...
Kind of same thing with alarms: they would turn lights on to dim them when nobody's home, etc
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.
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... ("UK") versus http://www.howtowirealightswitch.com/2-way-switch-with-power... (neutral at switch, suitable for powering other electronics)
P.S. Everybody please give pjc50 the karma I promised.
¹) https://en.wikipedia.org/wiki/Ring_circuit
²) https://en.wikipedia.org/wiki/AC_power_plugs_and_sockets:_Br...
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/
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.
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.