Skip to content
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

Not working on Pi Zero W 2 #958

Open
madmic1314 opened this issue Nov 1, 2021 · 19 comments
Open

Not working on Pi Zero W 2 #958

madmic1314 opened this issue Nov 1, 2021 · 19 comments

Comments

@madmic1314
Copy link

Describe the bug
Installing on Pi Zero W 2, fails at start up with an error

To reproduce
Install on Pi Zero W 2

Relevant logs
[Nest] 637 ERROR [ClusterService] Cannot file module '../build/Release/dns_sd_bindings'
Require stack:

  • /opt/nodejs/lib/node_modules/room-assistant/node_modules/mdns/lib/dns_sd.js
  • /opt/nodejs/lib/node_modules/room-assistant/node_modules/mdns/lib/mdns.js
  • /opt/nodejs/lib/node_modules/room-assistant/dist/cluster/cluster.service.js
  • /opt/nodejs/lib/node_modules/room-assistant/dist/entities/entities.service.js
  • /opt/nodejs/lib/node_modules/room-assistant/dist/entities/entities.modules.js
  • /opt/nodejs/lib/node_modules/room-assistant/dist/app.module.js
  • /opt/nodejs/lib/node_modules/room-assistant/dist/main.js
  • /opt/nodejs/lib/node_modules/room-assistant/bin/room-assistant.js

Also can see:
warn: ConfigService: No configuration found in /home/pi/room-assistant/config/config

Even though local.yml exists in this folder. Have tired making a subfolder "config" in /home/pi/room-assistant/config with no joy.

RA doesn't create entities in HA, can't see connections to the mqtt broker.

Environment

  • room-assistant version: 2.19.1
  • installation type: Nodejs
  • hardware: Raspberry Pi Zero W 2
  • OS: Linux,

Fresh flash, repeated twice to check

@madmic1314 madmic1314 added the bug label Nov 1, 2021
@rust84
Copy link

rust84 commented Nov 3, 2021

I've got it running successfully on two Pi Zero W 2's. Suggest doing a fresh install and following the instructions for the Pi 3 as it uses the same CPU. I had problems with the Pi Zero instructions and in the end a clean install following the Pi 3 instructions worked. The warning you have there suggests you are not starting room-assistant from the room-assistant folder. That has caught me out as well. Good luck :)

@bigstation17
Copy link

I followed Pi3 installation guide on Rpi Zero 2, and for me does not work.
I get the following error.

`pi@RoomAssistant:~ $ sudo npm i --global --unsafe-perm room-assistant
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated request@2.88.2: request has been deprecated, see request/request#3142
npm WARN deprecated tar@2.2.2: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
npm notice
npm notice New patch version of npm available! 8.1.0 -> 8.1.2
npm notice Changelog: https://github.com/npm/cli/releases/tag/v8.1.2
npm notice Run npm install -g npm@8.1.2 to update!
npm notice
npm ERR! code 2
npm ERR! path /usr/lib/node_modules/room-assistant
npm ERR! command failed
npm ERR! command sh -c github-sponsors
npm ERR! sh: 1: github-sponsors: Exec format error

npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-11-01T16_49_43_156Z-debug.log`

Also, i am not able to install it on orginal Rpi Zero W.
I could get working only with Rpi3+.

@JeroenTuinstra
Copy link

Try what it says in the notice:

npm notice
npm notice New patch version of npm available! 8.1.0 -> 8.1.2
npm notice Changelog: https://github.com/npm/cli/releases/tag/v8.1.2
npm notice Run npm install -g npm@8.1.2 to update!
npm notice

sudo npm install -g npm@8.1.2

And then do sudo npm i --global --unsafe-perm room-assistant again.

Had similar errors when upgrading room assistant.

@JeroenTuinstra
Copy link

It might also be an incompatible bluez-firmware. First find out what version you have with:
sudo apt list --installed | grep bluez-firmware

If it newer than 1.2-4 then downgrade to 1.2-4 firware with the following steps:

wget http://archive.raspberrypi.org/debian/pool/main/b/bluez-firmware/bluez-firmware_1.2-4+rpt2_all.deb
sudo dpkg -i bluez-firmware_1.2-4+rpt2_all.deb
echo "bluez-firmware hold" | sudo dpkg --set-selections 

The last line is to prevent it from upgrading when you do sudo apt update && sudo apt upgrade
You can also skip that line, but with the next upgrade you get the latest firmware again and you would have to repeat the process. Unless things have changed in raspbian or room-assistant.

@Blink515
Copy link

I've had nothing but issues with my Pi Zero W 2s.

I started fresh with a clean install of Bullseye and room-assistant on each Pi. When room-assistant is running they drop off my network or become unresponsive to SSH. This also causes issues with other devices running on the same network. When I look at the channel utilization for my APs it shows near 90% which is bad.

One of the new Pi's has issues seeing BLE devices when room-assistant is running but if I scan using bluetoothctl it picks those devices up without any issues.

Prior to switching to the new Pi's I had things running very well with the original Zero W and room-assistant 2.1.1. Movement between rooms was picked up within 1 second but now it takes 5 minutes or just shows my device as unavailable.

I wiped everything on the new Pi's again and tried using version 2.1.1 but still no luck.

At this point I don't think it's room-assistants fault and more of an issue with the new hardware and software.

@zackpollard
Copy link

zackpollard commented Dec 7, 2021

So I played around a bunch with this and I managed to get it working mostly on the raspberry pi zero W 2's. One main thing I had to do was disabled the instanceBeaconEnabled feature under the bluetoothLowEnergy integration
bluetoothLowEnergy: instanceBeaconEnabled: false
I do still notice at times instances where a specific raspberry pi struggles to see a device and so it flickers between rooms as one device that is further away sees the announcement but the closer one misses it. I'm not sure what I can do to resolve this last issue but going to keep tweaking the config. If there's anything that could be done within the code on room-assistants side to help with this problem that would be great, but i'm not hopeful.

EDIT: Another thing I had to do was use latest node-12 not node-16

@lpfann
Copy link

lpfann commented Dec 11, 2021

I've had nothing but issues with my Pi Zero W 2s.

I started fresh with a clean install of Bullseye and room-assistant on each Pi. When room-assistant is running they drop off my network or become unresponsive to SSH. This also causes issues with other devices running on the same network. When I look at the channel utilization for my APs it shows near 90% which is bad.

One of the new Pi's has issues seeing BLE devices when room-assistant is running but if I scan using bluetoothctl it picks those devices up without any issues.

Prior to switching to the new Pi's I had things running very well with the original Zero W and room-assistant 2.1.1. Movement between rooms was picked up within 1 second but now it takes 5 minutes or just shows my device as unavailable.

I wiped everything on the new Pi's again and tried using version 2.1.1 but still no luck.

At this point I don't think it's room-assistants fault and more of an issue with the new hardware and software.

I also had the issues with BLE utilizing 90% of the wifi band while active. BluetoothClassic is much better but not as accurate I think.
Could you make it work with BLE without killing the 2.4 Band?

@zackpollard
Copy link

I've had nothing but issues with my Pi Zero W 2s.

I started fresh with a clean install of Bullseye and room-assistant on each Pi. When room-assistant is running they drop off my network or become unresponsive to SSH. This also causes issues with other devices running on the same network. When I look at the channel utilization for my APs it shows near 90% which is bad.

One of the new Pi's has issues seeing BLE devices when room-assistant is running but if I scan using bluetoothctl it picks those devices up without any issues.

Prior to switching to the new Pi's I had things running very well with the original Zero W and room-assistant 2.1.1. Movement between rooms was picked up within 1 second but now it takes 5 minutes or just shows my device as unavailable.

I wiped everything on the new Pi's again and tried using version 2.1.1 but still no luck.

At this point I don't think it's room-assistants fault and more of an issue with the new hardware and software.

I also had the issues with BLE utilizing 90% of the wifi band while active. BluetoothClassic is much better but not as accurate I think.
Could you make it work with BLE without killing the 2.4 Band?

Yea I've had the same issue and it killed most of my IoT network so I had to disconnect the room assistant devices. Not sure what they are doing exactly but I had so many issues with devices dropping from the network while the room assistant pi zero 2 w's were connected. Hopefully something can be done to sort this as it seems impossible now to even get hold of the original pi zero w's.

@fdellutri
Copy link

fdellutri commented Dec 18, 2021

Same issue for me.
I needed to install avahi-utils and mdns-scan

apt install avahi-utils mdns-scan
npm install --verbose --unsafe-perm mdns
cd /usr/lib/node_modules/room-assistant/
npm rebuild --verbose --unsafe-perm

@sdeveer
Copy link

sdeveer commented Feb 15, 2022

I've tried the suggestions multiple times, no Cigar... unfortunately. Hopefully a future update could resolve the issue.

@Gotcha-1980
Copy link

Gotcha-1980 commented Feb 28, 2022

I have also been unable to get this working on a rpi zero 2 w. I have tried the suggestions here but have been unsuccessful. I too will wait hopefully on a fix!

UPDATE:
OK, so after a lot more playing around with this, I finally got it to work.

I followed the RPi3 instructions, but then instead of using the command provided:
sudo npm i --global --unsafe-perm room-assistant

I used:
sudo npm i --global --unsafe-perm --verbose --foreground-scripts room-assistant

After installation completed, it advised I needed to update the npm install, which I did. All now up and running as required.

Thank you the work done on this - it is very useful!

@Substarbo
Copy link

I have also been unable to get this working on a rpi zero 2 w. I have tried the suggestions here but have been unsuccessful. I too will wait hopefully on a fix!

UPDATE: OK, so after a lot more playing around with this, I finally got it to work.

I followed the RPi3 instructions, but then instead of using the command provided: sudo npm i --global --unsafe-perm room-assistant

I used: sudo npm i --global --unsafe-perm --verbose --foreground-scripts room-assistant

After installation completed, it advised I needed to update the npm install, which I did. All now up and running as required.

Thank you the work done on this - it is very useful!

Thanks so much.
What is the command to update the npm install?

@townsmcp
Copy link

Not sure if this is useful to people, however with the latest release of RM I had so many problems. Devices dropping off randomly, RPI locking up etc. I installed the latest beta and have had no more issues since. In case anyone is interested, follow the RPI 3 install instructions however run the following to install RA:

sudo npm i --global --unsafe-perm --verbose --foreground-scripts room-assistant@3.0.0-beta.4

@mKeRix mKeRix added this to To do in room-assistant roadmap via automation Mar 14, 2022
@Substarbo
Copy link

Substarbo commented Mar 24, 2022

Not sure if this is useful to people, however with the latest release of RM I had so many problems. Devices dropping off randomly, RPI locking up etc. I installed the latest beta and have had no more issues since. In case anyone is interested, follow the RPI 3 install instructions however run the following to install RA:

sudo npm i --global --unsafe-perm --verbose --foreground-scripts room-assistant@3.0.0-beta.4

Has this been reliable for you? As it only worked for a few hours then stopped for me.

@townsmcp
Copy link

Not sure if this is useful to people, however with the latest release of RM I had so many problems. Devices dropping off randomly, RPI locking up etc. I installed the latest beta and have had no more issues since. In case anyone is interested, follow the RPI 3 install instructions however run the following to install RA:
sudo npm i --global --unsafe-perm --verbose --foreground-scripts room-assistant@3.0.0-beta.4

Has this been reliable for you? As it only worked for a few hours then stopped for me.

Beta 4 was very stable for me. I’m currently on beta 5 and not so convinced at the moment. Keeps going to unavailable however since beta 4 I have made some pretty big changes - I now have 3 RPIs running, I’m running on the latest version of Node (17) so not 100% sure where the instability is coming from

@Substarbo
Copy link

I have had beta 4 running quite happily now

Not sure if this is useful to people, however with the latest release of RM I had so many problems. Devices dropping off randomly, RPI locking up etc. I installed the latest beta and have had no more issues since. In case anyone is interested, follow the RPI 3 install instructions however run the following to install RA:
sudo npm i --global --unsafe-perm --verbose --foreground-scripts room-assistant@3.0.0-beta.4

Has this been reliable for you? As it only worked for a few hours then stopped for me.

Beta 4 was very stable for me. I’m currently on beta 5 and not so convinced at the moment. Keeps going to unavailable however since beta 4 I have made some pretty big changes - I now have 3 RPIs running, I’m running on the latest version of Node (17) so not 100% sure where the instability is coming from

I've had beta 4 running quite happily for a while now. I don't know why it didn't work before but really happy with it now. Going to add a few more now. Thanks for your help.

@townsmcp
Copy link

townsmcp commented Apr 2, 2022

@Substarbo might be a good idea if you can share your config if your happy with your setup? Might help show some good tips and tricks that some of us are missing

@steuerzentrale
Copy link

I have also been unable to get this working on a rpi zero 2 w. I have tried the suggestions here but have been unsuccessful. I too will wait hopefully on a fix!
UPDATE: OK, so after a lot more playing around with this, I finally got it to work.
I followed the RPi3 instructions, but then instead of using the command provided: sudo npm i --global --unsafe-perm room-assistant
I used: sudo npm i --global --unsafe-perm --verbose --foreground-scripts room-assistant
After installation completed, it advised I needed to update the npm install, which I did. All now up and running as required.
Thank you the work done on this - it is very useful!

Thanks so much. What is the command to update the npm install?

I would be interested in the command too. I can confirm that the following command sudo npm i --global --unsafe-perm --verbose --foreground-scripts room-assistant@3.0.0-beta.4 worked on a Raspi Zero W2. I used the instructions for the Pi 3 as supposed here.

@Substarbo
Copy link

Sorry for the late reply but all 3 of my Pi zero's become available after a short period. It did work for a few weeks once but now lucky if it lasts a day. I have pretty much given up. Anyone else had better luck?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests