Answers/comments below.

Gary

On Monday, 3 August 2020 13:05:31 UTC+10, galfert wrote:
>
> If you only have one GW1000 is there an advantage to still specifying the 
> IP address in weewx.conf? 


Only in as much as it will save half a second during initialisation.
 

> I'm wondering if specifying the IP address allows for more timely data 
> access, as the driver doesn't need to find the GW1000. Also once the GW1000 
> is found by 'auto' setting, how long does it keep that found address set 
> for? 
>

Not really, refer to my previous comment. The GW1000 is discovered once 
during initialisation and the (chosen) IP address retained.

What happens if the DHCP sever decides to renew the GW1000 IP address with 
> a different IP address, like for example the GW1000 gets restarted and it 
> ends up with a new IP address but WeeWX never stopped running? Is there a 
> potential to lose the GW1000 connection if 'auto' is used if the IP address 
> changes unexpectedly? Or does the driver only search for a new IP address 
> if there is no response from the previous found IP address?
>

If the GW1000 is allocated a different address by DHCP for some reason then 
at present the connection to the GW1000 will be lost until WeeWX is 
restarted/reloaded. 

In short what is the programmed logic behind finding, using, and finding 
> again if needed a GW1000 if set to 'auto'?
>

At the moment it is very basic, unless an IP address is specified by the 
user a one off discovery occurs and an IP address chosen, retained and used 
until WeeWX restart/reload. 

Perhaps there is a better way than this below logic...but in my likely 
> short sighted view I would expect for the 'auto' setting the following 
> behavior (I think).
> - Search for IP and continue to search indefinitely until GW1000 found
> - Store IP address of found GW1000
> - Repeatedly Continue querying GW1000 for data using found IP address 
> unless no response to weather data request occurs
> - If no response from found IP address then go back to search again for IP 
> address
>

Yes, there certainly is a better way of doing things. It was always my 
intent that something would be done if contact with the GW1000 was lost, 
exactly what that is I don't know and it was something I planned to tackle 
later. I am hesitant to have the driver continually search for a device, I 
would much rather have the driver conduct a search limited in time or 
attempts and then hand things back to WeeWX for WeeWX to make the decision 
whether to continue or exit (WeeWX has some logic/controls built in to it 
to handle stations that don't respond/lose connectivity). But that is yet 
to be determined implementation detail.

>
> If that in fact in the logic then using 'auto' or configuring a static IP 
> in weewx.conf probably doesn't matter and it doesn't really add overhead to 
> the system looking for a GW1000...unless one is never found. But if setting 
> it to 'auto' somehow makes it so that it often (every 5 minutes or some 
> other interval) or perhaps before every new weather data request is 
> received it needs to be checked for what IP address to query then that to 
> me seems like overhead that probably could better be avoided by just using 
> a static IP in the weewx.conf.
>

If anything auto will cause a new discovery upon a timeout occurring when 
the driver tries to obtain data from the GW1000, there will be no 
regular/scheduled connectivity check, other than checking that a response 
is received to any command from driver to GW1000. But that is something the 
driver does already anyway.


> On Sunday, August 2, 2020 at 10:33:47 PM UTC-4 gjr80 wrote:
>
>> Hi Bill,
>>
>> Yes that will cause problems. I have two GW1000 on my network and the 
>> when run as a driver/service the ip_address setting has always been 
>> honoured in my testing. Running the driver directly is a little different, 
>> I thought i had coded the driver such that it would take the IP address 
>> from weewx.conf or the command line, seems I never included weewx.conf and 
>> it was being ignored. b9 and earlier exhibited the following behaviour:
>>
>>    - when run as a driver/service as part of a running WeeWX install:
>>
>>
>>    1. if an IP address is specified at [GW1000] ip_address that IP 
>>       address is used
>>       2. if [GW1000] ip_address is 'auto' or the setting is omitted the 
>>       driver searches for GW1000 on the local network and uses the address 
>> of the 
>>       first GW1000 that responds
>>    
>>
>>    - when run directly:
>>
>>
>>    1. if --ip is specified  on the command line that IP address is used
>>       2. if --ip is not specified on the command line the driver 
>>       searches for GW1000 on the local network and uses the address of the 
>> first 
>>       GW1000 that responds
>>    
>> Under b10 the behaviour will change when run directly:
>>
>>    1. if --ip is specified  on the command line that IP address will be 
>>    used
>>    2. if --ip is not specified on the command line weewx.conf is checked 
>>    and [GW1000] ip_address will be used if set
>>    3. if --ip is not specified on the command line and there is nothing 
>>    under [GW1000] in weewx.conf the driver searches for GW1000 on the 
>>    local network and uses the address of the first GW1000 that responds
>>
>> The behaviour when run as part of a running WeeWX install will not change.
>>
>> Gary
>>
>> On Sunday, 2 August 2020 13:09:34 UTC+10, Bill Arthur wrote:
>>>
>>> Hi Gary,
>>> I believe I found my problem. Sorry to have caused any confusion.
>>> After I ran wee_install I saw the GW1000 stanzas at the end of 
>>> weewx.conf and I falsely assumed it was configured.
>>> I had a ton of problems because I didn't run wee_config.
>>>
>>> On Saturday, August 1, 2020 at 12:41:19 AM UTC-5 Bill Arthur wrote:
>>>
>>>> Hi Gary,
>>>> I wasn't able to make time to get the logs tonight. I'll try again 
>>>> tomorrow.
>>>> But I did test running the driver directly. I have three GW-1000s, 
>>>> 192.168.0.104, 204 and 205.
>>>> Out of ten runs it chooses 204 four times, 205 four times and 104 two 
>>>> times.
>>>>
>>>> # Options for extension 'GW1000'                                        
>>>>                                                 
>>>> [Accumulator]                                                          
>>>>                                                      
>>>> [[lightning_strike_count]]                                              
>>>>                                                     
>>>> extractor = sum                                                        
>>>>                                                   
>>>> [[lightning_last_det_time]]                                            
>>>>                                                      
>>>> extractor = last                                                        
>>>>                                                                            
>>>>  
>>>>                                                                            
>>>>  
>>>>         
>>>> ##############################################################################
>>>>   
>>>>                                                                            
>>>>  
>>>>                                                                            
>>>>  
>>>>         
>>>> # Options for extension 'GW1000'                                        
>>>>                                                
>>>>  [GW1000]                                                              
>>>>                                                      
>>>>  driver = user.gw1000                                                  
>>>>                                                   
>>>> ip_address = 192.168.0.104                                              
>>>>                                                                            
>>>>  
>>>>                                                                            
>>>>  
>>>>             
>>>> ####################################
>>>>
>>>> On Friday, July 31, 2020 at 4:21:43 PM UTC-5 gjr80 wrote:
>>>>
>>>>> Bill,
>>>>>
>>>>> Does this occur every time or occasionally? Could you post your 
>>>>> [GW1000] stanza, the output from my previous post should contain 
>>>>> everything 
>>>>> else I need to troubleshoot this issue.
>>>>>
>>>>> Gary
>>>>>
>>>>>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/bf53dec7-9cac-4a31-a196-64ec5a3284c0o%40googlegroups.com.

Reply via email to