How are you going to install node red without getting the latest version? The install script gives you the latest by default.
And all my testing was while 1.0.6 was current, before 1.1.0 (and later) was released.
NOOBOS offline version has an older version than the latest.
I tried a simpler flow, same errors...
This is what I got (only once), when I tried to stop and start Node-Red, after seeing "Connection Lost" again:
> nodered.service: State 'stop-sigterm' timed out. Killing.
> nodered.service: Killing process 908 (node-red) with signal SIGKILL.
> nodered.service: Main process exited, code=killed, status=9/KILL
> nodered.service: Failed with result 'timeout'.
> Stopped Node-RED graphical event wiring tool.
Edit: I typed node-red-stop, nothing happened in Node-Red's terminal, I opened up a new terminal, and stopped it from there. Then, started it again on that windows (after hitting Ctrl+C), that is when I got the logs above. Also, on this second terminal, it said "Port in use".
Edit-2: Tried to start again, now it did. On the page, my flow is gone, again...
Edit-3: I checked the space on the first SD card, and it had only 90 MB left of 2.4 GB. Is this a problem? To me, it looks like one, but I'm not sure.
Edit-4: The other OS was slow, and it kept randomly freezing for a few seconds in every 5-10 seconds. This one didn't have that, until I got that error... Maybe, it is creating files somewhere? Maybe, somehow, it keeps using more and more space on the card? Can it be a kernel problem/bug?
Edit-5: I shut it down. Now, after I started Node-Red, my flow is there. It is not gone this time, but it was gone before I shut it down. I don't understand... It is working perfectly fine at the moment.
Yes, perhaps this is an issue. How big is the swap file in your system ? Check with free -h
also htop
will show how much of the swap is being used. Mine is configured with 100Mb but its utilization is minimum, if any.
htop:
Sometimes I see a green R in one of "node-red" lines. Sometimes a red D. Also, First 3 lines of the top part (one you showed in your screenshot), values there sometimes stay below 5%, sometimes they go nearly 40-50%, or even more in at least one of them.
Also:
> pi@raspberrypi:~ $ free -h
> total used free shared buff/cache available
> Mem: 1.9Gi 456Mi 868Mi 217Mi 613Mi 1.2Gi
> Swap: 99Mi 0B 99Mi
Edit: Again... Connection Lost... And I clicked on the "htop" terminal and saw those top 3 lines going above 50%. All of them. They went down quickly in a second.
You must be precise when you use those terms. Do you mean the flows.json file has disappeared? Or do you mean that the editor is hanging and you aren't able to see the flows, or something else?
The Port in Use message means that node-red was already running.
What size SD card have you got? I would have expected it to be at least 8GB.
What does df -h
show?
That looks like the result of the node-red-stop
command. It is saying it timed out waiting and killed it.
When you start node red (presumably you are using node-red-start) make sure you leave the terminal window open so you can see if anything appears in the log.
Also open htop
in another terminal and leave it open. Also run, in yet another terminal tail -f /var/log/syslog
. If that command complains about permissions then run it with sudo.
Then when it appears to be hanging again you can look at the htop window to see whether node-red (or something else possibly) is hogging the processor, you can look at the node-red log to see if there is anything helpful there, and you can look at syslog to see if anything that looks like an error there.
The window where you drag nodes around and connect them. There. It was gone, now it is back.
16 GB (both the old and the new one).
> pi@raspberrypi:~ $ df -h
> Filesystem Size Used Avail Use% Mounted on
> /dev/root 12G 5.9G 5.5G 52% /
> devtmpfs 841M 0 841M 0% /dev
> tmpfs 970M 107M 864M 11% /dev/shm
> tmpfs 970M 17M 954M 2% /run
> tmpfs 5.0M 4.0K 5.0M 1% /run/lock
> tmpfs 970M 0 970M 0% /sys/fs/cgroup
> /dev/mmcblk0p6 253M 51M 202M 21% /boot
> tmpfs 194M 0 194M 0% /run/user/1000
> pi@raspberrypi:~ $ tail -f /var/log/syslog
> Jul 14 19:18:02 raspberrypi kernel: [ 2193.039113] w1_slave_driver 28-0300a2790a56: Read failed CRC check
> Jul 14 19:18:04 raspberrypi kernel: [ 2195.518783] w1_slave_driver 28-0300a279f0d6: Read failed CRC check
> Jul 14 19:18:06 raspberrypi kernel: [ 2197.038655] w1_slave_driver 28-0300a279dceb: Read failed CRC check
> Jul 14 19:18:09 raspberrypi kernel: [ 2200.398877] w1_slave_driver 28-0300a2790a56: Read failed CRC check
> Jul 14 19:18:11 raspberrypi kernel: [ 2201.838851] w1_slave_driver 28-0300a279f0d6: Read failed CRC check
> Jul 14 19:18:13 raspberrypi kernel: [ 2204.318491] w1_slave_driver 28-0300a279dceb: Read failed CRC check
> Jul 14 19:18:16 raspberrypi kernel: [ 2206.799094] w1_slave_driver 28-0300a2790a56: Read failed CRC check
> Jul 14 19:18:18 raspberrypi kernel: [ 2209.199059] w1_slave_driver 28-0300a279f0d6: Read failed CRC check
> Jul 14 19:18:19 raspberrypi kernel: [ 2210.642669] w1_slave_driver 28-0300a279dceb: Read failed CRC check
> Jul 14 19:18:23 raspberrypi kernel: [ 2213.999266] w1_slave_driver 28-0300a2790a56: Read failed CRC check
> Jul 14 19:18:24 raspberrypi kernel: [ 2215.599182] w1_slave_driver 28-0300a279f0d6: Read failed CRC check
> Jul 14 19:18:27 raspberrypi kernel: [ 2217.999166] w1_slave_driver 28-0300a279dceb: Read failed CRC check
> Jul 14 19:18:29 raspberrypi kernel: [ 2220.399260] w1_slave_driver 28-0300a2790a56: Read failed CRC check
> Jul 14 19:18:32 raspberrypi kernel: [ 2222.799236] w1_slave_driver 28-0300a279f0d6: Read failed CRC check
> Jul 14 19:18:33 raspberrypi kernel: [ 2224.399340] w1_slave_driver 28-0300a279dceb: Read failed CRC check
> Jul 14 19:18:36 raspberrypi kernel: [ 2227.679234] w1_slave_driver 28-0300a2790a56: Read failed CRC check
> Jul 14 19:18:38 raspberrypi kernel: [ 2229.209522] w1_slave_driver 28-0300a279f0d6: Read failed CRC check
> ^[[AJul 14 19:18:40 raspberrypi kernel: [ 2231.599209] w1_slave_driver 28-0300a279dceb: Read failed CRC check
> ^C
> pi@raspberrypi:~ $ sudo tail -f /var/log/syslog
> Jul 14 19:18:29 raspberrypi kernel: [ 2220.399260] w1_slave_driver 28-0300a2790a56: Read failed CRC check
> Jul 14 19:18:32 raspberrypi kernel: [ 2222.799236] w1_slave_driver 28-0300a279f0d6: Read failed CRC check
> Jul 14 19:18:33 raspberrypi kernel: [ 2224.399340] w1_slave_driver 28-0300a279dceb: Read failed CRC check
> Jul 14 19:18:36 raspberrypi kernel: [ 2227.679234] w1_slave_driver 28-0300a2790a56: Read failed CRC check
> Jul 14 19:18:38 raspberrypi kernel: [ 2229.209522] w1_slave_driver 28-0300a279f0d6: Read failed CRC check
> Jul 14 19:18:40 raspberrypi kernel: [ 2231.599209] w1_slave_driver 28-0300a279dceb: Read failed CRC check
> Jul 14 19:18:43 raspberrypi kernel: [ 2234.088932] w1_slave_driver 28-0300a2790a56: Read failed CRC check
> Jul 14 19:18:45 raspberrypi kernel: [ 2236.479408] w1_slave_driver 28-0300a279f0d6: Read failed CRC check
> Jul 14 19:18:47 raspberrypi kernel: [ 2238.079441] w1_slave_driver 28-0300a279dceb: Read failed CRC check
> Jul 14 19:18:50 raspberrypi kernel: [ 2241.359210] w1_slave_driver 28-0300a2790a56: Read failed CRC check
> Jul 14 19:18:52 raspberrypi kernel: [ 2242.879519] w1_slave_driver 28-0300a279f0d6: Read failed CRC check
> Jul 14 19:18:54 raspberrypi kernel: [ 2245.279567] w1_slave_driver 28-0300a279dceb: Read failed CRC check
> Jul 14 19:18:57 raspberrypi kernel: [ 2247.759654] w1_slave_driver 28-0300a2790a56: Read failed CRC check
> Jul 14 19:18:59 raspberrypi kernel: [ 2250.159658] w1_slave_driver 28-0300a279f0d6: Read failed CRC check
That says you have 5.5G free out of 12G available to the system (the rest will be the NOOBS partition I expect). Where did you get the 90MB out of 2.4GB from?
Those errors are coming from the 1-Wire code in the kernel. That doesn't look very healthy. Are you still trying to read 1-wire temperatures every couple of seconds? That is not going to work, particularly if you have some dodgy hardware. This looks like the same problem you had in the other thread with the different 1-wire node, with 1-wire reads hanging node-red, either because you are just doing it too fast or/and because there is a hardware problem as suggested by the kernel errors. Try slowing the reads down to every 30 seconds initially and see whether the kernel errors go away, it may be that you have a hardware problem on the 1-wire bus.
I am going to use an Arduino to read the sensor data, rest is going to stay on Pi. Maybe this can help me.
I tried this method. Notification as OK/Cancel. It works. It works on both options. How can I fix it?
Edit: I also didn't use an Arduino. I just put 9 seconds instead of 1, and they work fine. How can I use your PID node for data arriving each 9 seconds? It was working smooth when it was 1 second. I don't know how I can fix that now. Maybe, I could store last 5 values, and see if it is going down or up, then according to that, maybe I could generate my own data, and try to use the PID node this way. I don't know how to do that, but maybe this can be a solution. Probably, you already have a much better one.
The PID node will work with data received at any rate (provided it is not so slow that it becomes impossible to control the process.
Since the reading is every 9 seconds now, it is not smooth. What can I do to solve this? The liquid can heat up fast, if the fans don't work for 9 seconds.
Edit: Also, I couldn't fix the OK/Cancel notification. Both options are shutting down the Pi. Here is the shutdown flow:
[{"id":"b699b242.275aa","type":"ui_button","z":"4cdd06f6.faf528","name":"","group":"843bc78a.c5b078","order":5,"width":0,"height":0,"passthru":false,"label":"Shutdown","tooltip":"","color":"","bgcolor":"","icon":"","payload":" ","payloadType":"str","topic":"Shutdown?","x":650,"y":520,"wires":[["4d82c2f5.fd5f2c"]]},{"id":"4d82c2f5.fd5f2c","type":"ui_toast","z":"4cdd06f6.faf528","position":"dialog","displayTime":"3","highlight":"","sendall":true,"outputs":1,"ok":"Yes","cancel":"No","raw":false,"topic":"","name":"","x":810,"y":520,"wires":[["1415437.5d64bbd"]]},{"id":"1415437.5d64bbd","type":"exec","z":"4cdd06f6.faf528","command":"sudo shutdown -h now","addpay":true,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"","x":1040,"y":520,"wires":[[],[],[]]},{"id":"843bc78a.c5b078","type":"ui_group","z":"","name":"logo","tab":"43cae785.290cd8","order":2,"disp":false,"width":"6","collapse":false},{"id":"43cae785.290cd8","type":"ui_tab","z":"","name":"Home","icon":"dashboard","order":3,"disabled":false,"hidden":false}]
Edit: Carried this question alone to another post. If anyone is interested, here it is:
What speed was it going before? Have you moved the sensor reading to the Arguino?
Put the control loop back to full speed and slow down the output to the dashboard. You can use a Delay node in Rate Limit mode and, very important, select Drop Intermediate Messages.
I didn't use Arduino.
It was 1 second for 4 sensors on the same pin. It kept saying "Connection Lost". I tried 30 seconds and it was perfect four hours. I tried 9, same, works perfectly fine.
I'll try to do it in 1 second, with a delay for 3 seconds between the sensor nodes and the gauges.
Do you mean one reading per second, so each sensor is read every four seconds?
Note that it takes most of a second to read a DS18b20 and during that time the thread will be held up.
I put 9 seconds again and noticed that the PID is working fine actually. So, there is no problem using it like this.
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.