After I have changed the content I get this issue:
bh1750@0.0.3 test /home/pi/pimatic-app/node_modules/pimatic-bh1750/node_modules/bh1750
echo "Error: no test specified"
Error: no test specified
Error with i2c, BH1750 Error after about 4 years
After I have changed the content I get this issue:
bh1750@0.0.3 test /home/pi/pimatic-app/node_modules/pimatic-bh1750/node_modules/bh1750
echo "Error: no test specified"
Error: no test specified
"Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect." 09-28-2003, LINUS TORVALDS (http://www.nytimes.com)
I think I started it from this directory.
pi@rpi_strech:~/pimatic-app/node_modules/pimatic-bh1750/node_modules/bh1750 $ npm test
> bh1750@0.0.3 test /home/pi/pimatic-app/node_modules/pimatic-bh1750/node_modules/bh1750
> echo "Error: no test specified"
Error: no test specified
pi@rpi_strech:~/pimatic-app/node_modules/pimatic-bh1750/node_modules/bh1750 $
I currently have this content in the Index.js
var console = require('console');
var BH1750 = require('../bh1750');
var light = new BH1750();
light.readLight(function(err, value){
if (err) {
console.log("light error: " + err);
throw err;
} else {
console.log("light value is: ", value, "lx");
}
});
"Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect." 09-28-2003, LINUS TORVALDS (http://www.nytimes.com)
The the sub directory example exist for me. And also the file.
pi@rpi_strech:~/pimatic-app/node_modules/pimatic-bh1750/node_modules/bh1750/example $ ls
index.js index.js.old
"Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect." 09-28-2003, LINUS TORVALDS (http://www.nytimes.com)
That doesn’t work for me either
pi@rpi_strech:~/pimatic-app/node_modules/pimatic-bh1750/node_modules/bh1750 $ node /example/index.js
module.js:327
throw err;
^
Error: Cannot find module '/example/index.js'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Function.Module.runMain (module.js:441:10)
at startup (node.js:139:18)
at node.js:990:3
"Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect." 09-28-2003, LINUS TORVALDS (http://www.nytimes.com)
Now I have an issue
light value is: undefined lx
Although the sensor still seems to work at the moment.
At least what pimatic shows me.
"Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect." 09-28-2003, LINUS TORVALDS (http://www.nytimes.com)
and when you try this several times, sometimes there will be a value.
This looks like the problem you started with
Now you should do the short wire test (4 jump wires of 10-20 cm) with this command.
even after several attempts I get the same issue.
"short wire test"
should I test it again with a very short cable?
"Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect." 09-28-2003, LINUS TORVALDS (http://www.nytimes.com)
I guess I’ll have to continue this tomorrow. I’m starting to get into trouble with my wife. A lot of apologies, I’m really glad you helped. Maybe we can pick up where we left off tomorrow.
"Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect." 09-28-2003, LINUS TORVALDS (http://www.nytimes.com)
Hi @bertreb
I’m sorry I didn’t get back to you about this problem until today. My bh1750 in the garden house (outside) is still running, for whatever reason, without any errors. I did not dare to take the sensor off the cable again 😊.
But in the meantime I found this:
https://www.aliexpress.com/i/32917381873.html
With two of these blue modules I could amplify the long cable of the I2C, couldn’t I?
That would have solved the problem?
Maybe you could even use the GPIOs on the remote module! But for that I surely lack the necessary knowledge. A plugin would be nice for that, because I have to google a lot for a script myself. 🤔
I once ordered two of these blue PCF8574. Unfortunately it will probably take some time until I get them. In China people have to fight with this virus, the normal life has probably come to a standstill. In addition, many airlines no longer fly to China, or only to a limited extent. But, I can wait.
"Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect." 09-28-2003, LINUS TORVALDS (http://www.nytimes.com)
Hi, thats good news.
The power and communication over longer lines it always tricky.
Mostly in error sensitive communications data redundancy is added (CRC, etc) to detect and restore data. But these technologies need better and more expensive hard/software.
The repeater devices you ordered could help, but its means also more building and maintaining. Did you think of wifi or ism based wireless devices?
NodeMCU, Pi Zero, etc can do wifi, read locally sensors and used mqtt for data transfer.
You could still use the cable to feed the power (with like 9-12v in and a 3.3 voltage regulator at the sensor). Existing plugins can handle that.
It’s been my experience that everything on the radio is a little unstable. Any influences are quickly effective. And also because the connection to the GartenHaus must bridge about 15 meters. Ok, outside the transmission connects better, for example Wifi. For a good radio transmission I would also have to have external outside antennas. The cable is already installed.
If it would work with this amplifier module, I would be very happy with it. I hope it is the best solution for me. If it ran.
But first wait until I have it, and hope that my current light sensor will continue and not fail again.
"Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect." 09-28-2003, LINUS TORVALDS (http://www.nytimes.com)