Hacker News new | past | comments | ask | show | jobs | submit login
Bluetooth LED bulbs (mjg59.dreamwidth.org)
127 points by uggedal on July 8, 2016 | hide | past | favorite | 62 comments



I'm curious why the chinese don't build open-source friendly stuff. They already sell mostly commodities. What's there to lose if someone builds stuff for you ?


Tangentially, read some of Matthew Garrett's other posts on garbagey IoT devices. It's not that they're unfriendly to open-source exactly -- most of them are running horribly insecure GPL-violating embedded linuxes -- it's that they give no thought to licensing at all.


Their stuff is more "gongkai": https://www.bunniestudios.com/blog/?page_id=3107

Because it's so cheap, nobody's going to make the effort to translate the documentation into English and put it on the Internet. But on the other hand if you go there and ask in Chinese you can get quite a lot of information.


It still sounds like something doesn't work quite well . The Chinese in general doesn't have a maker culture, a free open-source culture.

On the other hand, just translating the documentation of this led lightbulb interface would have taken very little time, and would have probably created a nice app that would appeal to western buyers and increase sales.

Maybe there's an opportunity for some site to make this process happen ?


It's my impression that the Chinese have more of a maker culture than almost anywhere else - it's a country full of people who grew up in villages and have now built factories and started companies that manufacture most of the world's stuff.


From an interview with a chinese maker[1]:

"There are almost no Chinese makers in Shenzhen doing it purely as a hobby. I’m pretty active in the community and I have not met them.

Our makerspaces — the few real ones we have — are primarily for educational purposes. We have a couple of places with laser cutters or a small 3D printer for the kids to learn on, but there’s no place you can go swipe a card and use real machine tools in the middle of the night like lots of other major cities have.

...

As far as most Chinese people’s thinking, hobbies are for old people. If you have seen newspaper articles about actual Chinese makers — who have made homemade robots, dialysis machines, submarines, prosthetic arms — they are nearly all older or retirees. Young people in China just don’t have the time or freedom usually.

...

On the other hand, if you are working on a hardware startup or just want to get stuff made, then sure, I think Shenzhen is pretty unbeatable[for making]."

[1]https://exolymph.news/2016/07/05/sexycyborg-shenzhen-3d-prin...


I'm building www.facebook.com/kokonautweathersensors which uses a nodeMCU so it's open source.

There's also a lot of stuff at seeedstudio.com or electrodragon.com that is open source too.

Also, this episode describes where China/Shenzen is at right now https://www.youtube.com/watch?v=e4wbFdePb-k


Your domain www.kokonautweathersensor.com gives unknown host.


Unfortunately, the website isn't up yet. I'm focusing on getting people to participate in a pilot project to get feedback and tests right now. I think the Facebook Page should communicate enough of what the device does for now.


Outdated paranoic "intellectual property" guarding in corporations. Would love more openness from hardware manufacturers, too.


If people bought more stuff from seeed studio which is in that business model, than perhaps LG or Apple or Philips which is not in that business model, then China would be better known for open source stuff.

I've bought stuff from seeed studio before. Nice stuff, nice people. Obviously your mileage may vary WRT individual pieces of hardware.


I'm thinking more about full complete products.

For example connected stuff(either to app or site). Also there's a case to be made for letting people change the embedded software inside their bluetooth headphones, noise cancelling earphones, routers,mp3 players[1], android tv boxes, and any other products with complex software.

[1]There's a custom rom for that called rockbox


"Oh hey, a post by mjg59 involving IoT devices, this should be good."

mjg59 never fails to disappoint.


Every one of them is a gem. It's amazing what people will do to get a terrible product to market.


BLE is king for hobby tinkering. You can even re-use the common and dead cheap NRF24L01+ radio module with some hacks [1].

[1]: http://hackaday.com/2013/09/21/sending-data-over-bluetooth-l...


If you want to play with Bluetooth Low Energy and devices, your best bet is the Arduino 101. It includes BLE and a nice, simple API to handle BLE characteristics. Combine the 101 with a MOSFET attached to digital pins, running the BLEFirmata sketch, and you can remotely control a number of high-power LEDs from your phone.


Why is wireless necessary? Isn't ethernet over power a more obvious solution?

https://en.wikipedia.org/wiki/HomePlug


That's exactly what X10 does, but it's fallen out of favour in recent times.

