[weewx-user] Re: Driver crash without logs - Weewx

2020-06-12 Thread vince
On Friday, June 12, 2020 at 12:41:43 AM UTC-7, Florentin Prevost wrote:
>
> At the moment, WLL driver make a request to my WLL each 3 secondes, maybe 
> short ? 
>
>  
Yes, I would say it is far too short.   I would not query it more 
frequently than (max_retries * sleep time) so that you don't get more than 
one query/try/wait/try/wait/try  loop running at the same time.   I would 
recommend once per minute and no faster.

The intent is not to get rapid wind readings.  For that Davis has a way to 
enable UDP broadcasts of wind data, but nobody's driver supports that as 
far as I know.

 

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/2723b7b4-c79a-4b27-9ea1-822ecadb6c51o%40googlegroups.com.


[weewx-user] Re: Driver crash without logs - Weewx

2020-06-12 Thread Florentin Prevost
Hi @vince, 

I just forked your repo to make a change on rain converter because I'm use 
metric unit. That's the one change that I make.

At the moment, WLL driver make a request to my WLL each 3 secondes, maybe 
short ? 

I'm use a private server to host Weewx and make request to my home via my 
router (opened port 80 to my private server only)

I put a line after data = r.json() to see if Weewx attempt to have json 
data. @Jacques told me to put this for try. 

Thank's all for your support. 

Le vendredi 12 juin 2020 04:16:30 UTC+2, vince a écrit :
>
> On Thursday, June 11, 2020 at 5:19:24 PM UTC-7, gjr80 wrote:
>>
>> The thing to remember is that WeeWX tends to go quiet when a driver stops 
>> feeding WeeWX, WeeWX will keep running but largely does nothing. Agree 
>> there's not much to go on so far but o am not familiar with Weatherlink 
>> Live and it's driver.
>>
>>>
>>>
> The driver he's running is a fork of one I wrote for a couple people who 
> haven't reported any problems to date, hence my request for more info.
>
> As background, 'my' driver queries a URL periodically, grabs the JSON, and 
> constructs a packet for weewx to save.  I have multiple users who have not 
> reported any issues, FWIW.   The driver is configurable for:
>
>- which URL to query
>- how often to query
>- how many times to try, with a configurable wait time, and a max 
>retries setting
>- if it fails try-wait-try-wait-try-wait-try (etc) the hope was that 
>it would logerr and raise the error to weewx
>- (and it was written for v3 weewx if that matters)
>
>
> The forked version seems to have added a couple elements and keeps track 
> of rain.  I don't know if the fork has bugs that mine doesn't have (or vice 
> versa).
>
> But if it's failing routinely I would think the normal debugging would 
> apply - run weewx in the foreground and see if it works stably there, etc. 
> etc. etc.
>
> My driver is at 
> https://github.com/vinceskahan/weewx-weatherlinklive-json/blob/master/bin/user/WeatherLinkLiveJSON.py
>  
> if you want to see the code.  It's based on something Matthew wrote, but of 
> course any bugs should be pointed to me for my driver, and to the author of 
> the fork if there are bugs in his/her fork.
>
> Hope this helps.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/a85dffb6-9514-4899-90ca-557fa92659aco%40googlegroups.com.


[weewx-user] Re: Driver crash without logs - Weewx

2020-06-11 Thread vince
On Thursday, June 11, 2020 at 5:19:24 PM UTC-7, gjr80 wrote:
>
> The thing to remember is that WeeWX tends to go quiet when a driver stops 
> feeding WeeWX, WeeWX will keep running but largely does nothing. Agree 
> there's not much to go on so far but o am not familiar with Weatherlink 
> Live and it's driver.
>
>>
>>
The driver he's running is a fork of one I wrote for a couple people who 
haven't reported any problems to date, hence my request for more info.

As background, 'my' driver queries a URL periodically, grabs the JSON, and 
constructs a packet for weewx to save.  I have multiple users who have not 
reported any issues, FWIW.   The driver is configurable for:

   - which URL to query
   - how often to query
   - how many times to try, with a configurable wait time, and a max 
   retries setting
   - if it fails try-wait-try-wait-try-wait-try (etc) the hope was that it 
   would logerr and raise the error to weewx
   - (and it was written for v3 weewx if that matters)


