From memory, Gladys’s Node-RED version is fixed; yours was updated to 4.0 because, outside of Gladys, it would be a plus to have the choice in Gladys of which version to install — from the currently fixed one up to latest — and also the fact that disabling deletes the Node-RED data.
Hello @cce66
I use Node_red outside Gladys, so when I installed it version 4 was installed; so I proceeded and tried to install my RFlink without downgrading the version and it works. As for the locked Node_Red version in Gladys, it’s a safety policy from Pierre-Gilles, so that we aren’t bothered if an update happens and breaks Node-red, I think. Gladys’s node-red version has stayed on V3. Version
1.0.1 of node-red-node-serialport does not work with V3, that’s for sure. However I haven’t tried installing node-red-node-serialport 2.0.3 under Node_red V3, maybe it works! Any daredevils willing to test? If it doesn’t work you have to stop node-red and reinstall the flows, but it’s true that it’s so much easier with Gladys, no need to rummage through the directories and delete files, it does it by itself
Hi @Psoy
For the reinstallation on my mini PC, I had the same problem as you when using the Node-Red version integrated into Gladys.
I did a fresh installation outside Gladys.
I ran sudo chown -R 1000:1000 /var/lib/node-red.
And everything worked (after reinstalling the MQTT broker, which had not been restored after restoring the backup).
Indeed, even MQTT didn’t start, same thing. But I wonder if Gladys’s Node-RED is blocking ports because even my Xiaomi gateway doesn’t work. It’s a shame because, as I said above, it’s so much easier to restart Node-RED when it’s integrated into Gladys when it crashes. I had an « access denied » error for dev/tty/USB1, where my Rflink was connected.
Good evening, I have the same problem accessing my RFLink on the usb1 port with Node-RED integrated into Gladys. There really is no way to resolve this problem without removing Node-RED from Gladys and reinstalling Node-RED separately.
Yes, I recently switched to the Gladys one and I can no longer connect to my RFLink. Node-RED cannot access the usb1 port where my RFLink is plugged in.
Yes that’s the problem, I couldn’t connect my RFLink and I also couldn’t connect my Xiaomi gateway anymore. Port closed, I couldn’t troubleshoot it. That’s why I switched back to an external Node-RED. But now with the updates, you no longer need to downgrade the serialport version (see the RFLink and Node-RED and Gladys tutorial), however you still need to run the command:
sudo chown -R 1000:1000 /var/lib/node-red
But I have this issue with the port connections that keeps reversing
Good evening,
I adapted the code below for negative temperatures
with this code : code to copy :
let input = msg.payload[4];
var Sign = input.substring(5, 6); // to know if the temperature is \u003c 0
var Neg = 0; // digit to add at the start if temperature \u003c 0
var Temp = input.substring(5, 9);
var TempNeg = input.substring(6, 9); // we only take the relevant digits
// Handling negative temperatures
if (Sign == 8) {
var CreationTempNeg = Neg.toString() + TempNeg;
var NouvelleTempNeg = parseInt(CreationTempNeg, 16);
msg.payload = -1 * (NouvelleTempNeg / 10);
}
// Handling positive temperatures
if (Sign == 0) {
Temp = parseInt(Temp, 16);
msg.payload = Temp / 10;
}
return msg;
msg.payload[4] corresponds to entry no. 4 of the array ; the first being no. 0
This therefore corresponds to TEMP=0010
Here, the temperature is therefore \u003e 0
Good evening @gaetanb76
Indeed, I didn’t account for negative temperature values — I’ll replace my code with yours in the tutorial.
Thank you for the correction
Good evening @gaetanb76
j’ai un peu modified your code pour qu’il reste dans l’esprit du tuto, c’est à dire que je n’utilise pas de array pour transformer la frame reçue. I count the characters in the whole frame, which, incidentally, is much more complicated than your method. (By the way I’d like you to explain it to me, how do you transform the frame into an array?)
If you have time take a look at what I wrote and tell me if it’s okay with you (it’s located just above paragraph 7)
thanks in advance
good evening