Search found 89 matches

by megamarco83
Fri Nov 15, 2019 1:16 pm
Forum: Pulse meters
Topic: espeasy sonoff pulse counter Metern
Replies: 84
Views: 16819

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...
by megamarco83
Thu Nov 14, 2019 10:05 pm
Forum: Pulse meters
Topic: espeasy sonoff pulse counter Metern
Replies: 84
Views: 16819

Re: espeasy sonoff pulse counter Metern

So, is it fixed now ? :shifty: hi, the part of metern that become stuck when req_espeasy.php is not responding seams to be solved, i mean that i never find till now metern stuck...:-) the part of implementing "ping" of metern to discover if metern is stuck are on going. a friend of mine is help me ...
by megamarco83
Mon Nov 11, 2019 9:33 pm
Forum: Pulse meters
Topic: espeasy sonoff pulse counter Metern
Replies: 84
Views: 16819

Re: espeasy sonoff pulse counter Metern

I'll look later on to avoid getting stuck if a com app don't respond. First time it happen to me.. more /dev/shm/mN_LIVEMEMORY.json {"UTC":1573502999,"Conso1":"228","Gas2":"<font color='#8B0000'>Off<\/font>","Water3":"0","Prod4":"0","EIMP5":"226.9","EE XP6":"0","eselfc7":"0"} UTC is time stamp in e...
by megamarco83
Mon Nov 11, 2019 8:42 pm
Forum: Pulse meters
Topic: espeasy sonoff pulse counter Metern
Replies: 84
Views: 16819

Re: espeasy sonoff pulse counter Metern

Hard to tell if mN is stuck with a ping, the solution would be to look if time stamp is late in /dev/shm/mN_LIVEMEMORY.json. That say : mN is stable, if a problem arise it should be a com app. About 644, it mean that the user who run it (root) can write, the other can only reads. So please chmod an...
by megamarco83
Mon Nov 11, 2019 7:42 pm
Forum: Pulse meters
Topic: espeasy sonoff pulse counter Metern
Replies: 84
Views: 16819

Re: espeasy sonoff pulse counter Metern

Ok one problem at the time ;) Your script is correct but that better to put 'set_time_limit' on top <?php set_time_limit(20); ... ok, i correct the script, thanks for suggestion! If req_espeasy don't respond it should end up with an error instead of waiting. ok, i will test it from now on.... RpiNo...
by megamarco83
Mon Nov 11, 2019 6:49 pm
Forum: Pulse meters
Topic: espeasy sonoff pulse counter Metern
Replies: 84
Views: 16819

Re: espeasy sonoff pulse counter Metern

Hi, You have sudo: command not found ? Did you do a ln -s /srv/http/pathto/pingtester.php /usr/bin/pingtester ? i'm logged in putty with "pi" so i used: sudo ln -s /var/www/pathto/pingtester.php /usr/bin/pingtester So ok, req_espeasy is stuck and mN hold and waiting a return. :idea: I believe the s...
by megamarco83
Mon Nov 11, 2019 11:43 am
Forum: Pulse meters
Topic: espeasy sonoff pulse counter Metern
Replies: 84
Views: 16819

Re: espeasy sonoff pulse counter Metern

Hi, You should run as pi@raspberrypi:/var/www/comapps $ sudo pingtester -start & [1] 13243 13243 is then the process id, please read some tutorials to understand Linux basis (no offence there) :angel: The pingertester is a infinity loop, it check each 5 min if the device respond, you may see the pr...
by megamarco83
Sun Nov 10, 2019 12:06 am
Forum: Pulse meters
Topic: espeasy sonoff pulse counter Metern
Replies: 84
Views: 16819

Re: espeasy sonoff pulse counter Metern

just add #!/usr/bin/php in top of the script #!/usr/bin/php <?php ... that's my pingertester.php: #!/usr/bin/php <?php // A simple script to ping a device then do a command // ln -s /var/www/comapps/pingtester.php /usr/bin/pingtester and chmod +x pingtester.php $ip = '192.168.0.105'; $docmd = '/usr...
by megamarco83
Sat Nov 09, 2019 6:55 pm
Forum: Pulse meters
Topic: espeasy sonoff pulse counter Metern
Replies: 84
Views: 16819

Re: espeasy sonoff pulse counter Metern

I come up with this, use pingtester -start & <?php // A simple script to ping a device then do a command // ln -s /srv/http/comapps/pingtester.php /usr/bin/pingtester and chmod +x pingtester.php $ip = '192.168.0.1'; $docmd = '/usr/bin/curl http://localhost/metern/scripts/bootmn.php'; function pingD...
by megamarco83
Sat Nov 09, 2019 6:43 pm
Forum: Pulse meters
Topic: espeasy sonoff pulse counter Metern
Replies: 84
Views: 16819

Re: espeasy sonoff pulse counter Metern

BTW, there is a "Warn connection lost" in mN, you should get notify if your esp don't respond. I guess it could happen that one of your com app is stuck and mN is waiting. If the app is well writed it should quit after a moment, in req_espeasy.php i put a CONNECTTIMEOUT_MS to 3 sec. You may also tr...