Ok, I'm going somewhere. The thing that was wrong was what I already suspect, the unclear naming of isrcounter and isrcounter1 from within the scripts.
I'm able to directly start the script from within "usr/local/bin" and it reacts on my sensor.
But when I tried to start the isrcounter start/stop script I got an error of the creation of the log file. This is because the script is executed as pi and the pi user has no write access to the "var/log" folder. Is this correct?
So I created a isrcounter logfile by doing the following.
Code: Select all
sudo touch /var/log/isrcounter
sudo chmod 666 /var/log/isrcounter
But now again when I do
I get no reaction.
But
Code: Select all
sudo /etc/init.d/isrcounter status
Gives
Code: Select all
[FAIL] isrcounter is not running ... failed!
I'm also missing some info about the following:
hansrune wrote:Step 5: Wire your input signal, and optionally the feedback output
What is what? I think
#define OUT_PIN 0 → "LED"
#define IN_PIN 1 → "Sensor"
hansrune wrote:
Step 6: Under Domoticz application settings, adjust the number of pulses and costs per unit of consumption
I think this is not the number of pulses but the number of digits. For example if you want to display kW instead of W, the number of pulses is initiated by the sensor. But the script has to do something with these pulses, so there needs to be a factor that raises a number after a certain pulses. But I can't find this factor.
hansrune wrote:
One of the nice features is that you can adjust the displayed value to match your real meter reading. Stop the isrcounter service first.
If your meter reads 128192 and there are 500 pulses per unit, do this:
CODE: SELECT ALL
expr 128192 '*' 500 > /var/log/isrcounter1