Display CPU Temp from Pi4 on localhost:1880

I am new to Node-Red. Node-Red is installed on bullseye version of Raspberry.

Started Node Red console on Pi4 and start localhost:1880 in browser.
I create simple nodes that flow from "timestamp" into function node "exec" and end with a "debug" node.

When deployed I receive the message of credentials file using generated key...

I change my setting.js file in .node-red directory by activating credentialSecret: "xxx" - xxx being the key change.

Restart Node Red and deploy again. Still I get the same error message
What to do?

message:
10 Dec 10:29:34 - [warn]

Your flow credentials file is encrypted using a system-generated key.
If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.
You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.

10 Dec 10:29:34 - [info] Stopping flows
10 Dec 10:29:34 - [info] Stopped flows
10 Dec 10:29:34 - [info] Starting flows
10 Dec 10:29:34 - [info] Started flows

Which settings.js file did you edit?

You should be editing the one listed in the logs a few lines above that message.

And exactly how did you restart Node-RED?

Directory: /home/pi/.node-red/settings.js
I stopped node-red in the console and restarted it from console again

Can you copy/paste the contents of your settings.js please. When posting code, logs etc please use the </> button at the top of the forum entry window and paste the content in.

Show us exactly how you edited the file (with the key suitably blocked out)

(also just to be sure you didn't use sudo to start Node-RED?)

Also did you actually do a deploy after restarting? The creds don't get changed until you deploy (as said in the warning).

Changed/saved settings.js in Geany
The only change in settings.js

 credentialSecret: "xxx",

stop & start command console:
node-red-stop
node-red-start

Welcome to Node-RED

10 Dec 12:06:19 - [info] Node-RED version: v2.1.4
10 Dec 12:06:19 - [info] Node.js version: v14.18.2
10 Dec 12:06:19 - [info] Linux 5.10.63-v7l+ arm LE
10 Dec 12:06:20 - [info] Loading palette nodes
10 Dec 12:06:21 - [info] Settings file : /home/pi/.node-red/settings.js
10 Dec 12:06:21 - [info] Context store : 'default' [module=memory]
10 Dec 12:06:21 - [info] User directory : /home/pi/.node-red
10 Dec 12:06:21 - [warn] Projects disabled : editorTheme.projects.enabled=false
10 Dec 12:06:21 - [info] Flows file : /home/pi/.node-red/flows.json
10 Dec 12:06:21 - [info] Server now running at http://127.0.0.1:1880/
10 Dec 12:06:21 - [info] Starting flows

deploy was executed after node-red-start

Thank you Gentlemen for your help and assistance. I have successfully deployed and receive CPU Temp of 34C

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.