(I've not used it so I couldn't say why)


I used to use X10. Then I discovered the hard way that buying low-bidder electronics that plug directly into mains power is a really bad idea: one of the control boxes that plugged into a wall outlet started to get hot enough to create a blackened spot on its label.


X10 is particularly horrible for a couple of reasons. For one I'll quote from the Wikipedia entry:

> In the 60 Hz AC current flow, a bit value of one is represented by a 1 millisecond burst of 120 kHz at the zero crossing point (nominally 0°, but within 200 microseconds of the zero crossing point), immediately followed by the absence of a pulse. A zero value is represented by the absence of 120 kHz at the zero crossing point (pulse), immediately followed by the presence of a pulse.

Command sequences are only 2 bytes (16 bits) long, and for certain commands ("all lights on", "all lights off") four of those bits are even ignored. This means it's quite common for electrical noise to be mistaken for signals.

The other problem is increasingly we have more noisy electrical gear on the line, and more equipment that absorbs/filters the actual signals (UPSes, and pretty much any switch-mode power supply in computers, TVs, etc).

I unfortunately put in a bunch of X10 stuff at my parent's cottage many years ago, and it had this problem. Somewhere between every couple days and every few weeks, all the lights would turn on. Sometimes while no one was there, sometimes in the middle of night when you were sleeping :)

We since replaced it with Insteon dual-band, which uses both wireless and powerline, and it's significantly more reliable (and all those problems have disappeared).

In case anyone's interested, we used this stuff because the main floor is basically one big open concept space, and has entrances on all four sides (deck, sunroom, stairs and front door) and the 'smart' switches avoided having to install a stupid amount of 3- and 4-way switches that were originally planned. There's now a keypad by the front door and one in the middle (between kitchen area and sunroom) that can control everything, and a few individual switches by other doors. You can press 'all off' by the front door when leaving and all 6 or 7 circuits in the main area plus the sunroom, hallway, stairs, and foyer turn off.


Powerline doesn't work when you have a house with multiple circuits.


That's not true. Current-gen stuff works for me across circuit breakers. I haven't enabled any encryption, though, so it's probably packets in the clear that maybe even my neighbor could get. cringe


That led to a wonderful evening of debugging during which I was convinced someone was attacking my wireless network. I eventually worked out that my powerline adapters had connected to next door's circuit, and his DHCP server was slightly quicker than mine.


If you don't mind the radio interference and the general flakiness of HomePlug...


I've been running it (or an equivalent ethernet-over-power from another vendor) for years and streaming HD TV over it with no problems.

RF spewing out of the mains wiring is true, but again I've not had any obvious problems due to this. (I'm surprised that they're allowed to be used despite this, however)

edit: Streaming TV over it in that I use it to connect between a MythTV front and back-end, and haven't had any connection or bandwidth issues that I've noticed. It's been pretty rock-solid for me :)


I've tried multiple different HomePlug adapters at home, mostly to stream Steam games from my PC upstairs to my TV in the living room, and after a few months decided it's just not worth it - sure, "tested" speed is always very high. But when you need to stream 1080p@60fps with minimal latency, it's suddenly not so good. The latency tends to go up and down randomly, frames get dropped, it's just a bad experience. I'm sure it's absolutely fine for browsing internet/watching netflix, but local streaming is impossible - I just have a 30m long ethernet cable running down the stairs nowadays, the connection is always perfect that way.


I've been using it on some cheap ethernet-over-power adapters (Devolo, not "HomePlug" brand) for streaming MythTV recordings of HD UK TV for several years and it's been completely fine.

UK Freeview HD is 1080i though, but it's in a very bandwidth-inefficient container as it's just the transport stream which is sent over the network. I've also played some 1080p content over it with no problem, but most of the content I use is 1080i.

No idea how old my wiring is (house is from 1950), and this is across the distribution board / fuse box too, as it's between upstairs and downstairs in my house. So my experience is completely different to yours and much more positive :)


Back in the day X10 (very simple protocol, on/off/dim, no security) actually worked very well, with only a small delay. It's really horrible that 15+ years in the future it's all still so awful.

It's really, really hard to beat the user-interface (or security!) of a traditional light switch or dimmer. I'd like to have control without getting up, automate some things, or change the colors, but that all comes at a huge cost.


