Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Updated UCM/Pi Install Script
#1
I ran into problems with Node-RED on the UCM/Pi being out of date preventing node-red-contrib-home-assistant-websocket from connecting to Home Assistant. This resulted in all my flows being unable to run. I tried the upgrade.sh script but it failed and I had to restore from a backup.
When Raspberry Pi CM4s\' finally became available I took the plunge and ordered one along with a Waveshare CM4 to CM3 adapter board. My reasoning was that if the installation failed, I could put the CM3 back in.This turned out to be wise, as after doing a clean Raspbian install, the alphaWerk Quickstart Script (install.sh) immediately failed with a node.js install error. I went through the script and managed to fix all the errors as they occurred, which took quite some time as I\'m not a Linux scripting expert.I have done a clean install with this version of the script on both a CM3 and a CM4, and it works fine. Node-RED v3.1.6 installed without any errors, and the Cytech nodes work as expected. A few things to watch out for:
  • Remember to export all your flows from Node-RED before starting, as you will be wiping the Pi.
  • When installing Raspbian, follow the instructions on the AlphaWerk github - UCMPi_OS Install but be sure to setup a user named pi, as the script assumes it exists. Raspbian no longer defaults to username pi.
  • To flash the Compute Module you will need the drivers and boot tool to mount it as a storage device. Use the Raspberry Pi Imager to install the 32-bit version of Pi OS Lite. I haven\'t tried the 64-bit version.
  • Unzip and copy the attached version of the script into /home/pi and run the commands from there. You will need to make it executable with chmod +x install.sh
  • Then just run it with ./install.sh
  • Do not run it as sudo, or under any other user name.
  • The UCM/Pi must be connected to the alarm system bus for the install to succeed.
  • After the script completes, it can take several minutes for the login page to be available at [url=http://


Attached Files
.zip   install_script.zip (Size: 2.91 KB / Downloads: 7)
Reply
#2
Hi Sota / Folks
I am tinkering to setup another CM3 for my comfort system as a backup and to learn. My orginal CM3 is not working on a few elements so thought I would not mess around with that and setup a new one. I have followed Sota\'s instructions and run the script with the new CM3 installed into the comfort.
The script gets as far as \"Installing Dependecies\" and then does not go any further. See  image 4.
Any adcide would be appreciated please. I am a newbie on pi/unix.


Attached Files Thumbnail(s)
   
Reply
#3
See also image 3


Attached Files Thumbnail(s)
   
Reply
#4
I have tried twice now and same problem. Second time, I re-imaged the CM3 module and all went well until at the same point \"Installing Dependencies\"
Reply
#5
It looks like you are installing via SSH, I don\'t think that will work. The Alphawerk instructions say you need:

Access to a USB Keyboard and Monitor or TV with HDMI input to assist with flashing.

So connect the UCM/Pi to a monitor with a HDMI cable and plug a keyboard into the USB slot.
Reply
#6
Will do. I was on SSH.
Thank you
Reply
#7
I got monitor and keyboard as suggested, re-imaged CM3+ to start fresh and the script ran. It got to \"Installing Dependencies\" and after a while the PI rebooted. Once I got prompt, I logged back in but that was it. It does not look like it continued the script as Mosquitto not installed so script again halted at the \"Installing Dependencies\" bit.

Not urgent but any further advice appreciated.
Reply
#8
I remember getting this error at one stage, but I can\'t recall what the solution was!
When I was debugging the script, I found it useful to copy the line that it was failing on and pasting it into the shell prompt, to see what error it was generating. In this case, copy and paste the line starting with npm install epoll... but leave out everything after ...rpi-gpio os child_process so that you can see the error messages.
Reply
#9
Please see image.

Reply
#10
I can\'t open that image. At the shell prompt can you paste this line in and see what error it gives:

npm install epoll mqtt serialport@9.2.8 mitt xml2js bcrypt express express-ws express-handlebars@3.0.0 express-handlebars-layouts express-session memorystore body-parser cookie-parser request express-fileupload xml2js fs-extra path uid-safe https rpi-gpio os child_process
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)