everything works and I can control my light with my 433 MHz Transmitter.
But now I want to add the Temperatur/Humidity Sensor.
So I added that to my code:
var sensorLib = require('node-dht-sensor');
var sensorType = 11;
var sensorPin = 4;
if (!sensorLib.initialize(sensorType, sensorPin)) {
console.warn('Failed to initialize sensor');
process.exit(1);
}
setInterval(function() {
var readout = sensorLib.read();
blynk.virtualWrite(2, readout.temperature.toFixed(1));
blynk.virtualWrite(3, readout.humidity.toFixed(1));
console.log('Temperature:', readout.temperature.toFixed(1) + 'C');
console.log('Humidity: ', readout.humidity.toFixed(1) + '%');
}, 2000);
So now the Sensor works and I can see the Temperatur/Humidity in my App.
But when I use my button for the light now, nothing happen and no error or something else.
I added an console.log at the if in my v1.on and the text is written when I use my button, but the light don’t turn on…
There is a problem between the sudo and the SteuerungA 1/0.
But why? :S
I do not see how using an elevated root process can prevent your child process from running… but then that is a Linux issue and not something we can really do much about here in a Blynk forum. Try asking around on various Linux forums.
All I can suggest otherwise is to try breaking down your sketch, or using a smaller test sketch, just controlling the light, and compare with all your available variants… sudo, not sudo, Blynk, not Blynk, alternate ways of controlling the light (e.g. direct JS code instead of what appears to be a Python sub-process), double checking path and user access, various combos of each, etc and so on.