Comfort  Automation/ Security System Forums Home
Home Search search Menu menu Not logged in - Login | Register
Comfort Automation/ Security System Forums > Products > UCM > UCM/Pi > Updated UCM/Pi Install Script

Updated UCM/Pi Install Script
 Moderated by: mattbrain, benstinton Page:    1  2  Next Page Last Page  
 New Topic   Reply   Printer Friendly 
 Rate Topic 
AuthorPost
 Posted: Tuesday Apr 16th, 2024 03:29 pm
   PM  Quote  Reply 
1st Post
Sota
UCM Pi Users
 

Joined: Friday May 3rd, 2013
Location: Galway, Ireland
Posts: 86
Status: 
Offline

  back to top

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.
  • A
  • fter the script completes, it can take several minutes for the login page to be available at [url=http://

    Attachment: install_script.zip (Downloaded 6 times)



 Posted: Monday Aug 12th, 2024 05:48 pm
   PM  Quote  Reply 
2nd Post
bmistry3
Member
 

Joined: Sunday Mar 17th, 2019
Location:  
Posts: 25
Status: 
Offline

  back to top

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.

Attachment: Image 4.jpg (Downloaded 31 times)



 Posted: Monday Aug 12th, 2024 05:49 pm
   PM  Quote  Reply 
3rd Post
bmistry3
Member
 

Joined: Sunday Mar 17th, 2019
Location:  
Posts: 25
Status: 
Offline

  back to top

See also image 3

Attachment: Image 3.jpg (Downloaded 31 times)



 Posted: Monday Aug 12th, 2024 05:50 pm
   PM  Quote  Reply 
4th Post
bmistry3
Member
 

Joined: Sunday Mar 17th, 2019
Location:  
Posts: 25
Status: 
Offline

  back to top

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"



 Posted: Monday Aug 12th, 2024 05:56 pm
   PM  Quote  Reply 
5th Post
Sota
UCM Pi Users
 

Joined: Friday May 3rd, 2013
Location: Galway, Ireland
Posts: 86
Status: 
Offline

  back to top

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.



 Posted: Monday Aug 12th, 2024 06:11 pm
   PM  Quote  Reply 
6th Post
bmistry3
Member
 

Joined: Sunday Mar 17th, 2019
Location:  
Posts: 25
Status: 
Offline

  back to top

Will do. I was on SSH.
Thank you



 Posted: Monday Aug 12th, 2024 07:23 pm
   PM  Quote  Reply 
7th Post
bmistry3
Member
 

Joined: Sunday Mar 17th, 2019
Location:  
Posts: 25
Status: 
Offline

  back to top

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.



 Posted: Monday Aug 12th, 2024 07:56 pm
   PM  Quote  Reply 
8th Post
Sota
UCM Pi Users
 

Joined: Friday May 3rd, 2013
Location: Galway, Ireland
Posts: 86
Status: 
Offline

  back to top

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.



 Posted: Monday Aug 12th, 2024 08:29 pm
   PM  Quote  Reply 
9th Post
bmistry3
Member
 

Joined: Sunday Mar 17th, 2019
Location:  
Posts: 25
Status: 
Offline

  back to top

Please see image.

Last edited on Tuesday Aug 13th, 2024 02:11 am by



 Posted: Monday Aug 12th, 2024 08:33 pm
   PM  Quote  Reply 
10th Post
Sota
UCM Pi Users
 

Joined: Friday May 3rd, 2013
Location: Galway, Ireland
Posts: 86
Status: 
Offline

  back to top

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



 Posted: Monday Aug 12th, 2024 08:33 pm
   PM  Quote  Reply 
11th Post
bmistry3
Member
 

Joined: Sunday Mar 17th, 2019
Location:  
Posts: 25
Status: 
Offline

  back to top

This image

Attachment: Screenshot 2024-08-12 202942.png (Downloaded 28 times)



 Posted: Monday Aug 12th, 2024 08:36 pm
   PM  Quote  Reply 
12th Post
bmistry3
Member
 

Joined: Sunday Mar 17th, 2019
Location:  
Posts: 25
Status: 
Offline

  back to top

Also I am using a USB wireless keyboard, not sure if that makes any difference



 Posted: Monday Aug 12th, 2024 09:06 pm
   PM  Quote  Reply 
13th Post
Sota
UCM Pi Users
 

Joined: Friday May 3rd, 2013
Location: Galway, Ireland
Posts: 86
Status: 
Offline

  back to top

When you run the script, do you see any warnings before it errors out at Installing Dependencies? Also, can you run npm --version and post the results.



 Posted: Tuesday Aug 13th, 2024 07:34 am
   PM  Quote  Reply 
14th Post
bmistry3
Member
 

Joined: Sunday Mar 17th, 2019
Location:  
Posts: 25
Status: 
Offline

  back to top

npm --version results in 10.2.4
I will try again after work, reimage and run script, if it stops at "installing dependencies" I will run manually as you suggest.



 Posted: Tuesday Aug 13th, 2024 08:06 am
   PM  Quote  Reply 
15th Post
Sota
UCM Pi Users
 

Joined: Friday May 3rd, 2013
Location: Galway, Ireland
Posts: 86
Status: 
Offline

  back to top

The USB keyboard doesn't matter.

Last edited on Tuesday Aug 13th, 2024 08:07 am by Sota



 Posted: Wednesday Aug 14th, 2024 07:59 am
   PM  Quote  Reply 
16th Post
bmistry3
Member
 

Joined: Sunday Mar 17th, 2019
Location:  
Posts: 25
Status: 
Offline

  back to top

Hello 
I tried it again, ran the install.sh script and rebooted the pi at the same place "installing Dependencies" 
I then ran the command manually as suggested above and it showed some errors which are in the attached file.

Attachment: 2024-08-13T20_04_59_156Z-debug-0.log (Downloaded 1 time)



 Posted: Wednesday Aug 14th, 2024 01:47 pm
   PM  Quote  Reply 
17th Post
Sota
UCM Pi Users
 

Joined: Friday May 3rd, 2013
Location: Galway, Ireland
Posts: 86
Status: 
Offline

  back to top

I will try to get access to my Comfort alarm and spare CM3+ to try a clean install. However, this may take a week or so, as the alarm is in storage while our house is renovated.
In the meantime, could you try running npm install on each of the packages individually to see if any of them can be installed.



 Posted: Wednesday Aug 14th, 2024 01:48 pm
   PM  Quote  Reply 
18th Post
Sota
UCM Pi Users
 

Joined: Friday May 3rd, 2013
Location: Galway, Ireland
Posts: 86
Status: 
Offline

  back to top

Also, can you confirm that the RS485 cable is connected from the UCM/Pi to the Comfort alarm system.



 Posted: Wednesday Aug 14th, 2024 09:39 pm
   PM  Quote  Reply 
19th Post
bmistry3
Member
 

Joined: Sunday Mar 17th, 2019
Location:  
Posts: 25
Status: 
Offline

  back to top

Cable connected and nothing touhed on hardware/cabling side.
See attached text file for details on running manually.
I ran the command manually with the following commands :
npm install epollnpm install mqttnpm install serialport@9.2.8npm install mittnpm install xml2jsnpm install bcryptnpm install expressnpm install express-wsnpm install express-handlebars@3.0.0npm install express-handlebars-layoutsnpm install express-sessionnpm install memorystorenpm install body-parsernpm install cookie-parsernpm install requestnpm install express-fileuploadnpm install xml2jsnpm install fs-extranpm install pathnpm install uid-safenpm install httpsnpm install rpi-gpionpm install osnpm install child_process
and the text file shows details of some errors and final result

Attachment: run output.txt (Downloaded 2 times)



 Posted: Wednesday Aug 14th, 2024 09:46 pm
   PM  Quote  Reply 
20th Post
bmistry3
Member
 

Joined: Sunday Mar 17th, 2019
Location:  
Posts: 25
Status: 
Offline

  back to top

So interesting. I went back into shell before I shutdown and the pi console login register appeared, I registed and I have the PI console up and running and Node-Red also.
will leave this alone until you can check the error/warn messages
Thank You...



 Current time is 05:06 pmPage:    1  2  Next Page Last Page  
Comfort Automation/ Security System Forums > Products > UCM > UCM/Pi > Updated UCM/Pi Install Script
Top




UltraBB 1.172 Copyright © 2007-2014 Data 1 Systems