Nonzerotime after few days empty?

This section covers the Meteobridge PRO units exclusively

Moderator: Mattk

User avatar
WS Grave
Expert Boarder
Expert Boarder
Posts: 90
Joined: Fri Oct 30, 2009 3:42 pm
Location: Grave - the Netherlands
Contact:

Nonzerotime after few days empty?

Post by WS Grave » Wed Jul 17, 2019 9:39 am

Goodmorning, since a few months I have a Meteobridge Pro Red with my new weatherstation (VP2).
I'm creating my own templates for my website and I would like to use the tags [rain0total-nonzerotime:--] and/or [rain0rate-nonzerotime:--] and they do work, a few days, but after those 1,2 or 3 days I see only the "--" instead of the date.
Is that how it should be or should I be able to see the last time it rained even after a few weeks or so!??

Thanks a lot for your reply 👍

weatherist34
Gold Boarder
Gold Boarder
Posts: 171
Joined: Tue Mar 28, 2017 6:57 am
Contact:

Re: Nonzerotime after few days empty?

Post by weatherist34 » Sun Sep 08, 2019 8:20 am

did you a get response because i cant quite make it work and get same as you .have updated to version 4 now 4.1 still same result two days later it returns - - ...

User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 5879
Joined: Mon Oct 01, 2007 10:51 pm

Re: Nonzerotime after few days empty?

Post by admin » Sun Sep 08, 2019 12:31 pm

Problem is that "nonzerotime" is not made persistent over logger restarts. So when the logger process restarts because of a larger data gap or because you change something logger related on the web interface, then reference data is lost. I will think about this. A solution that survives a restart of the logger might be easy to do, one that survives a reboot is a harder challenge.

User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 5879
Joined: Mon Oct 01, 2007 10:51 pm

Re: Nonzerotime after few days empty?

Post by admin » Sun Sep 08, 2019 1:16 pm

In just release update I made the "nonzerotime" selector surviving a restart of the logger process. After a process restart it will need the respective sensor to be initialized by getting some data from the station before it can report on "nonzerotime".

weatherist34
Gold Boarder
Gold Boarder
Posts: 171
Joined: Tue Mar 28, 2017 6:57 am
Contact:

Re: Nonzerotime after few days empty?

Post by weatherist34 » Sun Sep 08, 2019 2:37 pm

admin wrote:
Sun Sep 08, 2019 1:16 pm
In just release update I made the "nonzerotime" selector surviving a restart of the logger process. After a process restart it will need the respective sensor to be initialized by getting some data from the station before it can report on "nonzerotime".
hello boris

so let me understand lets say i update now the nonzerotime will be effective or generate a timestamp from the next rain event we get or
my last rain event here was 21st august will it detect that . sorry for the questions just been confused on this for months . brian

weatherist34
Gold Boarder
Gold Boarder
Posts: 171
Joined: Tue Mar 28, 2017 6:57 am
Contact:

Re: Nonzerotime after few days empty?

Post by weatherist34 » Sun Sep 08, 2019 3:12 pm

ok i updated 8th September 4.1-2424 and went out poured a bit of water into the cone to generate 0.2mm ,
it now generates timestamp i can edit out after a few days so lets see if it picks up the [rain0total-nonzerotime:--] as of todays timestamp 20190908155729 so lets see if it remains there in a 2 or 3 days as what use to happen it would revert back to -- .

screenshot shows with the orange dots ..brian
Screenshot at Sep 08 16-04-25.png
Screenshot at Sep 08 16-04-25.png (39.66 KiB) Viewed 135 times

weatherist34
Gold Boarder
Gold Boarder
Posts: 171
Joined: Tue Mar 28, 2017 6:57 am
Contact:

Re: Nonzerotime after few days empty?

Post by weatherist34 » Wed Sep 11, 2019 3:35 pm

hello boris unfortunately that didnt work after 3 days exactly no timestamp is returned only —

so i dont how else to return a last rainfall date with a valid timestamp

brian

User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 5879
Joined: Mon Oct 01, 2007 10:51 pm

Re: Nonzerotime after few days empty?

Post by admin » Wed Sep 11, 2019 4:07 pm

Could you please post the result of

Code: Select all

http://ip-of-my-meteobridge/cgi-bin/system.cgi?ls -la /var/run/meteohub/

weatherist34
Gold Boarder
Gold Boarder
Posts: 171
Joined: Tue Mar 28, 2017 6:57 am
Contact:

Re: Nonzerotime after few days empty?

Post by weatherist34 » Wed Sep 11, 2019 4:22 pm

admin wrote:
Wed Sep 11, 2019 4:07 pm
Could you please post the result of

Code: Select all

