Last active
April 13, 2018 20:18
-
-
Save ddkaiser/7ca1763f862190218a8fb006a6d325b5 to your computer and use it in GitHub Desktop.
Just some research into an open-source home-automation solution using the Linear HUSBZB-1 device on Linux
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GOAL: an open-source stack (OS, Drivers, Applications, Integrations) for home automation. | |
GOAL: self-hosted, and not allow private data to be exploited by Google, Amazon, Microsoft, or other (vendor-provided) | |
cloud-computing systems that offer services for integration and automation, but leach private data into corporate servers | |
GOAL: host on a Raspberry Pi, or similar Linux server host | |
GOAL: use radio device(s) that speaks directly to the Raspberry Pi (Linux host) without using a vendor-provided bridge. | |
This means I would prefer a USB device for Zigbee or Z-Wave, without using any device similar to the Samsung "SmartThings" | |
Hub, and thus can avoid it's requirements for subscription into Samsung cloud, with the benefit? of avoiding Samsung's | |
non-standard "SmartThings" Framework. | |
Hardware. | |
I have purchased a USB dongle which supports both major wireless protocols, Zigbee and Z-Wave+. This is the Linear HUSBZB-1. | |
It is known to work on Linux, Windows and Mac operating systems. | |
- Amazon Link: https://www.amazon.com/gp/product/B01GJ826F8/ | |
- Newegg Link: https://www.newegg.com/Product/Product.aspx?Item=35A-001P-00001 | |
(The "Linear" HUSBZB-1 is also branded by Nortek, Go-Control, and other home-automation technology brands.) | |
The HUSBZB-1 Uses the 'Ember' EM3581 chipset, which allows applications to communicate by using the EZSP protocol over 2 | |
serial UART's. (1 port for Z-Wave+, 1 port for Zigbee) | |
On Linux, by default, the ports look as follows: | |
- /dev/ttyUSB0 is zwave, | |
- /dev/ttyUSB1 is Zigbee-Home-Automation (ZHA) | |
Device Documentation: | |
- http://www.nortekcontrol.com/pdf/manuals/husbzb-1-instructions.pdf | |
- http://www.gocontrol.com/manuals/HUSBZB-1-Operation.pdf | |
From my Linux host. This is the dmesg output related to when I plugged in the HUSBZB-1: | |
[ 14.512558] usbcore: registered new interface driver usbserial | |
[ 14.512700] usbcore: registered new interface driver usbserial_generic | |
[ 14.763068] usbserial: USB Serial support registered for generic | |
[ 14.776134] usbcore: registered new interface driver cp210x | |
[ 14.776318] usbserial: USB Serial support registered for cp210x | |
[ 14.776539] cp210x 1-1.2:1.0: cp210x converter detected | |
[ 14.813681] usb 1-1.2: cp210x converter now attached to ttyUSB0 | |
[ 14.813985] cp210x 1-1.2:1.1: cp210x converter detected | |
[ 14.852266] usb 1-1.2: cp210x converter now attached to ttyUSB1 | |
This is the "lsusb" output for the device: | |
dkaiser@box:~$ lsusb -v -d 10c4: | |
Bus 001 Device 004: ID 10c4:8a2a Cygnal Integrated Products, Inc. | |
Device Descriptor: | |
bLength 18 | |
bDescriptorType 1 | |
bcdUSB 2.00 | |
bDeviceClass 0 (Defined at Interface level) | |
bDeviceSubClass 0 | |
bDeviceProtocol 0 | |
bMaxPacketSize0 64 | |
idVendor 0x10c4 Cygnal Integrated Products, Inc. | |
idProduct 0x8a2a | |
bcdDevice 1.00 | |
iManufacturer 1 Silicon Labs | |
iProduct 2 HubZ Smart Home Controller | |
iSerial 5 C0F00486 | |
bNumConfigurations 1 | |
Configuration Descriptor: | |
bLength 9 | |
bDescriptorType 2 | |
wTotalLength 55 | |
bNumInterfaces 2 | |
bConfigurationValue 1 | |
iConfiguration 0 | |
bmAttributes 0x80 | |
(Bus Powered) | |
MaxPower 100mA | |
Interface Descriptor: | |
bLength 9 | |
bDescriptorType 4 | |
bInterfaceNumber 0 | |
bAlternateSetting 0 | |
bNumEndpoints 2 | |
bInterfaceClass 255 Vendor Specific Class | |
bInterfaceSubClass 0 | |
bInterfaceProtocol 0 | |
iInterface 3 HubZ Z-Wave Com Port | |
Endpoint Descriptor: | |
bLength 7 | |
bDescriptorType 5 | |
bEndpointAddress 0x81 EP 1 IN | |
bmAttributes 2 | |
Transfer Type Bulk | |
Synch Type None | |
Usage Type Data | |
wMaxPacketSize 0x0040 1x 64 bytes | |
bInterval 0 | |
Endpoint Descriptor: | |
bLength 7 | |
bDescriptorType 5 | |
bEndpointAddress 0x01 EP 1 OUT | |
bmAttributes 2 | |
Transfer Type Bulk | |
Synch Type None | |
Usage Type Data | |
wMaxPacketSize 0x0040 1x 64 bytes | |
bInterval 0 | |
Interface Descriptor: | |
bLength 9 | |
bDescriptorType 4 | |
bInterfaceNumber 1 | |
bAlternateSetting 0 | |
bNumEndpoints 2 | |
bInterfaceClass 255 Vendor Specific Class | |
bInterfaceSubClass 0 | |
bInterfaceProtocol 0 | |
iInterface 4 HubZ ZigBee Com Port | |
Endpoint Descriptor: | |
bLength 7 | |
bDescriptorType 5 | |
bEndpointAddress 0x82 EP 2 IN | |
bmAttributes 2 | |
Transfer Type Bulk | |
Synch Type None | |
Usage Type Data | |
wMaxPacketSize 0x0020 1x 32 bytes | |
bInterval 0 | |
Endpoint Descriptor: | |
bLength 7 | |
bDescriptorType 5 | |
bEndpointAddress 0x02 EP 2 OUT | |
bmAttributes 2 | |
Transfer Type Bulk | |
Synch Type None | |
Usage Type Data | |
wMaxPacketSize 0x0020 1x 32 bytes | |
bInterval 0 | |
Device Status: 0x0000 | |
(Bus Powered) | |
dkaiser@box:~$ | |
Running Miniterm identifies the devices: | |
dkaiser@box:~$ miniterm.py | |
--- Available ports: | |
--- 1: /dev/ttyUSB0 HubZ Smart Home Controller | |
--- 2: /dev/ttyUSB1 HubZ Smart Home Controller | |
--- Enter port index or full name: | |
Software. | |
It appears there is an Eclipse framework for Smart Home. https://www.eclipse.org/smarthome/ This is good, as the | |
Eclipse Foundation generally has very good goals, and good management of software product development, and will not | |
allow vendors to introduce features or code which prefers or favors the use of private cloud services. It remains | |
to be seen if device vendors will support an open standard Smart Home framework instead of each trying to build their own. | |
There are two differing (competing?) open-source software stacks which so-far look to be reaching enough critical mass | |
(ongoing development activity, and plenty of innovation for integrating new capabilities): | |
- OpenHAB: http://www.openhab.org/ | |
* Java codebase. Supports the Eclipse Foundation Smart Home Framework. | |
- Home Assistant: http://hass.io/ (redirect to: http://home-assistant.io/) | |
* Python codebase. | |
OpenHAB, a Java project, has support for this device. https://github.com/openhab/org.openhab.binding.zigbee | |
In the openhab repository, search README for 'coordinator_ember'. | |
The OpenHAB Zigbee binding code contains an EZSP implementation, which comes from a maven package sourced here: | |
https://github.com/zsmartsystems/com.zsmartsystems.zigbee | |
The README on com.zsmartsystems.zigbee mentions some issues around baud rates. | |
If you use the Java approach, you'll need to make sure the com.zmartsystems.zigbee library is newer than this | |
pull request which adds the HUSBZB-1 support: | |
https://github.com/zsmartsystems/com.zsmartsystems.zigbee/pull/39 (June 23, 2017) | |
On the Home-Assistion.IO front, it is a Python project. | |
The zwave binding is here: https://home-assistant.io/hassio/zwave/ | |
Ths HASS.io zwave binding uses Bellows, which is a GPL Python codebase for EZSP: | |
https://github.com/rcloran/bellows | |
(this Github page includes links to the EZSP protocol docs) | |
Someone has found a way to use this HUSBZB-1 and perform a factory reset on Philips HUE light bulbs: | |
https://github.com/vanviegen/hue-thief | |
- I guess this unlocks them from only communiating with a Philips bridge device, so that the Philips bulbs can then be | |
joined to any network? (Needs to be verified what this actually does.) | |
- The hue-thief is a small Python project and a simple example code-base for how to use Bellows for EZSP/Zigbee | |
communications. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment