-
So I've seen similar posts and have tried every piece of advice I've found so far, but nothing has worked for me. I'm new to HA and Room Assistant, so my apologies in advance for being in over my head here....hoping someone might be able to shed some light on this though! Each time installing room assistant on my Pi Zero 2 W devices it hangs in exactly the same spot and the install never completed. I've tried following the instructions for the Pi Zero W as well as the one for the Pi 3/4 and, while I did manage a successful installation ONCE with the latter process, I cannot seem to repeat that success. I've done sudo apt update and sudo apt upgrade pretty much every time, started from scratch with a new flash dozens of times, tried manually updating some of the dependencies indicated in the WARN errors, but nothing works.
It always hangs on that last spot with "reify.mathjs:"...thoughts? |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 6 replies
-
So, the RP3 instructions are the correct ones as the Zero 2 uses the same chip. The extra "sudo apt update/upgrade" isnt required but shouldnt do any harm. I would recommend against manually updating the dependencies as the older ones have been tested to work with room-assistant whereas the newer one havent (caveat would be if you expose the room-assistant service to the internet). As stated in the room-assistant instructions WARN messages are OK so long as the overall operation completes successfully. Out of interest, how long do you wait before concluding that the
|
Beta Was this translation helpful? Give feedback.
-
I ran the command and this seems to finish the install in about 10 mins over LAN. Ran the regular command on another pi zero w 2 and got same issue with freezing at installing mathjs. Can't really tell why. |
Beta Was this translation helpful? Give feedback.
-
So once npm has downloaded mathjs then it starts to build a bunch of modules that take quite a bit of time. In previous versions of npm, the build scripts would be run in the foreground and the associated output sent to the screen. The newer npm command runs the scripts in the background and swallows the output by default. Could be that the pi is terminating the ssh session thinking it is inactive as the regular command will go for some time without generating output during the build phase. This will also terminate all processes running in that shell including the npm command. Running with foreground-scripts enabled could be creating enough traffic to avoid this. You could check if your client has an "SSH Keep Alive" option and try setting that ? When you get into the "hung" situation, are you still able to ping the pi and even ssh back in to see if the npm command is still running ? If the pi is still running but the npm command is not then that would lend weight to a "keep-alive" problem. |
Beta Was this translation helpful? Give feedback.
-
@PeteBa Thank you for your explanation, makes sense! I've also tested this on an old machine running Rasbian Duster following the pi 3/4 install guide. No freezing with npm on mathjs there. So maybe a pi zero w2 specific problem? I will check your suggestions about pinging and get back soon. If there is any more testing I can do let me know. Got some spare time in the evenings. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
I was able to solve this by increasing the default swap space from 100 to 1024. The default 100MB of swap is not sufficient and both RAM and swap run out while installing and subsequently hang SSH. Less concerned about runtime, this was more of a problem during install. A long 45 minute install... Might be of value to put either (this or "sudo npm i --global --unsafe-perm --verbose --foreground-scripts room-assistant") as a recommendation on the instructions page for this, as configuration prior to install: https://www.room-assistant.io/guide/quickstart-pi-zero-w.html |
Beta Was this translation helpful? Give feedback.
So, the RP3 instructions are the correct ones as the Zero 2 uses the same chip. The extra "sudo apt update/upgrade" isnt required but shouldnt do any harm. I would recommend against manually updating the dependencies as the older ones have been tested to work with room-assistant whereas the newer one havent (caveat would be if you expose the room-assistant service to the internet). As stated in the room-assistant instructions WARN messages are OK so long as the overall operation completes successfully.
Out of interest, how long do you wait before concluding that the
npm
command has hung ? Reason I ask is that I have had installs stay on that line for up to 35mins before printing the next …