#macOS - Parallels - Ubuntu - Docker setup issues
1 messages · Page 1 of 1 (latest)
@torn hazel
Let's take a step back and see if things work in Ubuntu first. It should have Python 3.8+ pre-installed. Can you open a new shell and run:
virtualenv -p 3 venv
source venv/bin/activate
pip install git+https://github.com/zigpy/zigpy-cli
zigpy -vvv radio --baudrate 115200 ezsp /dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20220816155607-if00 info
You may need to run sudo apt install python-virtualenv or python-venv first, I forget the package name
Shut down both the HA and deCONZ containers first, just to make sure they won't interfere
both shut down.... installing python-venv
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package python-virtualenv is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'python-virtualenv' has no installation candidate
parallels@ubuntu-linux-20-04-desktop:~$ sudo apt install python-venv
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package python-venv
You may need to do sudo apt update first. If that doesn't work, try running python3 -m venv venv instead
If the pip install step fails, you may need to sudo apt install build-essential
And possibly python3-dev? I forget if Ubuntu pre-installs this stuff...
@torn hazel did it close?
ok, got the info, and crash and burn msg
Can you upload a screenshot of it or the actual console output?
@torn hazel Your stick doesn't work in Ubuntu either
Next step: do you have Python installed in macOS?
will in a second.
I suggest doing it the Homebrew way (https://brew.sh/) as opposed to the python.org installer
have python 3 loaded
Those same commands you ran in Ubuntu should work in macOS
Shut off Parallels and give it a try there
The Sonoff stick will show up as /dev/cu.SLAB_USBtoUART I think
/dev/cu.Bluetooth-Incoming-Port /dev/cu.usbserial-202208161556071
/dev/cu.usbmodemDE24332351 /dev/cu.wlan-debug```
Probably the 2022 one
usbserial is sonoff
usbmodem is conbee II
getting errors trying to install zigpy stuff
something about missing xcrun. let me reinstall python with brew
Oh, you need xcode's command line tools: xcode-select --install
No worries. There's a root cause to your problems, somewhere, because macOS on its own works with the Conbee and with sticks similar to the Sonoff.
homebrew still installing
still going....
Successfully installed aiohttp-3.8.3 aiosignal-1.3.1 aiosqlite-0.18.0 async-timeout-4.0.2 attrs-22.2.0 bellows-0.34.5 cffi-1.15.1 charset-normalizer-2.1.1 click-8.1.3 click-log-0.4.0 coloredlogs-15.0.1 crccheck-1.3.0 cryptography-38.0.4 frozenlist-1.3.3 humanfriendly-10.0 idna-3.4 jsonschema-4.17.3 multidict-6.0.4 pure-pcapy3-1.0.1 pycparser-2.21 pyrsistent-0.19.3 pyserial-3.5 pyserial-asyncio-0.6 scapy-2.5.0 voluptuous-0.13.1 yarl-1.8.2 zigpy-0.52.3 zigpy-cli-0.0.1 zigpy-deconz-0.19.2 zigpy-znp-0.9.2
where did it install them?
Within venv
When you activate the venv, you can use packages contained within it. If you don't need the venv anymore, you can delete it and they're all gone
boom! no errors in maco os cli
So the info command ran fine?
Remove the --baudrate 115200 option and change the radio type from ezsp to deconz. The same info command should run with the Conbee
And try the same within the Ubuntu container
for conbee: https://hastebin.com/akiqiniwoj.apache
macos sees both successfully. starting parallels
The only difference between the Conbee and the Sonoff stick is USB-serial chip used
sonoff seen in parallels
I thought it didn't work within Ubuntu?
Then it should work in the HA Docker container
that[s my next step
Select the serial port for your Zigbee radio
Serial Device Path
/dev/ttyUSB1 - n/a, s/n: n/a
/dev/ttyUSB0 - n/a, s/n: n/a
/dev/ttyACM1 - SONOFF Zigbee 3.0 USB Dongle Plus V2, s/n: 20220816155607 - ITEAD
/dev/ttyACM0 - ConBee II, s/n: DE2433235 - dresden elektronik ingenieurtechnik GmbH
Enter Manuall```
trying ttyACM1
Unknown error has occurred.
Alright, let's try one level deeper then 😆. No other containers running, correct?
From the Ubuntu environment, you should be able to run docker exec -it homeassistant /bin/bash to get into the HA Docker container
From there, pip install git+https://github.com/zigpy/zigpy-cli and try running the same commands to talk to the two radios
correct
error: command 'gcc' failed: No such file or directory
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> cffi
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.```
This is within the Docker container?
yes
Within a venv or outside of one?
within
Run deactivate to leave the venv
You can install zigpy-cli globally, it has no new dependencies
bash-5.1# zigpy -vvv radio --baudrate 115200 ezsp /dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20220816155607-if00 info
2022-12-29 11:18:59.977 ubuntu-linux-20-04-desktop asyncio DEBUG Using selector: EpollSelector
2022-12-29 11:19:00.022 ubuntu-linux-20-04-desktop asyncio DEBUG Using selector: EpollSelector
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/serial/serialposix.py", line 322, in open
self.fd = os.open(self.portstr, os.O_RDWR | os.O_NOCTTY | os.O_NONBLOCK)
FileNotFoundError: [Errno 2] No such file or directory: '/dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20220816155607-if00'
You'll have to use the same path as you used with ZHA: /dev/ttyUSB* or /dev/ttyAMC*
bash-5.1# zigpy -vvv radio --baudrate 115200 ezsp /dev/ttyACM1 info
2022-12-29 11:20:28.822 ubuntu-linux-20-04-desktop asyncio DEBUG Using selector: EpollSelector
2022-12-29 11:20:28.848 ubuntu-linux-20-04-desktop asyncio DEBUG Using selector: EpollSelector
2022-12-29 11:20:28.849 ubuntu-linux-20-04-desktop bellows.ezsp DEBUG Resetting EZSP
2022-12-29 11:20:28.849 ubuntu-linux-20-04-desktop bellows.uart DEBUG Resetting ASH
2022-12-29 11:20:28.849 ubuntu-linux-20-04-desktop bellows.uart DEBUG Sending: b'1ac038bc7e'
Traceback (most recent call last):
File "/usr/local/lib/python3.10/asyncio/tasks.py", line 456, in wait_for
2022-12-29 11:20:33.852 ubuntu-linux-20-04-desktop bellows.uart DEBUG Connection lost: None
2022-12-29 11:20:33.852 ubuntu-linux-20-04-desktop bellows.uart DEBUG Closed serial connection```
same results
What about the Conbee?
works for conbee on usb1
2022-12-29 11:22:48.208 ubuntu-linux-20-04-desktop zigpy_deconz.api DEBUG Serial '/dev/ttyUSB1' connection lost unexpectedly: None
??
That's normal
ok
Ok, last thing to try: sudo apt-get purge modemmanager within Ubuntu and restart everything
not installed so not removed
Well, I've got nothing 🤷♂️. It works in Ubuntu but doesn't work in the Docker container.
the conbee did, with zigpy
Indeed
But there's no difference in the way they're passed through
Let me see if I can replicate this
HA Logs:
2022-12-29 11:33:16.969 DEBUG (MainThread) [zigpy_deconz.api] Serial '/dev/ttyACM0' connection lost unexpectedly: None```
That line alone doesn't really mean anything
No response from the Conbee
If the Sonoff serial port doesn't work, it's either a Docker config issue, or a Parallels Ubuntu + Docker issue
Z2M does nothing different when it comes to communicating with the device
ok
1) ZHA was working with Conbee II
2) Zha stopped working around start of december (I thought stick had gone bad)
3) bought Sonoff to replace conbee II
4) could only get conbee II to work with deconz, after sonoff failed to work with ZHA and Z2M
ordered Sonoff Dec 2.
because conbee crapped out dec 1 (or so I thought)
How did you install Docker into this Ubuntu system?
good question.
I don't recall, but everything is imported to the HA contaoiner, so I could blow it up and reinstaall
hey. z2M is starting up with it.
The Sonoff stick?
conbee
It seemed to work once within HA's container so 🤷♂️
A stick similar to the Sonoff one works just fine for me on macOS + Parallels + Ubuntu + Docker
So I suspect it's something with your specific setup
I followed the Docker installation instructions and set up the HA container using the example config: https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository