@gjr80
many thanks for your very extensive explanation. I change 'loop_on_init' to 
true. Think that will work probably. W'll try later. Test was simple: close 
port on WiFi router. 

It could be helpful if there was a hint in 'readme.txt' for use of 
different subnet. 

regards
Jochen



gjr80 schrieb am Freitag, 10. September 2021 um 03:57:52 UTC+2:

> It's probably worthwhile outlining how the GW1000 driver communicates with 
> the GW1000 (when I refer here to GW1000 I mean GW1000 or GW1100) and what 
> happens when the GW1000 does not respond.
>
> The GW1000 driver can communicate with a GW1000 via (1) an IP address and 
> port number or (2) network broadcast. When the driver is loaded during 
> WeeWX startup if no IP address or no port number is provided in the 
> weewx.conf driver config stanza the driver will to attempt to obtain the 
> missing data via a network broadcast. If the GW1000 is on a different 
> sub-net to the WeeWX machine then the broadcast will not be received by the 
> GW1000 concerned (so if using a GW1000 on a different sub-net you must 
> specify an IP address and port number for the GW1000 in weewx.conf).
>
> The process for lost contact is a little more complex. If no response is 
> received to a command sent to the GW1000 the same command is re-sent a 
> further two times (the default is to make three attempts before declaring 
> lost contact) with a default delay of 10 seconds between each attempt 
> (effectively 12 seconds if you add a two second timeout). If the third 
> command results in no response a network broadcast is sent and any 
> responses are checked for the previously used GW1000 MAC address. If a 
> match is found the IP address and port number used by the driver is updated 
> if necessary (the GW1000 could now be on a different IP address) and 
> communication resumes. If the GW1000 does not respond WeeWX waits 60 
> seconds and then does a restart that results in the driver being reloaded. 
>
> During the restart the driver is loaded and if the GW1000 IP address and 
> port number are specified in weewx.conf these are used to communicate 
> with the GW1000. If the GW1000 responds normal startup continues. If the 
> GW1000 does not respond to a broadcast message is sent. Again if the GW1000 
> responds normal startup continues. If the GW1000 does not respond WeeWX 
> looks at the loop_on_init option in weewx.conf, if it is set to True 
> WeeWX waits 60 seconds and attempts another restart, if it is set to False 
> WeeWX exits.
>
> A GW1000 on a separate sub-net will not received any network broadcasts so 
> it will never answer the broadcasts used during lost contact and startup. 
> This really does not matter as when no response is received to the network 
> broadcast during lost contact, WeeWX automatically restarts after 60 
> seconds. Likewise, if no response is received to the network broadcast that 
> (may) occur during the re-start, provided loop_on_init is set to True 
> WeeWX will again wait 60 seconds before attempting a WeeWX restart.
>
> The bottom line is when using the GW1000 driver the recommended approach 
> is to add an address reservation for the GW1000 to your DHCP server so the 
> GW1000 is affectively given a fixed IP address (the GW1000 cannot be 
> programmed with a fixed IP). If the GW1000 is on a different sub-net then 
> this reservation is essential. Specifying the GW1000 IP address and port 
> number in weewx.conf is recommended in most cases and essential if the 
> GW1000 is on a different sub-net. Setting loop_on_init to True is also 
> recommended (in fact when you use wee_config --reconfigure to select the 
> GW1000 driver you are prompted to set loop_on_init) 
>
> I'm not sure what other action can be taken by WeeWX (and the driver) when 
> communication is lost. By definition communication has been lost with the 
> GW1000 so the driver cannot reset/reboot (or do anything else to) the 
> GW1000. WeeWX does a restart after 60 seconds which forces a reload of the 
> driver so we are resetting as much as we can on the WeeWX/driver side of 
> things.
>
> By all means set debug = 3 then restart WeeWX and we will see the low 
> level communications with the GW1000 which may give some clues, but the log 
> is going to be pretty chatty at that level and there will be lots of 
> output, not really practical unless to you can manually initiate the error.
>
> Gary
> On Friday, 10 September 2021 at 02:37:48 UTC+10 [email protected] 
> wrote:
>
>>
>> Normaly they have both connectivity! one in vlan 1 and one in vlan 2 for 
>> example. But on different L2 switches. Weewx is on switch 1 - WiFi Router 
>> with GW1000 is on switch 2. 
>> I've had a small spanning tree issue on the uplink between switch1 and 
>> switch2, later I see that weewx is down.
>> As you describe all work correct. I think about to go back to interceptor 
>> - I loss data for the monent ,but weewx is still running.....if connection 
>> come back.
>>
>> vince schrieb am Donnerstag, 9. September 2021 um 18:04:23 UTC+2:
>>
>>>
>>> If you VLAN your network, you still need to permit (1) and (2) above for 
>>> everything to work together.
>>>
>>
>> Normaly they have both connectivity! one in vlan 1 and one in vlan 2 for 
>> example. But on different L2 switches. Weewx is on switch 1 - WiFi Router 
>> with GW1000 is on switch 2. 
>> I've had a small spanning tree issue on the uplink between switch1 and 
>> switch2, later I see that weewx is down.
>> As you describe all work correct. I think about to go back to interceptor 
>> - I loss data for the monent ,but weewx is still running.....if connection 
>> come back.
>>  
>>
>

-- 
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/38518161-82d4-47fe-9f54-b88e33f2936cn%40googlegroups.com.

Reply via email to