I'm starting with grove sensor and node-RED with my Raspi 3.
I already installed node-RED server. I can connect actually :
DHT11 (temp and humidity)
Ds18b20 (temp)
Relay
remote to my phone
My problem is about moisture sensor, when I use "grove capacitive moisture sensor" node, my server crash and I can see an error on log :
error: command failed : python -u /home/pi/.node-red/node_modules/node-red-contrib-grove-capacitive-moisture-sensor/grove-capacity-moisture-sensor.py 4
at ChildProcess.exithandler (node:child_process:400:12)
at ChildProcess.emit (node:events:513:28)
at maybeClose (node:internal/child_process:1093:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5) { code: 2, killed: false, signal: null, cmd: 'python -u /home/pi/.node-red/node_modules/node-red-contrib-grove-capacitive-moisture-sensor/grove-capacitive-moisture-sensor.py 4'
Sensor is connected to A4 like an analog sensor. I don't understand why doesn't work. I use timestamp on input like other sensor but you 're talking about trigger. Why we must to use trigger for input ? What is the the setup of the trigger ?
What happens if you run that command in an exec node? python -u /home/pi/.node-red/node_modules/node-red-contrib-grove-capacitive-moisture-sensor/grove-capacitive-moisture-sensor.py 4
Make sure you check the error output of the exec node.
Ok, I had same output : command failed. (I used one debug node)
I don't understand why I must to use three debug node on this case !!
After that, I changed file "adc.py" on dist-package on line 57 : self, address = 0x08 (before value was 0x04) on usr/local/lib/python2.7 and now, I have some value on debug node. (one debug node again)
I already do this modification on dist-package for python3.7 but not for python2.7.
So that's a good news. Now if I try with node-red-contrib-capasitive-moisture node, I haven't error on node-red-log but on the debug node I can see : payload : function
The principle use is not for testing, but for calling software from node red. It is common to use it where python software exists for interfacing with hardware, for example.