-
-
Notifications
You must be signed in to change notification settings - Fork 122
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
Problems running room-assistant on Raspberry Pi Zero #351
Comments
I installed Room Assistant today on my Raspberry Pi Zero W. I'm having the same experience - it worked for an hour or two, then stopped reporting. Everything looked normal, and only a restart fixed it. |
Do you have an idea why this happened? Did you see something in the log? |
My config:
Logs:
There's also repeated errors in the syslog:
The problem is that these errors are present when it's working and nothing seems to change when it stops working. |
Both of your logs seem completely fine to me at first glance to be honest, so I'm sorry to hear that it stops working. I have two ideas for further actions:
v2.11.0 was the version that changed quite a few things around how Bluetooth is handled in room-assistant to accommodate running BLE and BT Classic on the same adapter. Since both of you don't require this feature at the moment I wonder if the old version may have been more stable in that regard. |
Today after room-assistant stopped working and didnt recognize my mobile phone anymore I tried something else. I stopped the room-assistant service with sudo systemctl stop room-assistant. After that I started it with room-assistant -v. It started without an error but didnt recognize something (my mobile phone). After I rebooted the raspberry it immediately worked again. Very strange. |
Tried that: downgrade room-assistant to 2.10.1 |
I let room-assistant run now sometime with "room-assistant -v" to get more information. This morning it stoped working again and I saw alway this output, again and again: |
Hm, these messages are not worrisome in itself, as they always happen when the device isn't in reach of the instance for example. It is possible that the adapter hung up on itself. One quickfix workaround might be to increase If you happen to see this again, could you also try if running |
I installed room-assistant the same way on a raspberry pi 3. Its now working since more than a day without problems. I'll try it further but for now it looks like raspberry pi zero isn't a good way to run room-assistant. |
|
I've been waiting until now for it to happen again. I did have the rpi lock up 2 days ago but I'm not sure that was caused by room assistant. Tonight, I went out there and it didn't detect me, but the rpi hadn't locked up. I tried I restarted and it started working. |
I have been running room-assistant on 5 Pi Zero Ws successfully for quite a while now, so I don't think it is a specific hardware problem that affects all. Unfortunately this also makes this really hard to debug and understand. :( One thing that has helped people in the past is to make sure all the system software and the firmware is up-to-date. You can do that with |
Hi Heiko |
As an update, it was working until it locked up again this morning. It took 2 restarts to get it to work again. I've ordered another Pi Zero W, hoping I can narrow down if it's this particular board or not. Now I think of it, I had troubles with it locking up when I tried to run PiHole on it, too. I'll update with results once that arrives in a week or so. |
Room-Assistant still running on Pi 3 since 1 week without problems. Never had to reboot. Can you maybe make an ISO of your microSD and share that? So we can try if this would work on our Pi Zeros by only change the config file. |
i've experienced exactly the same today on a pi zero w, with everything installed from scrath about 2 month ago. did a room-assistant is the latest version as per npm |
Hm, pulling an ISO from one of my running Pis might be a bit tricky since I would have to figure out a way to wipe any personal settings (WiFi passwords etc) from it completely. I've been thinking about this for a little while and have come to the conclusion that I would like to give buildroot a try to generate a custom Linux image with everything pre-configured and pre-installed. Atm I would like to get the current beta (especially the iPhone stuff) to a stable point first, but after that I could imagine tackling this. Maybe something for the Christmas holidays. |
I received my second RPi Zero W yesterday. It lasted a few hours and then stopped detecting. As before the logs give no hints, and restarting the service has no effect. I solved the problem with a sledgehammer on the first RPi Zero W with a cron job to restart every hour, I'm about to do the same with the second one. |
As a side note, I added some more timeouts in the last beta version (v2.13.0-beta.3) that could possibly also help with this issue. Since just restarting room-assistant works for you something it may just be that something gets stuck while performing the inquiries and room-assistant does not handle that properly. |
I am having the same issue with 2 Zero Ws, running on 2.12.0, fresh install of everything, as of 2 days ago. Also, when I run I rebooted one of the Zeros, and it started working again, but I am keeping the other one on, to try and debug the issue. Restarting the room-assistant service did not help. I tried updating to 2.13.0-beta.3, but the non-restarted Zero is still not working. |
my 2 cents: i've reinstalled room-assistant on a fresh rpi zero w via docket this time and in couple of days i got the issue again. pi is not detecting any of the devices, the logs are empty. restarting room-assistant container didn't help so i had to do a rpi full restart to bet it back working. on that day, the only things that were in the log are:
what is interesting is that rpi-office is that particular rpi. is it trying to speak to itself? is that normal? just in case here's cluster part of my config on this rpi:
|
yet another update - tried the latest beta v2.13.0-beta.4 - the result is still the same. rpi stopped reporting in 2 hours with absolutely clear logs. |
I just started using room assistant about a week ago or so ago and I'm noticing the same pi zero issues. I'm having no problems with it running on two Pi3's and a Pi4, but both of the Pi zeros I've tried eventually lock up after a while like is mentioned. One thing I have noticed through the logs is the just prior to getting into the hung state the wifi interface drops and quickly reconnects. When it reconnects it shows a valid IP is received via dhcp. However, the device is no longer responding to pings or sending packets at this time. I have found that if I catch it early enough and disconnect it manually from my Wifi AP it will reconnect and start passing data again. If it sits too long in that hung state the AP reconnect command won't work and I then need to restart the Pi zero to get it back. |
While testing stuff for #309 I have also started noticing these issues now - the adapter becomes unstable or gets stuck, which then leads to nothing working correctly anymore. I am testing out a bunch of different things to stabilize this and recover from such failure states better, however only with medium amounts of success so far. Before bringing the companion app feature to stable I definitely want this issue to be solved. |
Are there any news on this issue? |
My local test installation seems to be able to recover from this, although I am testing it with other stuff enabled. I'm not 100% happy with my test results, but I think for this specific issue it might be valuable to at least get another beta release out. I'll try to facilitate that tomorrow. |
I just published 2.13.0-beta.5, which includes the stability improvements that I mentioned. Note that for regular BLE tracking the performance will be slightly degraded in the beta, as the companion app discovery process cannot be disabled yet (an option I want to add before making this an actual release). You can easily counteract that by raising the |
I just realized that I forgot to mention something regarding the beta.5 - for it to function fully while running as a non-root user you need to grant an additional permission that would otherwise only be needed for BT Classic:
|
thanks, but that doesn't needed for the docker image, correct? |
Thanks for your additional remarks and thoughts on this topic, it did give me another idea of what to try. Do you see the same issues when you make room-assistant a bit less aggressive on the adapter? Something like this: bluetoothClassic:
scanTimeLimit: 7
interval: 15 You can also set it to something even higher as a test. |
So far so good with the suggested changes. It does seem a little slow to recognise me on entry, but it's been running for a couple of days now without drama. Interestingly it has also started detecting my Apple watch, which after initially setting it up was never detected again until this latest config change. |
Working good for me too with the changes for the last 3 days! |
In that case I'll probably raise the defaults to a secure value in the next version. Still allows anyone that wants to push their hardware to tune it back down, but makes the default experience better for new users. |
I had it going for a few days too with those parameters, but it just crashed again :( 2/3/2021, 12:40:16 AM - error - BluetoothClassicService: Failed to retrieve RSSI for xx:xx:xx:xx:xx:xx:: Command failed: hcitool -i hci0 cmd 0x01 0x0008 I guess at this point I'll just give up on this and get back to gps presence detection, because this is way too glitchy to be useful :( |
## [2.13.1](v2.13.0...v2.13.1) (2021-02-13) ### Bug Fixes * **bluetooth-classic:** align device_tracker discovery ([#493](#493)) ([9e1be95](9e1be95)) * **bluetooth-classic:** increase default interval ([ce64847](ce64847)), closes [#351](#351) * **bluetooth-low-energy:** interpret allowlist as strings ([7a442e1](7a442e1)), closes [#534](#534) * **bluetooth-low-energy:** retry on immediate disconnects ([37000b8](37000b8)), closes [#508](#508) * **entities:** do not refresh non-locked entities ([7c031d4](7c031d4)), closes [#532](#532)
🎉 This issue has been resolved in version 2.13.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Hi all. |
Thanks for confirming it's related to the pi zero w's wifi connection with your Ethernet test. While it's gotten better since the changes made in response to this issue (my pi zero's are not locking up requiring a hard reboot anymore), they are disconnected way more than they're connected. I still have no issues with the Pi3 or Pi4's using their wifi connection. |
Hi
Thanks for the reply.
Like I said in my post I’m very inexperienced but thought I’d give some feed back from my own experience, as i think your “project” is fantastic.
I had issues with the pi’s even before loading your software. (painfully slow or unresponsive over SSH).
It’s also probably helped as I’ve turned off wifi on the pi’s so the chip can concentrate on the Bluetooth (classic) side.
Anyhow, thanks for a great bit of software
From: patdemko ***@***.***
Sent: 03 May 2021 13:36
To: mKeRix/room-assistant
Cc: neil2802; Comment
Subject: Re: [mKeRix/room-assistant] Problems running room-assistant on Raspberry Pi Zero (#351)
Hi all.
Very new to home assistant and also very inexperienced but am dabbling with room assistant and had the exact same issues on 4 pi zero w's using wifi. I bought some ethernet hats for the zeros, disabled wifi and they are now hard wired via ethernet.
Bang! Total reliability. Up and running for over a month now with no issues at all.
Understand this may not be practicle for all, but might give an insight into why the pi's are hanging. (wifi issues?)
Just need to tweak to get the room presence to update quicker. Always gets it right but can take up to 5 minutes.
Thanks for confirming it's related to the pi zero w's wifi connection with your Ethernet test. While it's gotten better since the changes made in response to this issue (my pi zero's are not locking up requiring a hard reboot anymore), they are disconnected way more than they're connected. I still have no issues with the Pi3 or Pi4's using their wifi connection.
<https://user-images.githubusercontent.com/11141892/116876016-cec9e680-abe9-11eb-8f7f-42ea57ce5ee3.png> image
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#351 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AM7CWCOAS5OE5SYRVT5COHTTL2KBTANCNFSM4T3E6LEA> . <https://github.com/notifications/beacon/AM7CWCISNPYEA3GD7MMACULTL2KBTA5CNFSM4T3E6LEKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOGGFZGBQ.gif>
|
You are on to something... I disabled the onboard Bluetooth on my pizero and added a USB bt dongle. The last few hours look stable. I am going to see how this works out. Thanks for sharing. |
is there any news to this issue? Is room-assistant now working on pi zero??? |
Nope. It lasts anywhere between a day or less and 3 or 4, then it doesn’t detect. I’m tired of trying to SSH in, and it’s not where my computer lives, so when it fails I just pull the power and most of the time that fixes it, although sometimes it takes 2 or 3 resets. |
If you are on a version newer than 2.14.0 check out #763 - there is an ongoing stability discussion in there. I also can suggest enabling the systemd watchdog feature, which will auto-restart the service when it detects problems. For that you need to update the service to look like the example in the docs and install an extra system library with |
I think there may be a wireless AP part to this as well. I was having a lot of issues with my pi zeros and room assistant, but then after I upgraded my AP (from a unifi nano to a unifi 6 LR which is a larger unit with a better antenna) I've had no issues. To test this theory I'd suggest putting your pi zeros close to your AP and see if you still have an issue with the stability. BTW, this issue only affected pi zeros with my old AP. My other Raspberry Pi 3's & 4's had no issues at all with the old AP. Just thought I'd mention it. |
As previously stated, i bought Ethernet hats for my 5 pi zeros W and shut off wifi.
Currently working perfectly, with no problems at all for over 2 months now. Never had any need to reboot or ssh in since. Room assistant just works!!
Think its the way forward with the zeros.
Hope that helps.
From: username-ibis ***@***.***
Sent: 25 June 2021 06:49
To: mKeRix/room-assistant
Cc: neil2802; Comment
Subject: Re: [mKeRix/room-assistant] Problems running room-assistant on Raspberry Pi Zero (#351)
is there any news to this issue? Is room-assistant now working on pi zero???
Nope. It lasts anywhere between a day or less and 3 or 4, then it doesn’t detect. I’m tired of trying to SSH in, and it’s not where my computer lives, so when it fails I just pull the power and most of the time that fixes it, although sometimes it takes 2 or 3 resets.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#351 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AM7CWCLMZOU2FUMZLD7G2HDTUQKF5ANCNFSM4T3E6LEA> . <https://github.com/notifications/beacon/AM7CWCOBJ2MJ6BSUK47AS6TTUQKF5A5CNFSM4T3E6LEKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOGPAAKZY.gif>
|
Hey all, Know this thread has been around for a while, but I faced the exact same issues on Pi 0. Given the comment from @neil2802, I decided to add a Bluetooth LE compatible dongle to remove pressure from the Pi 0 onboard Wi-Fi / Bluetooth, and no more strange hanging issues for almost a week now. I suppose the issue is with Pi 0 hardware capacity to run both Wi-Fi and Bluetooth. The only thing that bugs me at the moment is that after I am absent from the room where I have been testing room-assistant for some time, say 1 hour as "not_home", when I get back it takes about 5 minutes to pick up my iPhone tracking beacon again (companion app). Thanks @mKeRix for the wonderful piece of software. |
@hmlmartins what dongle did you buy? I've bought 2 versions of an 'official' CSR 4.0 dongle and they all didn't work. |
Hi.I bought these "ethernet hats" for my pi zeros.https://thepihut.com/collections/raspberry-pi-hats/products/ethernet-and-usb-hub-hat-for-raspberry-piThese are "assemble and play" with no software necessary. They have made the zeros and room assistant work flawlessly for a year.There are now Poe hats available, but these are quite expensiveI did turn off the Wi-Fi on the zeros after installing the above. I can talk you through this if you don't know how to do itHope this helps. RegardsNeil Hamilton Sent from Samsung tablet.
-------- Original message --------From: iron-LAN ***@***.***> Date: 29/12/2021 23:51 (GMT+00:00) To: mKeRix/room-assistant ***@***.***> Cc: neil2802 ***@***.***>, Mention ***@***.***> Subject: Re: [mKeRix/room-assistant] Problems running room-assistant on Raspberry Pi Zero (#351)
@hmlmartins what dongle did you buy? I've bought 2 versions of an 'official' CSR 4.0 dongle and they all didn't work.
Apparently there are patches for the kernel but I have no idea how to patch those. Did your's work out of the box?
—Reply to this email directly, view it on GitHub, or unsubscribe.Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you were mentioned.Message ID: ***@***.***>
[
{
***@***.***": "http://schema.org",
***@***.***": "EmailMessage",
"potentialAction": {
***@***.***": "ViewAction",
"target": "#351 (comment)",
"url": "#351 (comment)",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
***@***.***": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]
|
@neil2802 Hi Neil, ethernet hats would be the best solution, but I dont have ethernet at all location's I have Pi's so thats not an option. |
To get back to what I wrote a month ago: I've installed the pi's with a WiFi dongle and disabled the onboard WiFi. Rock sollid ever since. Thanks @mKeRix for this great piece of software! |
Can you share a link to the dongle that you have tried please? |
@townsmcp sure, but I live in the Netherlands so I don't know if it's an option for you. |
An update: |
Does anyone of you have a workaround by using watchdog successfully in operation? My current workaround for the Pi-Zero problem is a crontab with a reboot every hour, which is not a successful workaround for me. |
Describe the bug
I run room-assistant on two Raspberry Pi Zero. After every reboot everything is running like a charm. But after some random time room-assistant doesn't report as normaly. When I check the status of the service it tells me on both devices that room-assistant is still running. In the logs I can't see nothing special. When I then reboot both devices everthing is working again for some time. I tried everthing on a 3rd Raspberry Pi Zero with a complete new installation and room-assistant with same result.
Yesterday things stopped working on 22:10 in the evening. When I check the status of room-assistant it says me that room-assistant is still running but after that time there is no output when I do this command 'journalctl -u room-assistant.service'
Whats wrong? Is it only a problem of me or is it a bug? What means this error - ClusterService: getaddrinfo -3008 and what can I do against that?
Once I got the error: BluetoothClassicService: Failed to retrive RSSI for xyz Trying to lock adapter 0 even though it is already locked. Could this have something to do with that?
When I check home assistant entities I can see the entity of my iphone which I configured in room assistant. It has normaly the state of the room I am. But anyway room-assistant log tells me that:
HomeAssistantService: Device tracker requires manual setup in Home Assistant with topic: room-assistant/device_tracker/bluetooth-classic-c0-9a-d0-f1-8e-c1-tracker/state
Do I really have to configure something else? If yes what do I have to setup in home assistant?
My DNS server is configured to use *.local domain.
Relevant logs
This is what the log says.
Relevant configuration
My configuration
Environment
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: