kalliste / hue-thief

Factory reset Philips Hue bulbs using an EZSP-based Zigbee USB stick. After a reset, bulbs can easily join any type of compatible bridge.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hue Thief

Factory reset Philips Hue bulbs using an EZSP-based Zigbee USB stick. After a reset, bulbs can easily join any type of compatible bridge.

EZSP-based Zigbee USB sticks

These are devices based on a Silicon Labs EM351 or EM357 chip that communicates with the host PC using the EZSP protocol over a virtual COM port. Which protocol is used depends on which firmware is flashed.

Installation

Make sure you have python v3 and pip. (sudo apt-get install python-pip3)

git clone https://github.com/vanviegen/hue-thief
cd hue-thief
pip3 install --user -r requirements.txt

Usage

Bring the bulb(s) you want to factory reset close to your EZSP device and make sure they're powered. Shutdown any other applications (home assistant, perhaps?) that may be using the EZSP device.

python3 hue-thief /dev/ttyUSB0

/dev/ttyUSB0 should be your EZSP device. You should have full permissions on this device file.

Hue Thief will now scan all Zigbee channels for ZLL-compatible bulbs that are associated with any Zigbee network. When a bulb is found, it will blink a couple of times, and the application will ask if you want to factory reset this bulb. (If you didn't see any blinking, you may be doing your neighbours a favour by choosing 'N' here. :-))

That's it. Your now factory clean bulbs should be discoverable through whatever means your bridge/software offers.

Problems

I will not be held responsible if you brick any hardware or do other awful things with this. On the bright side: I really don't see how that could ever happen, but still...

This script is kind of a hack, as it tries to implement about a zillion layers of Zigbee protocol in just a few lines of code. :-) So things will only work if everything goes exactly according to plan.

If no devices are found, there is no blinking or the factory reset doesn't work, the generated log.pcap file should be the first place to look for a clue. (Wireshark has decent Zigbee analyzers, though the ZLL commissioning part is still missing.)

About

Factory reset Philips Hue bulbs using an EZSP-based Zigbee USB stick. After a reset, bulbs can easily join any type of compatible bridge.


Languages

Language:Python 100.0%