The forked version seems to have added a couple elements and keeps track of 
rain.  I don't know if the fork has bugs that mine doesn't have (or vice 
versa).

But if it's failing routinely I would think the normal debugging would 
apply - run weewx in the foreground and see if it works stably there, etc. 
etc. etc.

My driver is 
at 
https://github.com/vinceskahan/weewx-weatherlinklive-json/blob/master/bin/user/WeatherLinkLiveJSON.py
 
if you want to see the code.  It's based on something Matthew wrote, but of 
course any bugs should be pointed to me for my driver, and to the author of 
the fork if there are bugs in his/her fork.

Hope this helps.

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/b048d99a-f2d7-4167-ac9a-8cd2bcbe2793o%40googlegroups.com.


[weewx-user] Re: Driver crash without logs - Weewx

2020-06-11 Thread gjr80
To be fair the thread is titled 'Driver crash...' and when a driver that is 
polling every few seconds seeming stops responding calling that a driver 
crash seems reasonable.

The thing to remember is that WeeWX tends to go quiet when a driver stops 
feeding WeeWX, WeeWX will keep running but largely does nothing. Agree 
there's not much to go on so far but o am not familiar with Weatherlink 
Live and it's driver.

Gary

On Friday, 12 June 2020 09:23:03 UTC+10, vince wrote:
>
> On Thursday, June 11, 2020 at 10:35:48 AM UTC-7, Florentin Prevost wrote:
>>
>> You've seen in detail the log ?
>> Because i say already 2 times that Weewx stop without log. Look at this 
>> line on below comment :
>
> Jun  8 19:15:07 DRSRV1 weewx[24193] DEBUG urllib3.connectionpool: 
>> http://home.drealine.com:80 "GET /v1/current_conditions HTTP/1.1" 200 
>> None
>>
>> Jun  8 19:16:01 DRSRV1 CRON[1116]: (root) CMD (   
>> /home/check_weewx/watchdog_weewx.sh weewx >> /var/log/syslog)
>>
>> After this request, there are no reports. Need to restart weewx to have 
>> new data from WLL.
>>
>
> Yes I saw the detail.  Yes I read the logs. I'm going to assume English is 
> your second language, as your tone is not very nice.
>
> You have not provided any data showing that weewx itself crashed or 
> stopped.  Your log says it is still running unless I am misreading the 
> words "weewx is still running".  I also see nothing in the log saying you 
> restarted weewx, as the process id in the logs you've provided is the same 
> in every line.
>
> Might you have 'multiple' weewx processes running ?  You probably can't 
> query the Davis gear too often, so it's possible you are just querying too 
> often.
>
> Did you set your query interval to a very short period in weewx.conf ?   
> We'd need to see that too in order to help.  We can't do much with such 
> minimal data to look at.
>
> The next time you think it broke, do a "curl http:/
> home.dreamline.com/v1/current_conditions" and see if the Davis gear 
> answers with a JSON set of data.
>
> Does rebooting the pi help ?
>
> We can't help you if you don't provide more information.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/f30235a3-93cf-4d5c-a688-5cf22dad02c5o%40googlegroups.com.


[weewx-user] Re: Driver crash without logs - Weewx

2020-06-11 Thread vince
On Thursday, June 11, 2020 at 10:35:48 AM UTC-7, Florentin Prevost wrote:
>
> You've seen in detail the log ?
> Because i say already 2 times that Weewx stop without log. Look at this 
> line on below comment :

Jun  8 19:15:07 DRSRV1 weewx[24193] DEBUG urllib3.connectionpool: 
> http://home.drealine.com:80 "GET /v1/current_conditions HTTP/1.1" 200 None
>
> Jun  8 19:16:01 DRSRV1 CRON[1116]: (root) CMD (   
> /home/check_weewx/watchdog_weewx.sh weewx >> /var/log/syslog)
>
> After this request, there are no reports. Need to restart weewx to have 
> new data from WLL.
>

Yes I saw the detail.  Yes I read the logs. I'm going to assume English is 
your second language, as your tone is not very nice.

You have not provided any data showing that weewx itself crashed or 
stopped.  Your log says it is still running unless I am misreading the 
words "weewx is still running".  I also see nothing in the log saying you 
restarted weewx, as the process id in the logs you've provided is the same 
in every line.

Might you have 'multiple' weewx processes running ?  You probably can't 
query the Davis gear too often, so it's possible you are just querying too 
often.

Did you set your query interval to a very short period in weewx.conf ?   
We'd need to see that too in order to help.  We can't do much with such 
minimal data to look at.

The next time you think it broke, do a "curl 
http:/home.dreamline.com/v1/current_conditions" and see if the Davis gear 
answers with a JSON set of data.

Does rebooting the pi help ?

We can't help you if you don't provide more information.

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/c12c6a46-fded-4d6b-b235-2011908cf133o%40googlegroups.com.


[weewx-user] Re: Driver crash without logs - Weewx

2020-06-11 Thread Florentin Prevost
You've seen in detail the log ?
Because i say already 2 times that Weewx stop without log. Look at this line on 
below comment : 

Jun  8 19:15:07 DRSRV1 weewx[24193] DEBUG urllib3.connectionpool: 
http://home.drealine.com:80 "GET /v1/current_conditions HTTP/1.1" 200 None

Jun  8 19:16:01 DRSRV1 CRON[1116]: (root) CMD (   
/home/check_weewx/watchdog_weewx.sh weewx >> /var/log/syslog)

After this request, there are no reports. Need to restart weewx to have new 
data from WLL.

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/0ebcad33-901a-44a9-9110-6f45947bd720o%40googlegroups.com.


[weewx-user] Re: Driver crash without logs - Weewx

2020-06-11 Thread vince
On Thursday, June 11, 2020 at 4:43:09 AM UTC-7, Florentin Prevost wrote:
>
> At Jun  8 19:15:07, the weewx fail and no error appear. It is possible to 
> reload a driver ?


Nothing in the log you provided shows weewx crashing at all.


-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/d337d9ca-69be-4095-9416-d424f19786bfo%40googlegroups.com.


[weewx-user] Re: Driver crash without logs - Weewx

2020-06-11 Thread Florentin Prevost
At Jun  8 19:15:07, the weewx fail and no error appear. It is possible to 
reload a driver ?

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/25d5a67e-2008-48a3-a732-11c342e9dbb1o%40googlegroups.com.


[weewx-user] Re: Driver crash without logs - Weewx

2020-06-11 Thread Florentin Prevost
It crashed any time.

In my last comment, I say that I've no logs but this is :


Jun  8 19:14:04 DRSRV1 weewx[24193] DEBUG urllib3.connectionpool: Starting new 
HTTP connection (1): home.drealine.com:80

Jun  8 19:14:04 DRSRV1 weewx[24193] DEBUG urllib3.connectionpool: 
http://home.drealine.com:80 "GET /v1/current_conditions HTTP/1.1" 200 None

Jun  8 19:14:05 DRSRV1 weewx[24193] DEBUG user.WeatherLinkLiveJSON: Rain this 
period: 0.0

Jun  8 19:14:05 DRSRV1 weewx[24193] DEBUG user.WeatherLinkLiveJSON: Set 
Previous period rain to: 1

Jun  8 19:14:05 DRSRV1 weewx[24193] DEBUG user.WeatherLinkLiveJSON: 
{'dateTime': 1591636445, 'usUnits': 1, 'outTemp': 57.9, 'outHumidity': 76.5, 
'dewpoint': 50.6, 'heatindex': 57.6, 'windchill': 55.7, 'windSpeed': 10.0, 
'windDir': 341, 'windGust': 15.0, 'windGustDir': 325, 'barometer': 30.015, 
'pressure': 29.776, 'rain': 0.0, 'rainRate': 0.0, 'inTemp': 68.6, 'inHumidity': 
54.6, 'inDewpoint': 51.6}

Jun  8 19:14:05 DRSRV1 weewx[24193] INFO weewx.restx: MQTT: Published record 
2020-06-08 19:14:05 CEST (1591636445)

