Search found 108 matches

by megamarco83
Mon Jan 20, 2020 10:25 am
Forum: meterN
Topic: meterN 1.0
Replies: 90
Views: 20311

Re: meterN 1.0

hi JM, i updated metern and inside admin page, at log debug i find this errors: PHP Warning: implode(): Argument must be an array in /var/www/metern/scripts/metern.php on line 24 PHP Notice: Undefined variable: LIVEPOOL3 in /var/www/comapps/virtmeter.php on line 453 PHP Warning: exec(): Cannot execu...
by megamarco83
Sun Dec 01, 2019 1:54 pm
Forum: Pulse meters
Topic: espeasy sonoff pulse counter Metern
Replies: 101
Views: 32044

Re: espeasy sonoff pulse counter Metern

hi JM, thanks for patience and reply, but it's not a matter of lazy, but the problem is how to use the wiki, that, for me, are not so clear. i mean, i tested after the timer the command: systemctl list-timers NEXT LEFT LAST PASSED UNIT ACTIVATES Sun 2019-12-01 14:09:00 CET 23min left Sun 2019-12-01 ...
by megamarco83
Sat Nov 30, 2019 8:20 pm
Forum: Pulse meters
Topic: espeasy sonoff pulse counter Metern
Replies: 101
Views: 32044

Re: espeasy sonoff pulse counter Metern

jeanmarc wrote:
Sat Nov 30, 2019 8:23 am
The script will run for a second each 5 minute.
hi JM, thank, but how to check if the script are running?
i try with:
pi@raspberrypi:~ $ pgrep -u root,pi ping_metern.php
pi@raspberrypi:~ $

but i do not see the process, thanks
by megamarco83
Fri Nov 29, 2019 10:40 pm
Forum: Pulse meters
Topic: espeasy sonoff pulse counter Metern
Replies: 101
Views: 32044

Re: espeasy sonoff pulse counter Metern

hi, this is the output with new timer, is it correct? pi@raspberrypi:/var/www/MyScripts $ sudo systemctl enable ping_metern.timer & sudo systemctl start ping_metern.timer [1] 32035 Created symlink /etc/systemd/system/multi-user.target.wants/ping_metern.timer → /etc/systemd/system/ping_metern.timer. ...
by megamarco83
Fri Nov 29, 2019 9:54 pm
Forum: Pulse meters
Topic: espeasy sonoff pulse counter Metern
Replies: 101
Views: 32044

Re: espeasy sonoff pulse counter Metern

hi JM, i tested your php and it seams that now is without errors: pi@raspberrypi:~ $ cd /var/www/MyScripts pi@raspberrypi:/var/www/MyScripts $ php ping_metern.php pi@raspberrypi:/var/www/MyScripts$ but i still have some trubles with systemd: the passages that i used: pi@raspberrypi:/var/www/MyScript...
by megamarco83
Thu Nov 28, 2019 9:07 pm
Forum: Pulse meters
Topic: espeasy sonoff pulse counter Metern
Replies: 101
Views: 32044

Re: espeasy sonoff pulse counter Metern

1) sure ok, but how? :D $remotedata = file_get_contents($domoticzURL On ); because $domoticzURL=http://$domoticzIP:$domoticzPort/json.htm?type=command¶m=switchlight&idx=$signalSwitch&switchcmd= and i need to put " On " at the end 3) Maybe remove After=metern.target in .service try first the pin...
by megamarco83
Thu Nov 28, 2019 7:00 pm
Forum: Pulse meters
Topic: espeasy sonoff pulse counter Metern
Replies: 101
Views: 32044

Re: espeasy sonoff pulse counter Metern

hi JM, thanks for help, but i'm not so good with php and systemd. i create the ping_metern.php in my /var/www/MyScripts/ #!/usr/bin/php <?php if (isset($_SERVER['REMOTE_ADDR'])) { die('Direct access not permitted'); } $domoticzIP='192.168.0.105' $domoticzPort=8085 $signalSwitch=152 $domoticzURL="htt...
by megamarco83
Thu Nov 28, 2019 3:18 pm
Forum: Pulse meters
Topic: espeasy sonoff pulse counter Metern
Replies: 101
Views: 32044

Re: espeasy sonoff pulse counter Metern

hi JM, and using PHP? if i will create a PHP on folder /var/www/MyScripts/ping_metern.php and i want that if metern has an old UTC i turn on a dummy device with this code: http://$domoticzIP:$domoticzPort/json.htm?type=command¶m=switchlight&idx=$signalSwitch&switchcmd=On can you please help me o...
by megamarco83
Mon Nov 25, 2019 4:09 pm
Forum: Pulse meters
Topic: espeasy sonoff pulse counter Metern
Replies: 101
Views: 32044

Re: espeasy sonoff pulse counter Metern

hi JM i'm using this bast script: #!/bin/bash ## ## This script checks the field UTC of mN_LIVEMEMORY.json ## If it is equal for 3 minutes it will send On to the domoticz switch signalSwitch ## if domoticz recognize this switch turned on, domoticz will send a notification at mobile phone. ## ## crea...
by megamarco83
Fri Nov 15, 2019 1:16 pm
Forum: Pulse meters
Topic: espeasy sonoff pulse counter Metern
Replies: 101
Views: 32044

Re: espeasy sonoff pulse counter Metern

hi JM, to know if metern is stuck i'm lookin at: /dev/shm/mN_LIVEMEMORY.json and extract the UTC parameter, if i will find same value for three times in three different minutes i send a notification. now i would like to make some tests, but if i go in admin page and turn off meterN, the file mN_LIVE...