This is possible, but requires different wiring to light switches, to provide power there (which isn't common) and for manufacturers of replacement switches, bulbs etc to care about security.

The former isn't something which is happening yet anywhere that I know of (in the UK at least, even in new-build houses), and the latter needs pressure from consumers which isn't happening for anything in the internet-of-things space yet :/

(edit: don't try to use markdown in HN comments, however automatic it has become for you :)


I think the wiring issue is mainly a UK thing. The standard way of wiring light switches in the UK is live and neutral go to the ceiling rose, and then another two wires goes to the switch which joins the live when on. This reduces the amount of wire needed, which stems back to after WWII when copper was in short supply.

I've just bought an apartment in mainland Europe and the live and neutral go to the switch, and from there two wires go to the rose.


Italy also uses live and neutral to the ceiling, with the switch joining the live.


This is also the standard way in the USA. Its called a switch leg.


I've only seen that in older buildings in the US.

In new buildings (~1970+) I've always seen what I consider the standard: live hot and neutral to the switch. Hot is switched to the fixture, and neutrals from both sides are tied together in the box.


Zwave switches can be build into wall boxes, so you still have the same ui as regular switches, it doesn't need network connectivity, so you get remote control as a strict superset of the regular operation mode.


I use Lightwaverf in the UK, replacing the switches with their dimmers. They do have limitations (can't query the state and mostly doesn't work with led bulbs) but the form factor is good.


WiFi chips are a fair bit cheaper, and don't need to integrate with the mains voltage side.


Oh "encrypted", and of course it uses AES ECB mode

Probably enough to tick a box though


That is the least of the problems with it. It's very, very odd. On top of the craziness Matthew notes in his article, the code actually appears to use ROT13. Twice. I have no idea why.


I'm curious if you could use "cycles since power was applied" as a shared secret for pairing lamps to a wall switch.


I'm interested in making a door movement sensor with a remote alarm to wake me up if my sleepwalking daughter goes roaming.

As a software person who is just getting into electronics (played with a particle photon, just bought the Make: Electronics book & component kit to learn), what are the options when you want to have two pieces of hardware communicate inside a house?

- Bluetooth - limited range?

- Wifi - requires you to join each piece to the network, seems a hassle/expensive for simple electronics.

- Xbee - expensive!

- RF transmitter/receiver - seems cheap, but maybe distance is limited and there may be a lot of noise?

Anything else?


Look up the ESP8266. It's a very cheap piece of hardware that you can program using the Arduino IDE. It can connect to your local WiFi easily and send a push notification to your phone.

So you can build something like this using a simple PIR sensor + ESP8266.


Just made an account to say this and you beat me to it.

I built a garage door opening sensor using an ESP8266 (connected to my home wifi) and a magnetic contact switch. I'm also using TelAPI to send me SMS messages every time the garage door is opened.

It is very simple to do, and kind of cheap.


Could you please share any existing sources (schema, firmware)? Thanks in advance.


Thanks, sounds similar to the particle photon + pir sensor I used for my version 1. It works, but i'm wondering if the phone part is overkill if I want to make this into a real product. Requires programming, an app on the app store, etc. If i have a second piece of hardware to receive and make noise, maybe that would be easier.


You didn't mention wires. And I think it's worth considering. Most probably your sensor is going to be connected to power plug (if it goes detached). So why not to situate mini-server (RPi-alike) nearby, with a sensor connected by wire?


Not sure I follow. The door sensor is going to be hanging on my daughter's door, and the alarm would be in my room, probably 40 ft away.


Wherever you place the sensor, it most probably needs power supply. Batteries die, so I'd go with plugging into power socket. Since we use a nearby (to daughter's door) power socket, we could insert _right_there_ a mini-PC to control the sensor (because sensor just senses, and you need some "digital brain" to do something with results of sensing). Then mini-PC could notify you in a lot of possible ways.


What a coincidence, I just finished making my wifi-controlled RGB LED strip:

https://www.youtube.com/watch?v=h-SKXioq_Yg

I'm currently writing this up, but I'm loving the fact that I can integrate it with games, and I want to add some more. Next goal is for my living room's lighting to pulse orange or blue depending on which team scores in Rocket League. If anyone knows how I can hook into the game to get various pieces of info, please let me know.


Here is someone else who reverse engineered a slightly more complicated WiFi based protocol: https://github.com/beville/flux_led.

It's pretty well done, though he also has these magic numbers around that he couldn't quite figure out what they were there for. I used this and hacked an amazon button to control my home lighting and it works great.

All these seems like more argument to standardized IoT.


i've been tinkering with the misfit bolt which is a bluetooth bulb, and some fella (@fayep) posted that on my GH repo last week: http://www.yeelight.com/download/yeelight_blue_message_inter... - this seems to be common to several implementation of bluetooth bulbs as the bolt works with these specs. couple implementations for these: https://github.com/fayep/bolt, https://github.com/sandeepmistry/node-yeelight-blue, https://github.com/flochtililoch/misfit-bolt (last one is mine, largely inspired by the two above)


I love my Wifi lifx bulbs. Amazing output, low latency, and the standby usage is 0.7w when off. My biggest complaint is there is no physical switch to turn them on and off. Using my phone is slower than a switch, and if I switch them off they won't be able to come back on with my phone or IFTTT schedule. 0.7w seems low to me for standby.


According to this [1], an iPhone 4 only uses 0.024W on networked standby. So 0.7W per bulb is not really low.

Even worse, it's above the EU limit which mandates <0.5W (since 2013) [2].

[1] https://www.iea.org/media/workshops/2012/network/3ViegandSes...

[2] https://en.wikipedia.org/wiki/EC_Regulation_No._1275/2008


"0.7w seems low to me for standby."

Affordable for many, yes, but IMO, for a LED lightbulb, that's horrendous. Let's do the math: 0.7W full time is 16,8 Wh a day.

In use, a 1000 lumen bright LED bulb uses 14W. If we assume you have it switched on 12 hours a day, that 0.7W at 24 hours a day adds 10% to its power usage.

More realistically, your LED bulb will take 10W, and be on for four hours a day, for 40Wh. That means that 16,8Wh adds almost 50% to your power usage.

And I think the typical bulb will use even less power and an even lower duty cycle. 8W, 2 hours a day, and you have a radio broadcaster that occasionally switches on a light :-)

