Problem with "tado" node

Dear all,
I was using tado node withouth any problem for a while. Than after some time, I wanted to extend the usage. I also upgrade node red to version 2.2.
Than I was facing some problems with this particular Tado node. I uninstalled it, I successfully installed it again. First thing that I realise iz exclamation point.
After I want to use I get error on compile. I have to uninstall it, if I want to use any node red again.
What could be the reasong? Where to check? Are there any logs? Most probably some old configuration/parameter stayed somewhere.


Go into your .node-red folder (that is important) and run
npm remove node-red-contrib-tado-client
npm install node-red-contrib-tado-client
and post the output here. When pasting the text use the </> button at the top of the forum entry window.

This is the output. There is something wrong with some update on my Ubuntu. I don't know how to solve it. I am thinking if there is a chance, reason for problem is, that there was no restart of the machine between removing and installing tado client?

demokedes@NodeRed:~/.node-red$ sudo npm remove node-red-contrib-tado-client
removed 14 packages and audited 703 packages in 3.723s

50 packages are looking for funding
  run `npm fund` for details

found 36 vulnerabilities (23 moderate, 9 high, 4 critical)
  run `npm audit fix` to fix them, or `npm audit` for details
demokedes@NodeRed:~/.node-red$ npm install node-red-contrib-tado-client
+ node-red-contrib-tado-client@0.9.8
added 14 packages from 7 contributors and audited 717 packages in 5.836s

50 packages are looking for funding
  run `npm fund` for details

found 36 vulnerabilities (23 moderate, 9 high, 4 critical)
  run `npm audit fix` to fix them, or `npm audit` for details

┌─────────────────────────────────────────────────────────────┐
│                   npm update check failed                   │
│             Try running with sudo or get access             │
│            to the local update config store via             │
│ sudo chown -R $USER:$(id -gn $USER) /home/demokedes/.config │
└─────────────────────────────────────────────────────────────┘
demokedes@NodeRed:~/.node-red$

You shouldn't use sudo with npm unless you are installing globally (with -g). You will have given some files root ownership so npm cannot modify them. Run the chown command suggested and then try again.
When complete (assuming you get no errors) stop node red and start it again and, if it is still not working correctly. post the startup log here.

I've tried, but I am still getting an error:

demokedes@NodeRed:~$ npm remove node-red-contrib-tado-client
npm WARN saveError ENOENT: no such file or directory, open '/home/demokedes/package.json'
npm WARN enoent ENOENT: no such file or directory, open '/home/demokedes/package.json'
npm WARN demokedes No description
npm WARN demokedes No repository field.
npm WARN demokedes No README data
npm WARN demokedes No license field.

removed 8 packages and audited 417 packages in 2.195s

1 package is looking for funding
  run `npm fund` for details

found 123 vulnerabilities (64 moderate, 51 high, 8 critical)
  run `npm audit fix` to fix them, or `npm audit` for details
demokedes@NodeRed:~$ npm install node-red-contrib-tado-client
npm WARN saveError ENOENT: no such file or directory, open '/home/demokedes/package.json'
npm WARN enoent ENOENT: no such file or directory, open '/home/demokedes/package.json'
npm WARN demokedes No description
npm WARN demokedes No repository field.
npm WARN demokedes No README data
npm WARN demokedes No license field.

+ node-red-contrib-tado-client@0.9.8
added 8 packages from 11 contributors and audited 425 packages in 2.164s

1 package is looking for funding
  run `npm fund` for details

found 123 vulnerabilities (64 moderate, 51 high, 8 critical)
  run `npm audit fix` to fix them, or `npm audit` for details
demokedes@NodeRed:~$

This time you are in the wrong folder. I did say that this is important.

Hey, yes you're right...but when I go in the right folder, still no sucess....any idea?

demokedes@NodeRed:~/.node-red$ npm remove node-red-contrib-tado-client
audited 703 packages in 3.933s

50 packages are looking for funding
  run `npm fund` for details

found 36 vulnerabilities (23 moderate, 9 high, 4 critical)
  run `npm audit fix` to fix them, or `npm audit` for details
demokedes@NodeRed:~/.node-red$ npm install node-red-contrib-tado-client
+ node-red-contrib-tado-client@0.9.8
added 14 packages from 7 contributors and audited 717 packages in 8.145s

50 packages are looking for funding
  run `npm fund` for details

found 36 vulnerabilities (23 moderate, 9 high, 4 critical)
  run `npm audit fix` to fix them, or `npm audit` for details
demokedes@NodeRed:~/.node-red$

That is all fine, it has installed ok. Ignore the npm audit messages,
Now restart node red and refresh the browser window.

If it still doesn't work then stop node red and start it again and post the startup log here.

Dear Colin,
YOu're right. Tado node was installed, but with the same errors as before. How can i get startup log? Where is it located? In which file?
Thank you in advance,
Rok

As I said, start node-red in a terminal and the log appears. Depending how you installed node-red then possibly
node-red-stop
node-red-start
Otherwise stop node red however you normally stop it and start it with
node-red
and copy/paste the output here.

This is a good question.
I am unable to restart with sugggested steps.

demokedes@NodeRed:~$ node-red-stop
node-red-stop: command not found
demokedes@NodeRed:~$

Usually I restart by rebooting the whole server, but they of course I loose conectivity to console as well. Can you please suggest me, how to reboot in proper way?

What hardware/OS are you running and how did you install node-red?

I am running it on virtual machine - Ubuntu...To be honest I don't remember anymore how i installed it, but I believe I was following some official steps...

If you followed the recommended method for Debian/Ubuntu/Pi then the commands above would work.
https://nodered.org/docs/getting-started/raspberrypi

If you don't know how it was installed or, presumably, how it runs automatically on boot then it is difficult to help.

Personally I would run the linked script to get everything to a known state, but you might then have the problem that whatever script is starting it at boot continues so that you have two instances running.

If this is helping...I was searching a bit, how to restart node-red....

demokedes@NodeRed:~$ systemctl restart node-red
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to restart 'node-red.service'.
Authenticating as: Ubuntu (demokedes)
Password:
==== AUTHENTICATION COMPLETE ===
Failed to restart node-red.service: Unit node-red.service not found.
demokedes@NodeRed:~$

Aha, and I think I found a way how I installed it: Running on Microsoft Azure : Node-RED (nodered.org)

You would have to use sudo with that command even if the script were found. Try without the dash
sudo systemctl restart nodered
If that works then at least you know the name of the startup script. Then you can run
sudo sytemctl stop nodered
to stop it, and
node-red
should start it in a terminal.

Sorry, our posts crossed.
I don't know anything about pm2, but if you can work out how to stop node-red then I think you should be able to start it in a terminal just using
node-red

Colin,
You helped me enough. I managed to restart it through pm2.
This is the output of the log while node-red was restarting. I don't find anything useful. Am I missing something? Am I looking at the right log?

0|node-red  | 9 Feb 21:24:30 - [info] Stopping flows
0|node-red  | 9 Feb 21:24:30 - [info] Stopped flows
0|node-red  | 9 Feb 21:24:44 - [info]
0|node-red  | Welcome to Node-RED
0|node-red  | ===================
0|node-red  | 9 Feb 21:24:44 - [info] Node-RED version: v2.2.0
0|node-red  | 9 Feb 21:24:44 - [info] Node.js  version: v10.19.0
0|node-red  | 9 Feb 21:24:44 - [info] Linux 5.4.0-1068-azure x64 LE
0|node-red  | 9 Feb 21:24:44 - [info] Loading palette nodes
0|node-red  | 9 Feb 21:24:45 - [error] Dashboard version 3.1.5 requires Nodejs 12 or more recent
0|node-red  | 9 Feb 21:24:46 - [warn] ------------------------------------------------------
0|node-red  | 9 Feb 21:24:46 - [warn] [node-red-contrib-tado-client/tado] SyntaxError: Invalid or unexpected token
0|node-red  | 9 Feb 21:24:46 - [warn] ------------------------------------------------------
0|node-red  | 9 Feb 21:24:46 - [info] Settings file  : /home/demokedes/.node-red/settings.js
0|node-red  | 9 Feb 21:24:46 - [info] Context store  : 'default' [module=memory]
0|node-red  | 9 Feb 21:24:46 - [info] User directory : /home/demokedes/.node-red
0|node-red  | 9 Feb 21:24:46 - [warn] Flows file name not set. Generating name using hostname.
0|node-red  | 9 Feb 21:24:46 - [info] Flows file     : /home/demokedes/.node-red/flows_NodeRed.json
0|node-red  | 9 Feb 21:24:46 - [info] Server now running at http://127.0.0.1:1880/
0|node-red  | 9 Feb 21:24:46 - [warn]
0|node-red  | ---------------------------------------------------------------------
0|node-red  | Your flow credentials file is encrypted using a system-generated key.
0|node-red  | If the system-generated key is lost for any reason, your credentials
0|node-red  | file will not be recoverable, you will have to delete it and re-enter
0|node-red  | your credentials.
0|node-red  | You should set your own key using the 'credentialSecret' option in
0|node-red  | your settings file. Node-RED will then re-encrypt your credentials
0|node-red  | file using your chosen key the next time you deploy a change.
0|node-red  | ---------------------------------------------------------------------
0|node-red  | 9 Feb 21:24:46 - [info] Starting flows
0|node-red  | 9 Feb 21:24:46 - [error] [openweathermap:Telemtry outside Brezovica pri Lj] No API key set
0|node-red  | 9 Feb 21:24:46 - [info] Started flows
0|node-red  | 9 Feb 21:24:46 - [info] [mqtt-broker:bbecaea9.58a68] Connection failed to broker: NodeRedSQLClient@mqtt://localhost:1883
0|node-red  | 9 Feb 21:25:01 - [info] [mqtt-broker:bbecaea9.58a68] Connection failed to broker: NodeRedSQLClient@mqtt://localhost:1883
0|node-red  | 9 Feb 21:25:16 - [info] [mqtt-broker:bbecaea9.58a68] Connection failed to broker: NodeRedSQLClient@mqtt://localhost:1883

You need at least node.js v12 to run node-red 2.2, the recommended is 14. The instructions you linked to say to install v12 so how you ended up with 10 I don't know, unless the instructions have changed since then. I think you can probably use the commands there to replace it with v14 by using 14 in the command, obviously. Then when it has installed ok go to your .node-red folder and run
npm rebuild
then start node red again.