Rocka84 / pushing-hue

10 stars 2 forks source link

Pushing Hue

Making the Hue hub push status updates to home assistant.
Because polling is just not good enough.

Features

Caveat

You need a serial-to-usb adapter and unscrew your hub, probably voiding your warranty. I'll take no responsibility whatsoever to what you do to your devices.

How I did it

Short version:

The rest of this document are just some notes for now, but maybe I'll clean this up someday.

Root

Exploring and dumping the system

Extracting firmware images

This part is not necessary for what I came up in the end, but my first plan was different. Nevertheless extracting and analyzing firmware updates before applying them, could come in handy in the future.

patching and exploiting swupdate

I used the firmware updating script of the hub to extract the images. For that I modified it to run inside a dump of the fs. I decided not to publish any patches that could potentialy include copyrighted code, but I will briefly describe what changes I made. So once you gained access to the hub yourself, you may recreate my steps.

well...

So far, so good. Now lets look at the actual hue stuff besides the os.

UPDATE

@lyuzashi found a way to re-install opkg, install sudo and a add non-root user! See this issue for details.
Thanks for sharing!

looking for triggers

UPDATE

The hub internally uses a mqtt broker which can be exposed externally, see https://github.com/Rocka84/pushing-hue/issues/5 Thanks to @Otamay & @sh00bx for sharing!

logread it is

hass api

putting it all together

Todo