By the way, 0.7W also is also against the spirit of an EU directive on power consumption (http://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:320...), which by now (it's over four years after this came into force) states:

The power consumption of equipment in any condition providing only a reactivation function, or providing only a reactivation function and a mere indication of enabled reactivation function, shall not exceed 0,50 W.


What if wall switches were replaced by very simple phones...or even watches. It would effectively be running the one app all of the time, defaulted to the lights in the room. There could even be some sort of hard-wire bus between this switch and the bulbs, to communicate through RF interference.


With the drastic price fall of Android tablets (mostly the Amazon Fire) - there have been a few enterprising people that have hacked them into basically being "smart switches" for their homes.

The results are still a little too janky for my taste but the costs are getting there.


Or just use something like the Philips Hue Tap [1], which sends an RF signal (ZigBee) solely using the energy from your button press (no batteries).

[1] http://www2.meethue.com/en-us/productdetail/philips-hue-tap-...


I wish this would work with LIFX. I refuse to go to Hue but man I want a physical switch.


Since touch screen tend to break and are expensive to replace, I suggest that we instead use a simple button interface. I'm sure you could find some kind of USB button that you can hook up to the phone on your wall.


Zigbee hardware switch: $36 https://www.amazon.com/GE12722-Z-Wave-Wireless-Lighting-Cont... 7 inch touchscreen android tablet: $39 https://www.amazon.com/gp/product/B01CGSWYFM/

The zigbee switch also has a relay in it, which is the majority of the cost, but if you're controlling a bulb with a built-in receiver, you're not using that relay. There really aren't much cheaper zigbee, zwave, wifi or bluetooth wall switches.


This is what I do. I use my old android phones, on a dedicated network.

I'm also building a RPI kiosk to manage them


The 0x56 that is shown as the first packet data byte when setting new color/intensity is ASCII for 'V'. Perhaps for "Value"?

Always fun to theorize about hidden names, considering that somewhere somebody probably reasoned themselves into picking 0x56 over the other values.


I found the use of a simple binary protocol rather unexpected but pleasant; it is reminiscent of I2C. Given what the software industry is like today, I was actually expecting some ridiculous combination of HTTP, JSON, SOAP, XML, or a similar level of bloat... for once, it's good to see some down-to-earth sanity here.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: