husbzb-firmware icon indicating copy to clipboard operation
husbzb-firmware copied to clipboard

Unable to run on Mac

Open rodhall opened this issue 4 years ago • 11 comments

I have not been able to get this to work on a Mac where I run HA and have the HubZ installed. The issue is finding the correct /dev/XXXX path I think but not sure?

rodhall avatar Dec 28 '20 19:12 rodhall

I unpluged the dongle and installed the driver (macOS Bi Sur) from http://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers. Now, I have 2 new tty: tty.GoControl_zigbee and tty.GoControl_zwave , but when I execute the next command:
docker run --rm --device=/dev/tty.GoControl_zigbee:/dev/tty.GoControl_zigbee -it walthowd/husbzb-firmware

I get this error:
docker: Error response from daemon: error gathering device information while adding custom device "/dev/tty.GoControl_zigbee": no such file or directory

jjmuriel avatar Feb 10 '21 19:02 jjmuriel

I don't believe Mac for docker supports device mapping for serial ports. You may have some luck if you run ncp.py directly on hardware (you need Python 2.7ish, which I believe is still avaialble on Mac).

walthowd avatar Feb 10 '21 20:02 walthowd

Thank you @walthowd , but when I execute % python2.7 ncp.py scan with the HUSBSZ-1 dongle plugged, I get this error:
Traceback (most recent call last): File "ncp.py", line 12, in <module> from xmodem import XMODEM ImportError: No module named xmodem

Using sudo I get the same.

jjmuriel avatar Feb 10 '21 20:02 jjmuriel

Yes, you'll need to install xmodem and pyserial modules for Python 2 as a prerequisite.

walthowd avatar Feb 10 '21 20:02 walthowd

After install xmodem and pyserial (pip2.7) I got this:

Traceback (most recent call last): File "ncp.py", line 16, in <module> import serial.tools.list_ports File "/usr/local/lib/python2.7/site-packages/pyserial-3.4-py2.7.egg/serial/tools/list_ports.py", line 29, in <module> from serial.tools.list_ports_posix import comports File "/usr/local/lib/python2.7/site-packages/pyserial-3.4-py2.7.egg/serial/tools/list_ports_posix.py", line 31, in <module> from serial.tools.list_ports_osx import comports File "/usr/local/lib/python2.7/site-packages/pyserial-3.4-py2.7.egg/serial/tools/list_ports_osx.py", line 32, in <module> kIOMasterPortDefault = ctypes.c_void_p.in_dll(iokit, "kIOMasterPortDefault") ValueError: dlsym(RTLD_DEFAULT, kIOMasterPortDefault): symbol not found

jjmuriel avatar Feb 10 '21 20:02 jjmuriel

Bummer, looks like a pyserial bug:

https://github.com/pyserial/pyserial/issues/509

Might just be easiest to go the Virtual Box route and run Ubuntu iso temporarily.

walthowd avatar Feb 10 '21 20:02 walthowd

I installed "comports" also, but i get the same. Yes, I'll try with VirtualBox/Linux. Thank you @walthowd.

jjmuriel avatar Feb 10 '21 20:02 jjmuriel

With Kali on Virtual Box everything was OK: After: Connecting to.. /dev/ttyUSB1 57600 True False {"ports": [{"stackVersion": "5.4.1-194", "deviceType": "zigbee", "pid": "8A2A", "port": "/dev/ttyUSB1", "vid": "10C4"}]}

Before: Connecting to.. /dev/ttyUSB1 57600 True False {"ports": [{"stackVersion": "6.6.5-204", "deviceType": "zigbee", "pid": "8A2A", "port": "/dev/ttyUSB1", "vid": "10C4"}]}

Thank you @walthowd , nice job!

jjmuriel avatar Feb 10 '21 22:02 jjmuriel

Shall being fixed of Puddly in https://github.com/walthowd/husbzb-firmware/pull/26 with native OS on Mac.

MattWestb avatar May 10 '21 13:05 MattWestb

For anyone reading this and trying to run on MacOS, you have to first install the USB to UART bridge drivers from Sililabs: https://www.silabs.com/developers/usb-to-uart-bridge-vcp-drivers?tab=downloads

Once you've install this, it should map both the zwave and zigbee radios to a dev/tty port. Mine looked like this:

/dev/tty.GoControl_zigbee?
/dev/tty.GoControl_zwave

Hope this helps someone!

aicarmic avatar May 09 '23 00:05 aicarmic

If it helps anyone else, my zigbee delivice was listed as something really weird like "/dev/cu.GoControl_zigbee\r" when I ran ./ncp.py. Had to use ls -l /dev to find out the actual device name was /dev/cu.GoControl_zigbee$'\r'.

Pasted that in and everything worked pronto!

TrumpetH4X avatar May 10 '23 04:05 TrumpetH4X