http://ip-of-my-meteobridge/cgi-bin/system.cgi?ls -la /var/run/meteohub/
command: ls -la /var/run/meteohub/
-------------
drwxr-xr-x 2 root root 460 Sep 8 15:57 .
drwxr-xr-x 5 root root 640 Sep 11 17:22 ..
-rw-r--r-- 1 root root 10 Sep 11 17:22 logger.dat
-rw-r--r-- 1 root root 10 Sep 11 17:22 nonzerotime-data10num
-rw-r--r-- 1 root root 10 Sep 11 17:22 nonzerotime-data11num
-rw-r--r-- 1 root root 10 Sep 11 17:22 nonzerotime-data12num
-rw-r--r-- 1 root root 10 Sep 11 17:22 nonzerotime-data13num
-rw-r--r-- 1 root root 10 Sep 11 17:22 nonzerotime-data15num
-rw-r--r-- 1 root root 10 Sep 11 17:22 nonzerotime-data16num
-rw-r--r-- 1 root root 10 Sep 8 15:57 nonzerotime-rain0total
-rw-r--r-- 1 root root 10 Sep 11 17:21 nonzerotime-th0dew
-rw-r--r-- 1 root root 10 Sep 11 17:21 nonzerotime-th0heatindex
-rw-r--r-- 1 root root 10 Sep 11 17:21 nonzerotime-th0hum
-rw-r--r-- 1 root root 10 Sep 11 17:21 nonzerotime-th0temp
-rw-r--r-- 1 root root 10 Sep 11 17:21 nonzerotime-thb0dew
-rw-r--r-- 1 root root 10 Sep 11 17:21 nonzerotime-thb0hum
-rw-r--r-- 1 root root 10 Sep 11 17:21 nonzerotime-thb0press
-rw-r--r-- 1 root root 10 Sep 11 17:21 nonzerotime-thb0seapress
-rw-r--r-- 1 root root 10 Sep 11 17:21 nonzerotime-thb0temp
-rw-r--r-- 1 root root 10 Sep 11 17:22 nonzerotime-wind0avgwind
-rw-r--r-- 1 root root 10 Sep 11 17:22 nonzerotime-wind0chill
-rw-r--r-- 1 root root 10 Sep 11 17:22 nonzerotime-wind0dir
-rw-r--r-- 1 root root 10 Sep 11 17:22 nonzerotime-wind0wind
-------------

this the string used [rain0total-nonzerotime:--] in the API
Last edited by weatherist34 on Wed Sep 11, 2019 4:28 pm, edited 1 time in total.

User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 5879
Joined: Mon Oct 01, 2007 10:51 pm

Re: Nonzerotime after few days empty?

Post by admin » Wed Sep 11, 2019 4:28 pm

Fine, so the data is there. Could you please give this command, so that we see epoch time of last rain event:

Code: Select all

...system.cgi?cat /var/run/meteohub/nonzerotime-rain0total

weatherist34
Gold Boarder
Gold Boarder
Posts: 171
Joined: Tue Mar 28, 2017 6:57 am
Contact:

Re: Nonzerotime after few days empty?

Post by weatherist34 » Wed Sep 11, 2019 4:33 pm

it doesnt now return a timestamp at exactly 15:57 today it now returns only - -

prior to that it would return 20190908155729

the string used to call is [rain0total-nonzerotime:--]

weatherist34
Gold Boarder
Gold Boarder
Posts: 171
Joined: Tue Mar 28, 2017 6:57 am
Contact:

Re: Nonzerotime after few days empty?

Post by weatherist34 » Wed Sep 11, 2019 4:36 pm

admin wrote:
Wed Sep 11, 2019 4:28 pm
Fine, so the data is there. Could you please give this command, so that we see epoch time of last rain event:

Code: Select all

...system.cgi?cat /var/run/meteohub/nonzerotime-rain0total
command: /cat/var/run/meteohub/nonzerotime-rain0total
-------------
/www/cgi-bin/system.cgi: line 22: /cat/var/run/meteohub/nonzerotime-rain0total: not found
-------------

User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 5879
Joined: Mon Oct 01, 2007 10:51 pm

Re: Nonzerotime after few days empty?

Post by admin » Wed Sep 11, 2019 4:39 pm

It needs to be "cat /var/..." not "/cat/var/..."

weatherist34
Gold Boarder
Gold Boarder
Posts: 171
Joined: Tue Mar 28, 2017 6:57 am
Contact:

Re: Nonzerotime after few days empty?

Post by weatherist34 » Wed Sep 11, 2019 4:40 pm

command: /cat /var/run/meteohub/nonzerotime-rain0total
-------------
/www/cgi-bin/system.cgi: line 22: /cat: not found

User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 5879
Joined: Mon Oct 01, 2007 10:51 pm

Re: Nonzerotime after few days empty?

Post by admin » Wed Sep 11, 2019 4:43 pm

you are nearly there... please "cat" instead of "/cat" :D

Post Reply