Jun  8 19:14:08 DRSRV1 weewx[24193] DEBUG urllib3.connectionpool: Starting new 
HTTP connection (1): home.drealine.com:80

Jun  8 19:14:08 DRSRV1 weewx[24193] DEBUG urllib3.connectionpool: 
http://home.drealine.com:80 "GET /v1/current_conditions HTTP/1.1" 200 None

Jun  8 19:14:09 DRSRV1 weewx[24193] DEBUG user.WeatherLinkLiveJSON: Rain this 
period: 0.0

Jun  8 19:14:09 DRSRV1 weewx[24193] DEBUG user.WeatherLinkLiveJSON: Set 
Previous period rain to: 1

Jun  8 19:14:09 DRSRV1 weewx[24193] DEBUG user.WeatherLinkLiveJSON: 
{'dateTime': 1591636449, 'usUnits': 1, 'outTemp': 57.9, 'outHumidity': 76.5, 
'dewpoint': 50.6, 'heatindex': 57.6, 'windchill': 55.7, 'windSpeed': 11.0, 
'windDir': 330, 'windGust': 15.0, 'windGustDir': 325, 'barometer': 30.015, 
'pressure': 29.776, 'rain': 0.0, 'rainRate': 0.0, 'inTemp': 68.6, 'inHumidity': 
54.6, 'inDewpoint': 51.6}

Jun  8 19:14:09 DRSRV1 weewx[24193] INFO weewx.restx: MQTT: Published record 
2020-06-08 19:14:09 CEST (1591636449)

Jun  8 19:14:12 DRSRV1 weewx[24193] DEBUG urllib3.connectionpool: Starting new 
HTTP connection (1): home.drealine.com:80

Jun  8 19:14:12 DRSRV1 weewx[24193] DEBUG urllib3.connectionpool: 
http://home.drealine.com:80 "GET /v1/current_conditions HTTP/1.1" 200 None

Jun  8 19:14:13 DRSRV1 weewx[24193] DEBUG user.WeatherLinkLiveJSON: Rain this 
period: 0.0

Jun  8 19:14:13 DRSRV1 weewx[24193] DEBUG user.WeatherLinkLiveJSON: Set 
Previous period rain to: 1

Jun  8 19:14:13 DRSRV1 weewx[24193] DEBUG user.WeatherLinkLiveJSON: 
{'dateTime': 1591636453, 'usUnits': 1, 'outTemp': 57.9, 'outHumidity': 76.5, 
'dewpoint': 50.6, 'heatindex': 57.6, 'windchill': 55.7, 'windSpeed': 6.0, 
'windDir': 337, 'windGust': 15.0, 'windGustDir': 325, 'barometer': 30.015, 
'pressure': 29.776, 'rain': 0.0, 'rainRate': 0.0, 'inTemp': 68.6, 'inHumidity': 
54.6, 'inDewpoint': 51.6}

Jun  8 19:14:13 DRSRV1 weewx[24193] INFO weewx.restx: MQTT: Published record 
2020-06-08 19:14:13 CEST (1591636453)

Jun  8 19:14:16 DRSRV1 weewx[24193] DEBUG urllib3.connectionpool: Starting new 
HTTP connection (1): home.drealine.com:80

Jun  8 19:14:16 DRSRV1 weewx[24193] DEBUG urllib3.connectionpool: 
http://home.drealine.com:80 "GET /v1/current_conditions HTTP/1.1" 200 None

Jun  8 19:14:17 DRSRV1 weewx[24193] DEBUG user.WeatherLinkLiveJSON: Rain this 
period: 0.0

Jun  8 19:14:17 DRSRV1 weewx[24193] DEBUG user.WeatherLinkLiveJSON: Set 
Previous period rain to: 1

Jun  8 19:14:17 DRSRV1 weewx[24193] DEBUG user.WeatherLinkLiveJSON: 
{'dateTime': 1591636457, 'usUnits': 1, 'outTemp': 57.8, 'outHumidity': 76.5, 
'dewpoint': 50.5, 'heatindex': 57.5, 'windchill': 55.6, 'windSpeed': 8.0, 
'windDir': 325, 'windGust': 15.0, 'windGustDir': 325, 'barometer': 30.012, 
'pressure': 29.773, 'rain': 0.0, 'rainRate': 0.0, 'inTemp': 68.6, 'inHumidity': 
54.6, 'inDewpoint': 51.6}

Jun  8 19:14:17 DRSRV1 weewx[24193] INFO weewx.restx: MQTT: Published record 
2020-06-08 19:14:17 CEST (1591636457)

Jun  8 19:14:17 DRSRV1 weewx[24193] INFO weewx.manager: Added record 2020-06-08 
19:14:00 CEST (1591636440) to database 'weewx'

Jun  8 19:14:17 DRSRV1 weewx[24193] INFO weewx.manager: Added record 2020-06-08 
19:14:00 CEST (1591636440) to daily summary in 'weewx'

Jun  8 19:14:17 DRSRV1 weewx[24193] DEBUG weewx.reportengine: Running reports 
for latest time in the database.

Jun  8 19:14:17 DRSRV1 weewx[24193] DEBUG urllib3.connectionpool: Starting new 
HTTP connection (1): home.drealine.com:80

Jun  8 19:14:17 DRSRV1 weewx[24193] INFO weewx.restx: MQTT: Published record 
2020-06-08 19:14:00 CEST (1591636440)

Jun  8 19:14:17 DRSRV1 weewx[24193] DEBUG weewx.reportengine: Report 
'StandardReport' not enabled. Skipping.

Jun  8 19:14:17 DRSRV1 weewx[24193] DEBUG weewx.reportengine: Running report 
'Belchertown'

Jun  8 19:14:17 DRSRV1 weewx[24193] DEBUG weewx.reportengine: Found 
configuration file /etc/weewx/skins/Belchertown/skin.conf for report 
'Belchertown'

Jun  8 19:

[weewx-user] Re: Driver crash without logs - Weewx

2020-06-11 Thread Jacques Terrettaz
Hi Florentin,

Could you please set debug=1 in weewx.conf, restart weewx and share the log 
file produced during  the start and at least the first  3 minutes ? 

Le jeudi 11 juin 2020 08:55:00 UTC+2, Florentin Prevost a écrit :
>
> Hi,
>
> I'm use the prepackaged of weewx 4.1.1 on python3.
>
> The problem was that the driver not sent a get request but there are no 
> log on syslog when it fail. Also, when it fail, weewx not reports each 1min 
> (it's my archive interval).
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/44e4a544-1ba9-4d8f-9e0b-5c638cc583d1o%40googlegroups.com.


[weewx-user] Re: Driver crash without logs - Weewx

2020-06-10 Thread Florentin Prevost
Hi,

I'm use the prepackaged of weewx 4.1.1 on python3.

The problem was that the driver not sent a get request but there are no log on 
syslog when it fail. Also, when it fail, weewx not reports each 1min (it's my 
archive interval).

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/e1473f82-498f-4d56-8663-05552c587af2o%40googlegroups.com.


[weewx-user] Re: Driver crash without logs - Weewx

2020-06-09 Thread vince
On Tuesday, June 9, 2020 at 2:26:06 PM UTC-7, Florentin Prevost wrote:
>
> I'm use this driver and sometimes, it happen that the driver crash and 
> they are no logs in /var/log/syslog. 
>
> I use this : 
> https://github.com/Drealine/weewx-weatherlinklive-json/tree/patch-1
>
> The driver send a request each 3 seconds. It is possible to check if a 
> driver fail and restart it ?
>  
>
At the moment, I restart weewx each 5 minutes to prevent lost data if the 
> driver fail. 
>
>
You'd have to ask the driver author, but you'll need to provide more 
information.  Which version of weewx, what is your os, are you using the 
setup.py or pre-packaged weewx, are you using python2 or python3, etc.. 

You should never have a driver crash 'or' need to restart weewx ever, but 
bugs happen.   Turn debug=1 on in your weewx.conf and restart weewx for 
starters.

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/a0ffcbc3-b963-480b-8be2-6b2a9eb4eeffo%40googlegroups.com.