Comments (11)
Test to forward the Zigbee coordinator from a Pi Zero W to the NUC using usbip, see thread.
from homeassistant-config.
This is just a copy of the contents of the aforementioned thread in case it gets deleted.
All credits to luma
On the Pi Zero W (USB host) running latest Raspberry Pi OS
Get the USB ID of the coordinator device
lsusb
>> Bus 001 Device 002: ID 0451:16a8 Texas Instruments, Inc.
0451:16a8 is the ID we're looking for.
Set up usbip
Install usbip, load the kernel module and set it up to load on boot
sudo -s
apt-get install usbip
modprobe usbip_host
echo 'usbip_host' >> /etc/modules
Add a service definition to expose the device in /lib/systemd/system/usbipd.service
[Unit]
Description=usbip host daemon
After=network.target
[Service]
Type=forking
ExecStart=/usr/sbin/usbipd -D
ExecStartPost=/bin/sh -c "/usr/sbin/usbip bind --$(/usr/sbin/usbip list -p -l | grep '#usbid=0451:16a8#' | cut '-d#' -f1)"
ExecStop=/bin/sh -c "/usr/sbin/usbip unbind --$(/usr/sbin/usbip list -p -l | grep '#usbid=0451:16a8#' | cut '-d#' -f1`); killall usbipd"
[Install]
WantedBy=multi-user.target
Make the service known, load and start it
sudo systemctl --system daemon-reload
sudo systemctl enable usbipd.service
sudo systemctl start usbipd.service
On the client
Set up usbip
On Ubuntu usbip is part of the generic tools package, install it and load the virtual USB host controller module
sudo -s
apt-get install linux-tools-generic -y
modprobe vhci-hcd
echo 'vhci-hcd' >> /etc/modules
Add a service definition to make the remote device available in /lib/systemd/system/usbip.service
[Unit]
Description=usbip client
After=network.target
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/sh -c "/usr/lib/linux-tools/$(uname -r)/usbip attach -r 10.10.10.10 -b $(/usr/lib/linux-tools/$(uname -r)/usbip list -r 10.10.10.10 | grep '0451:16a8' | cut -d: -f1)"
ExecStop=/bin/sh -c "/usr/lib/linux-tools/$(uname -r)/usbip detach --port=$(/usr/lib/linux-tools/$(uname -r)/usbip port | grep '<Port in Use>' | sed -E 's/^Port ([0-9][0-9]).*/\\1/')"
[Install]
WantedBy=multi-user.target
Replace 10.10.10.10 by your IP address and 0451:16a8 by the ID of your USB device
Make the service known, load and start it
sudo systemctl --system daemon-reload
sudo systemctl enable usbipd.service
sudo systemctl start usbipd.service
from homeassistant-config.
Switch done. Everything working as expected except for Philips outdoor motion sensor SML002. See zigpy/zigpy-cc#57
from homeassistant-config.
ZHA light groups aren't working as well. Using HA light groups as a workaround.
from homeassistant-config.
Group control fixed in zigpy/zigpy-cc#58 and waiting for release
from homeassistant-config.
@lociii Seen you posted in zigpy/zigpy-cc#58 and got other alternative serial-over-network tips if don't want to move your NUC:
The first tip is to use ESP8266 with Jeelabs ESP-LINK firmware instead of a Pi Zero W. Function is same if can connect via serial:
The second cutting-edge tip is to buy the new Sonoff ZBBridge and run Tasmota with its serial-bridge, it is an all-in-one device:
- https://www.digiblur.com/2020/07/how-to-use-sonoff-zigbee-bridge-with.html
2b. https://www.youtube.com/watch?v=dC1AEyFhmnc
PS: Regarding your Bitron AV2010/32 wall thermostat, open new issue on -> https://github.com/zigpy/zha-device-handlers/issues
PPS: Somewhat related issue posted here but that is not quite on-topic zigpy/zha-device-handlers#357
from homeassistant-config.
Oh wow. Thanks @Hedda
I got USBIP running on a Pi 3 since a while and it's working like a charm. Will check out your other proposals nevertheless.
However I'd prefer not to buy another zigbee coordinator as the CC26X2R1 I'm currently using was quite expensive :-)
For the group support it's just a matter of time until @sanyatuning changes are published.
For the Bitron AV2010/32 I just didn't update the list. They're working flawlessly.
So the last thing that's not working yet, is the SML002 Philips outdoor motion sensor from zigpy/zigpy-cc#57
Will all work out sooner or later. People are spending their spare time to make all of this work, so I will have to be calmly waiting :-)
from homeassistant-config.
Cool! If you have the skill then you too can help with quirks for devices, checkout -> https://github.com/zigpy/zha-device-handlers
from homeassistant-config.
Based on the discussion in zigpy/zigpy-cc#57 it seems like the Philips SML002 needs some changes either to zigpy-cc or zigpy core. At least with my amateur knowledge of how zigbee communicates, it cannot be fixed in a quirk.
Even if I would love to help, this goes way beyond what I'm currently capable of :)
from homeassistant-config.
Group support merged into HA core master home-assistant/core#39318
from homeassistant-config.
Switched now from zigpy-cc to zigpy-znp and everything is working properly!
from homeassistant-config.
Related Issues (20)
- Stehlampe zusätzlich an beim Heimkommen
- Allow vacuum to clean every day when absent
- Office cover behavior
- Add guest and freeze modes
- Build broken HOT 2
- Announcements HOT 1
- apartment control broken HOT 1
- Turn phone charger off if no device charing
- Audio warning to keep apartment cool HOT 1
- Turn printer off when in standby for 15 minutes
- Catdoor videos are broken
- Google Home voice notifications don't work HOT 1
- Consider Shelly as a digitalstrom replacement HOT 11
- Add Xiaomi button for kitchen cabinet light
- Bedlight should turn on less bright when it's after 10pm and dark outside HOT 1
- Remove battery from MiFlora plant sensors
- Clean up logbook by removing unnecessary entities HOT 1
- Bedlight should turn off shortly after wakeup when it's light outside
- ESPHome device names should not contain underscores
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from homeassistant-config.