Closed mkanet closed 4 years ago
There was a similar report in the past, but not as many you have. Does it work at all? Just trying to see if all frames are with bad crc or only some of them. Other than that, but sure what could be done. The frame has wrong crc then it either was corrupted during transmission (unlikely, it's USB serial) or it was sent incorrectly by the stick. What radio are you using and can you enable debug logging and provide logs of ZHA starting? Would like to see the stack version. Usually around EZSP reset
My Zigbee devices seem to be working correctly. Even during generating these errors.
Radio Type: ezsp: Silicon Labs EmberZNet protocol [HUSBZB-1 USB] Windows 10 64bit drivers (latest version from website)
EZSP Stack Type: 2, Stack Version: 21520
Please forgive me, but I wasn't sure which part of my log is the ZHA startup. I hope it's okay I just attached the whole log during system startup. No CRC errors were generated in the debug log. The CRC errors seem to happen a few hours after startup. If you think it would help, I could provide debug logs when the CRC errors happen as well:
If there's any other information I can provide to help narrow down the issue, please let me know.
Stack version I was looking for. and seems you are running standard version of husbzb. Are you running a hassos image in virtual box? Probably has something to do with virtualization, although must be something specific to your setup, cause I don't hear too many complains. I do run dev environment in a virtual box, but don't really see that many errors.
Yes. I'm using the hassos image in Virtualbox. This issue starting to make sense. I've had another issue where Virtualbox locks up after 2-3 days of use. I should have known that both issues were related. I was told to submit my Virtualbox log files to the Virtualbox Forum thread below next time it locks up.
https://forums.virtualbox.org/viewtopic.php?f=6&t=98938
Thank you very much for helping me. At least I know there isn't much that can be done in the HASSOS side of things.
zha documentation zha source (message by IssueLinks)
Hey there @dmulcahey, mind taking a look at this issue as its been labeled with an integration (zha
) you are listed as a codeowner for? Thanks!
(message by CodeOwnersMention)
For the record, I'm seeing the below error messages in the Virtualbox logs. I know that my ZHA radio is on serial0:
00:00:29.714657 Serial#0: Failed to change parameters to 115200,NONE,5,1 -> VERR_IO_GEN_FAILURE
00:00:29.716643 Serial#0: Failed to change parameters to 115200,SPACE,8,2 -> VERR_IO_GEN_FAILURE
00:00:29.718710 Serial#0: Failed to change parameters to 115200,NONE,5,1 -> VERR_IO_GEN_FAILURE
00:00:29.720694 Serial#0: Failed to change parameters to 115200,NONE,5,1 -> VERR_IO_GEN_FAILURE
00:00:29.722925 Serial#0: Failed to change parameters to 115200,NONE,5,1 -> VERR_IO_GEN_FAILURE
00:00:29.725657 Serial#0: Failed to change parameters to 115200,NONE,5,1 -> VERR_IO_GEN_FAILURE```
Hrm, I wonder if hassos trying to spawn a serial console on serial 0. If you are using HUSBZB-1, then zha would use 57600 baudrate by default, so setting speed to 115200 must be done by something else
I really appreciate your help. I have EventGhost installed on the Host computer that controls another USB->Serial device (USB UIRT). It's possible EventGhost maybe be interfering with VirtualBox using the HUSBZB-1.
Maybe if I define a USB filter for my HUSBZB-1 in VirtualBox, that would prevent other apps from trying to control my HUSBZB-1.
🤷 Try disabling it temporarily and see if it makes a difference.
I finally figured out what's going on. If I add all my USB devices to the VirtualBox USB filter list (except for the HUSBZB-1), I don't have any more issues. However, that causes the devices I added to the filter list to be completely disabled on VirtualBox and the HOST too.
Does anyone know how I can disable/hide the offending USB devices from VirtualBox ONLY? I'm not even sure what use VirtualBox's USB filter has if it's going to completely disconnect the devices from everything. If I wanted to do that, I'll just plug these devices completely/physically from the entire PC.
you lost me there. If you don't add a device to VirtualBox USB filter, the devices won't be claimed/passed through to Virtualbox. If you don't add HUSBZB to the filter, how does it work on virtualbox?
When I add my USB-UIRT device to VirtualBox's USB filter list, the issue completely goes away. However, doing that also completely disables/hides that device from the HOST PC. In other words, that device won't even show in Windows Device Manager while it's in VirtualBox's USB filter list. Of course, I can't leave it this way, since I completely depend on my USB-UIRT device on my HOST PC for another Windows application.
I was hoping VirtualBox's USB filter would hide/disable these devices from the Guest. Unfortunately, it hides/disables these devices from the Host instead.
I'm not sure how to force VirtualBox to only use the HUSBZB USB device without it conflicting with my other USB device(s). These USB devices don't have any conflicts at all in a pure Windows environment.
Do you have any ideas on how I might avoid this issue without buying another PC/device? Surely, there has to be some kind of solution.
What is USB -UIRT device? Just only add husbzb-1 to usb filter, so it's hidden from the host
USB-UIRT is a USB device that allows a PC to send and receive IR signals to and from IR devices.
Currently, VirtualBox is configured to forward Windows OS Serial port COM3 and COM4 --> Ubuntu VM usb_path: /dev/ttyS0 and /dev/ttyS1 (with no USB filters configured) like this:
If I add HUSBZB-1 to USB Filter (while having the above port mappings), Home Assistant says all my ZWave/ZHA entities are Unavailable. Windows OS Serial port COM3/COM4 also disappears from Windows Device Manager.
Could you please tell me how to configure Home Assistant so my ZHA and Z-wave devices are usable again (after adding HUSBZB-1 to VirtualBox USB filter)? Below, is all the ports Home Assistant can currently see (after I added HUSBZB-1 to USB filter):
Thank you so much for all your help!
You don't need to forward the serial ports. Remove serial ports from VM guest and just add the filter for HUSBZB device. This would hide husbzb and its serial ports from the host OS and apps, so nothing could mess with it.
After you add filter to VM, you may have to reboot the guest.
I removed the forwarded serial ports (keeping the filter for HUSBZB device).. .then rebooted the guest. I also rebooted the entire host. This is all I did.
It looks like something is missing or wrong. All my Z-wave/Zigbee entities are still "Unavailable". I am also getting several errors in my Home Assistant Log: home-assistant.log
It looks like simply adding HUSBZB USB to the VirtualBox USB filters is not enough. Home Assistant can't see the radios:
Hrm, well, I don't really know how are you doing it. In my environment, after filter is added and I plug husbzb-1, it automatically gets captured by Virtual box
and I get is in my guest OS
I've just right-clicked on USB device in VBox and created a filter for it
Thank you so much for going out of your way to assist me. This is exactly how I did it too. However, the ports are not passed to the VM after adding the husbzb-1 to the USB filter list. The only difference is that my host OS is Windows.
Do you have any suggestions on where the issue might be so I can narrow it down? My husbzb-1 is not connected directly to my PC, it is connected to a USB powered hub. I will try to connect it directly to my PC to see if it makes any difference.
I don't know then. I'm also running on windows 10 and the screen shots were from two different guests one with debian buster and 2nd is a HASSOS
There was an issue in the past, were you had to edit USB delete windows filter in registry editor https://forums.virtualbox.org/viewtopic.php?f=2&t=37326 to make Virtual Box USB filter work
When in VM Guest you click on Devices -> USB -> Silabs, does it have a checkbox indicating it was captured by the guest?
Okay, I made significant progress (I think), after I connected my husbzb-1 directly to my PC, disabled the serial port mappings, and added the device to USB filter... the radios are now detected by Home Assistant: Edit: It looks like these devices are showing up as "audio" (see above screenshot). I'm not sure if it's supposed to say that or not.
However, the respective entities for all my Z-wave/ZHA devices are still showing has, "Unavailable". I still have the below lines in my configuration.yaml. I'm not sure if I'm supposed to change anything in the configuration.yaml or in the GUI.
usb_path: /dev/ttyS1
device_config: !include zwave_device_config.yaml
network_key: "0xf1, 0x6d, 0xb7, 0xa7, 0x17, 0x6a, 0x4c, 0x2f, 0x20, 0xba, 0x30, 0xea, 0xdd, 0x98, 0x8c, 0xee"
zha:
database_path: /config/zigbee.db
Below, is the respective Home Assistant Log: home-assistant.log
Deleted previous comment because I didn’t look at the log. You are still having port issues with ZHA in HA. My guess is the port mapping changed and you need to update it in the config entry
Could you please tell me the lines (with respective ports) to add to my config? Sorry, I'm not very familiar with Linux ports. Below, is what I have shown in the GUI:
disabled the serial port mappings,
Yeah, if the host OS claims the serial ports for mapping to VM, the underlying USB device won't be available.
The port path has changed, so you have two options:
-if01
. But you would loose all ZHA entities customizations/config/.storage/core.config_entries
and carefully replace the port path for ZHA config entry. Very error prone, easy to break other integrations. Do it on your own risk and only if you are comfortable restoring from the backupThank you. I will do the foolproof way. I feel bad for asking, but do you mind telling me what port path to specify in my configuration.yaml for my z-wave radio to work? Would I also have to delete the z-wave integration too (and add it back) after I change the port in my configuration.yaml?
EDIT; Do I need to change _usbpath: /dev/ttyS1 to the below line?
usb_path: /dev/serial/by-id/usb-Silicon_Labs_HubZ_Smart_Home_Controller_81300462-if00-port0
zwave:
usb_path: /dev/ttyS1
device_config: !include zwave_device_config.yaml
network_key: "0xf1, 0x6d, 0xb7, 0xa7, 0x17, 0x6a, 0x4c, 0x2f, 0x20, 0xba, 0x30, 0xea, 0xdd, 0x98, 0x8c, 0xee"
I REALLY appreciate all your help!
Hrm, that part of configuration doesn't have to do with ZHA integration, but ZWave one. HUSBZB-1 has two radios, so two integrations ares referencing the same physical device, just two different USB-Serial ports.
AH, yeah, if you want the ZWave port by serial id, that looks like correct one. However you would need to check the docs. I was not following ZWave develepement, but it could be that changes to configuration.yaml
are not registered with integration which is using a config entry imported from configuration.yaml
. The worst could happen, zwave won't start, so you would need to roll back the changes.
But I thought the new recommendation is to use the new ZWave-to-MQTT integration, as old one is being deprecated and all dev resources are focusing on ZWave-to-MQTT
I was able to get Z-wave working! I just used the by serial id I posted earlier. Now, all I have to do is delete the ZHA integration and add it back.... going to try now...
Nah, check your serial by id path, yours is going to be different. if you followed the tuorialals, those are getting out-of-date quite quickly, so pick those with a grain of salt. For questsions, better join HA discord server. There're channels for zigbee and zwave.
I'm going to close this issue now, as it really not a bellows/zha problem.
I am able to see ALL my devices (ZHA and Zigbee) after a reboot (using USB filter in VirtualBox). I'm hoping that the CRC errors are gone for good! Thanks again for all your help.
UPDATE; I just wanted to report that this issue never returned after successfully adding my HUSBZB-1 device to VirtualBox's USB filter. Thank you for all your help!
The problem
Hi There, I am using a HUSBZB-1 USB stick. I am getting error log messages in Home Assistant's regularly like the ones below. The these errors are triggered when my Home Assistant automations turn on lights (when motion is detected with my Zigbee "CentraLite" motion sensors).
Zigbee devices:
Environment
Problem-relevant
configuration.yaml
Traceback/Error logs
Additional information