-
-
Notifications
You must be signed in to change notification settings - Fork 30.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFLink, UnicodeDecodeError: 'utf-8' #23942
Comments
Another update on this bug, I can "fix" it by running a rflink-python command in the underlying os. For exmaple Do you have any idea @aequitas? |
I have the same issue. Problem started in 0.93.1 Connecting to rflink over ip (socat with rflink on anthother linux machine) works fine |
@degraafm does the problem manifest consistently or sporadically? Could you maybe try with a previous version to see when it was still working? This change happened recently [0] but I don't know if its related? |
The problem manifests consistently. After rebooting/restarting rflink works for about 30 seconds. Then the unicode decode error is apppearing in the logs. Rflink in Version 0.92.2 is working fine |
Hm i downgraded to 0.92.2 and have the same error |
I am having same problem. Home Assistant 0.93.2.
|
Could you please run HA with the debug on for rflink[0] and post relevant output here? I might get a better picture of what is going wrong when I know which data is coming in. [0] https://www.home-assistant.io/components/rflink/#debug-logging |
My output is already posted with debug on.
|
Between 02:03:08 and 02:03:25, I run Not sure if that can help in understanding whats going on @aequitas ?
|
I can confirm that this also works on in my setup (homeassistant running inside docker here as well). A little snippet of my debug output as well (before running the above mentioned command);
|
It seems the problem occurs only on docker/hass.io. I can reproduce the problem om ubuntu with hass.io. On a raspberry pi with hass installed in a python virtual env. Rflink is working fine. |
Yesterday i noticed the same error.
Hassio 0.93.2 |
So I've finally come around to update my hassio installation to HA 0.93.2 but the problem doesn't manifest itself here. So I'm not able to debug this locally. Which version of hassio are you running. Mine is at 165, I have a pretty old installation so maybe it's lagging behind and the problem only exists on newer hassio versions? |
I updated python-rflink and created a pr to include the latest version in HA. This should result in a more robust handling of invalid incoming data. Beware this will not fix the issue per se. It will just ignore the data, log a warning and continue. But previously the invalid data would not be logged at all, not even in debug. So this might give a better insight in why things go wrong. |
Mine is at 165 as well. How are you running hassio @aequitas ? Is it on pi or something else? |
@olskar yes, on an RPi 3b+. Rflink plugged into the USB. One thing might be worth mentioning is that I don't use the This path will be different for your configuration. You can view them like so:
|
I am starting to think it might be related to docker+hassio+rflink and exposing device to the docker container I have installed hassio manually on my Intel nuc, @Sjeff also running on nuc |
@aequitas Here is log with 0.46. (At 16:00:46 I send a command with rflink on host os).
|
Debug log HA 0.93.2 I only have 1 device connected to rflink to switch on and off a light.
|
If I go to portainer and mark "home assistant" and "hassio_supervisor" and then press restart, I do not get any errors. But if I restart home assistant from inside home assistant, I get the above errors. So this seems to be a bug connected to hass.io somehow. Don't know if we could tag someone that knows a lot about hass.io that perhaps can understand why this occurs? |
I tried the same as @olskar but that didn't work for me. My portainer install is a separate docker container not a hass.io addon. |
@olskar I haven't been around much in the HA community lately so I don't know who currently is most knowledgeable about the hassio system. Maybe @balloob or @pvizeli know? Correct me if I'm wrong, but what we know at the moment is its:
|
I give up. Tried everythinh including clean Home Assistant instalation on a different machine. Is there any progress on solution? :) This looks like similar problem 2 years ago: https://community.home-assistant.io/t/solved-rflink-flooding-the-log-file/18762 |
For some reason the method i used earlier (restart docker container) does not work any more, hopefully this bug can be fixed |
Added information on workaround if affected by bug home-assistant/core#23942
I'm getting this same issues and the workaround doesnt work for me. Running Hass.io latest on a Intel NUC. Is there any solution, my rflink devices no longer show and my log gets full of this kind of stuff:
|
Same issue here. Only started with upgrade to 0.96.4. Garbage serial data as per others here. |
I have also tried the workaround with ser2net and am still getting errors. |
it's only started happening in the last couple of weeks for me and I always update to latest release. Worked flawlessly before that. |
So, I have managed to get this going with a workaround. I hope this helps someone. Cheers, Matt |
Recently i got this only on restart, now it can occur suddenly, anyone able to confirm that? This on 0.97.2 |
I tried today to install home assistant in docker using these instructions: The bug is not present in that installation. So i guess somehow it has to be related to hass.io? |
Same problems here with running Hassio in docker under Ubuntu server, rflink is unusable. I'm running Ubuntu on my esxi server, with passthrough to my usb card. Evereything else usb seem to work. |
No Python skills here at all but I think the ability to either delay the start of this component when HASSIO starts or restarts will work around the problem. Is it possible to add a start delay to a component? This issue only occurs on a HASSIO restart and stopping the serial flow and restarting once HASSIO results in normal behavior. |
I new to this docker way of doing things, so could it be a user error? In my installation I didn't setup a docker compose or similar to expose the different ports, since all ports seems to automatically show up under hardware in hass.io, could this be the problem I am seeing? |
No. It's an error that appeared reasonably recently with an upgrade of HASSIO. I am running SER2NET and when I restart my Home Assistant instance the corrupted data issue appears. Restarting the ser2net service resolves the issue. |
Yes I discovered the same thing(after reading here about ser2net). |
@RoosterX Is it possible for you to try the same thing as I did? E.g install home assistant in docker using these instructions and see if rflink works for you then? No need to remove your original hass.io docker container, just stop it while testing out this one |
@matthewharrington What setup are you using? hass.io or hassos? RPI or other? Docker? |
Hassio for me here. Running on Ubuntu VM. I swapped to Ser2Net rather than the native rflink Home Assistant Component so I could restart Ser2Net as required to work around the corruption issue. |
I'm using this https://www.home-assistant.io/hassio/installation/#alternative-install-on-a-generic-linux-host I am not sure how to use the instruction in your link? |
Could anyone having this problem with Ubuntu try the following and see if it helps?
|
I have just removed ModemManager and this seems to have sorted the issue for me. A single restart and rflink came up normally. Fingers crossed. Well done @olskar ! |
Wow I will try this tonight. Would this solve issues I'm having with Bluetooth components which also stopped working from my NUC hassio recently? (e.g. miflora) |
Great!!!
"dpkg --purge modemmanager" and issue is gone :)
Thank you!
…On Thu, 12 Sep 2019 at 10:16, Åskar Andersson ***@***.***> wrote:
Could anyone having this problem with Ubuntu try the following and see if
it helps?
Without the NetworkManager, you will be not able to control your host
network setup over the UI. The modemmanager package will interfere with any
Z-Wave or Zigbee stick and should be removed or disabled. Failure to do so
will result in random failures of those integrations. For example you can
disable with sudo systemctl disable ModemManager and remove with sudo
apt-get purge modemmanager
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#23942>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AE5JM75FXYHZ3WAKXYNY3T3QJH3G3ANCNFSM4HNU6XGQ>
.
|
I can confirm that this solves the issue here as well (gone through a couple of docker container restarts, and one cold boot of the host itself). Great! 👍 |
Great, closing this then! |
Hi, I continue to have this issue. This is definitely a HA issue as RFLink works fine outside HA using RFLinkLoader. I've documented the issue at https://community.home-assistant.io/t/2020-12-7-broke-rflink/259571. This stopped working when I've upgraded from from 0.98 to a 2020.12.xx HA version. I'm running Hassio on a PI4 so the modemmanager workaround reported above does not work for me. Can anyone help please? |
I actually have the same issue and cannot figure out what is causing this. I have done a brandnew hassos via proxmox installation on an Intel NUC 2 weeks ago, but getting the same messages. Moving back to my 'old' installation using a simple docker installation on a Synology NAS works fine. I'll post in the forumtopic as well. |
Home Assistant release with the issue:
0.93.1
Last working Home Assistant release (if known):
Operating environment (Hass.io/Docker/Windows/etc.):
Hass.io
Component/platform:
https://www.home-assistant.io/components/rflink/
Description of problem:
RFLink does not work
Problem-relevant
configuration.yaml
entries and (fill out even if it seems unimportant):Traceback (if applicable):
Additional information:
The text was updated successfully, but these errors were encountered: