Author Topic: WeatherLinkIP IP address keeps changing and this affects MeteoBridge  (Read 774 times)

0 Members and 1 Guest are viewing this topic.

Offline DenDen

  • Member
  • *
  • Posts: 4
My router or WeatherLinkIP every so often changes the IP address, toggling between ending in .15 and .16.  This screws up the MeteoBridge.  When I go to MeteoBridge, I discover the need to switch (again), and then everything is fine for a little while.  So I had the idea to use one of those addresses set as a static IP.  However, when I go to WeathLinkIP Configuration page (firmware 115), I need to enter my Device Key in order to set a static IP address.  I lost the Device Key.  I have no idea if it was a sticker put on the Ethernet dongle or what, but even removing the whole thing from the console, I see no Device Key code.

Is there any way to either change to a static IP or get my Device Key Code back so I can do it the way I know how using configuration?  I did make a weatherlink.com login, and probably used the code during that time, so do you thinnk Davis can help me?  Or perhaps there is another way?  I hate to lose internet weather just because I don't recall my Device Key Code.

Thanks.

Offline johnd

  • Forecaster
  • *****
  • Posts: 4850
    • www.weatherstations.co.uk
Re: WeatherLinkIP IP address keeps changing and this affects MeteoBridge
« Reply #1 on: July 26, 2020, 05:15:58 PM »
Look at the label on the WLIP's RJ45 socket?
Prodata Weather Systems
Prodata's FAQ/support site for Davis stations
Includes many details on 6313 Weatherlink console.
UK Davis Premier Dealer - All Davis stations, accessories and spares
Cambridge UK

Sorry, but I don't usually have time to help with individual issues by email unless you are a Prodata customer. Please post your issue in the relevant forum section here & I will comment there if I have anything useful to add.

Online Mattk

  • Forecaster
  • *****
  • Posts: 2157
Re: WeatherLinkIP IP address keeps changing and this affects MeteoBridge
« Reply #2 on: July 26, 2020, 05:35:14 PM »
If you are uploading to WeatherLink.com then do a call to the station API, the station key is listed in that.

Offline galfert

  • Global Moderator
  • Forecaster
  • *****
  • Posts: 6822
Re: WeatherLinkIP IP address keeps changing and this affects MeteoBridge
« Reply #3 on: July 26, 2020, 05:36:49 PM »
Another way to solve the problem is to not configure a static IP on the Weatherlink IP, but instead you make a DHCP IP address reservation on your router for the Weatherlink IP.

- Log into your router
- Go to the DHCP lease section
- Add and IP address reservation using the MAC address of your Weatherlink IP

I can't really give you more details than this because every router is different. If you need further help in getting this accomplished then you can tell us what router you have and I'm sure I could pull up documentation on that router and look up the menu structure to guide you.

With a DHCP IP address reservation the Weatherlink IP will always get the same IP address on that network. With this set the Weatherlink IP is still polling for a DHCP address but it will always be given the same address by your router. I feel a DHCP IP address reservation is a better mechanism than to just set a static IP address on a device....because if you set a static address on a device and that IP address is either not reserved, or is not outside of the DHCP range then you could likely end up with an IP conflict as the router could dish out that very same address to a different device. Making a DHCP IP address reservation is a way of letting the router know to only give that IP address to that device. You would have no idea if an IP address is within or outside of the DHCP scope of addresses without looking at the router's DHCP lease configuration as this range is never to be assumed as it is a configurable setting itself. If this last paragraph makes no senses....then don't worry. This was only intended as additional explanatory information in case you were wondering these things. The basic recommendation was mentioned in everything prior....essentially....make a DHCP reservation and you are done...as that is the best practice.

« Last Edit: July 26, 2020, 05:39:03 PM by galfert »
Ecowitt GW1000 | Meteobridge on Raspberry Pi
WU: KFLWINTE111  |  PWSweather: KFLWINTE111
CWOP: FW3708  |  AWEKAS: 14814
Windy: pws-f075acbe
Weather Underground Issue Tracking
Tele-Pole

Offline ConligWX

  • Forecaster
  • *****
  • Posts: 840
  • #conligwx
    • conligwx.org
Re: WeatherLinkIP IP address keeps changing and this affects MeteoBridge
« Reply #4 on: July 26, 2020, 05:50:26 PM »
you will need to browse to the WeatherLinkIp device by entering the IP address (ending in .15 or .16) into your web browser.

once there I am guessing your WeatherlinkIP is set for DHCP. two options,

1. if your Router allows for IP reservations reserve an ip address for the WLIP using the Mac Address.  reboot the WLIP. check its working on the IP you have reserved.

2. you need to change the DHCP setting on the WLIP to a Static IP.

before this can be done, check the DHCP range in your router. a default example for most would be like 192.168.1.100-192.168.1.254  thus anything under from .2-99 (last octet) would be ok to use for the weatherlink IP address.  make sure your subnet mask and gateway are the same as the DHCP entries from your router.

once you have an ip applied then check it is working by entering that into the browser.

then change the IP on the Meteobridge to point to the new IP address of the WLIP.

the #1 method is prefered.
« Last Edit: July 26, 2020, 05:52:23 PM by ConligWX »
Regards Simon
Davis Vantage Pro2 Plus (6162UK) • Daytime FARS • WeatherLink Live • AirLink • PurpleAir PA-II-SD • CumulusMX •


Offline DenDen

  • Member
  • *
  • Posts: 4
Re: WeatherLinkIP IP address keeps changing and this affects MeteoBridge
« Reply #5 on: July 26, 2020, 08:06:08 PM »
Johnd,
The key code is missing from the RJ-45  dongle.  Is it a stick-on label?  If so, it’s gone, fell off, and got vacuumed up.  The only writing says ‘DAVIS’. 

MattK,
I figured out and downloaded the API for XML and jason.  Lot of information, but no key code.  The Device ID and MAC are there, but I know those already.   Good try.

Galfert,
ConligWX,
You are both probably right that without the key code (and perhaps even with it), I need to make a reservation on my router.  All my crap (TVs, computers, iPads and stuff) using the router are working well except this, and I was hoping to avoid messing with the router.  It is an old Buffalo with DD-WRT that I hate to need to mess with after all these years since I forgot everything about it.  Yeah, yeah, I should upgrade.

If I only had the key code and could lock in the IP address that is currently in use via the WeatherLink IP configuration screen, I was thinking that would do it?

I’ve also just tried contacting Davis to see if they’ll give me my key code – perhaps they will respond tomorrow.  Being that most software companies would laugh if someone tried to get something without a key code, I wonder what Davis will do.  Thing is, I do have an account and active WeatherLinkIP that must have had a key code at one time.

I would like to start with the key code and WeatherLinkIP Configuration settings.  If only I had my key code.  How does someone lose a key code! Well I did.

Thanks,
Dennis

Offline galfert

  • Global Moderator
  • Forecaster
  • *****
  • Posts: 6822
Re: WeatherLinkIP IP address keeps changing and this affects MeteoBridge
« Reply #6 on: July 26, 2020, 08:42:06 PM »
If I only had the key code and could lock in the IP address that is currently in use via the WeatherLink IP configuration screen, I was thinking that would do it?
That won't exactly do it. That leaves you with the possibility that the router then decides to give out the same IP to another device, and then you end up with an IP conflict. When you have an IP conflict then either or both devices with the conflict will behave erratically and even fall off the network as if they were not connected.

When a device has a static IP address it does not register that IP with the DHCP server. Therefore the router has no idea that the IP address is in use as a static IP. A static IP has to be one that is outside of the DHCP pool scope (an IP that the DHCP server would never hand out). A static IP is also one that you must manage yourself also so that you don't assign it twice to two devices.
« Last Edit: July 26, 2020, 08:44:37 PM by galfert »
Ecowitt GW1000 | Meteobridge on Raspberry Pi
WU: KFLWINTE111  |  PWSweather: KFLWINTE111
CWOP: FW3708  |  AWEKAS: 14814
Windy: pws-f075acbe
Weather Underground Issue Tracking
Tele-Pole

Offline DenDen

  • Member
  • *
  • Posts: 4
Re: WeatherLinkIP IP address keeps changing and this affects MeteoBridge
« Reply #7 on: July 26, 2020, 08:54:29 PM »
galfert,
Ahhh, so you are telling me that it is not WeatherLink that is doing the switch, but rather the router?  How do you know that?  Or is that common knowledge (which I plead ignorance). 

Before posting I read as much as I could, and I saw many people have a similar issue in that they call a dummy IP address one digit off (like mine) that had some data from WeatherLink like temperature, but not dynamic data, not that they said it swapped every now and then.  This is what got me thinking it was WeatherLink's failure in that it started reporting to the wrong IP address.  Not so?

And you say I must make it in a range outside of the DHCP available range.  That makes sense.  Time to break out the router manual.

Argghh, after 2 years, now my sytem requires maintenance.

Thanks.

Offline galfert

  • Global Moderator
  • Forecaster
  • *****
  • Posts: 6822
Re: WeatherLinkIP IP address keeps changing and this affects MeteoBridge
« Reply #8 on: July 26, 2020, 11:16:35 PM »
galfert,
Ahhh, so you are telling me that it is not WeatherLink that is doing the switch, but rather the router?  How do you know that?  Or is that common knowledge (which I plead ignorance). 
When a device first comes into a network and it is configured to be a DHCP client (not static) it must send a broadcast request on the network asking who is the DHCP server and then asking said DHCP server for an IP address. The client may also request an IP address that it had previously used, the device basically can say, "may I have 192.168.1.16 that I used before?" and the DHCP server then says, "sure nobody is using that so you can have it, or it may say, no you can't have that IP address and instead you must use this other address."  Every DHCP given address is given out with a time limit (lease life). At the half life of the lease life the DHCP client should ask the DHCP server for a renewal, and then the DHCP server should respond and accept that because since the lease should have been acquired correctly there is then no reason any other device should have the address that is in use so there is no reason to deny it. The IP address lease then gets renewed for a new full life duration. Renewal always happens at the half life. This is all ideal network situation. There are many reasons why this ideal behavior could break down. The router (DHCP server) could be tied up and busy and it may not respond to the DHCP lease renewal in time. The router may freeze up for other reasons (old router, overloaded, bugs that cause memory holes, and random reboots..etc.). If this is the case and the router reboots it may boot up fresh and it may lose the record of the DHCP leases that it gave out. In this case everything works normal....maybe.  Then the device using the DHCP address comes to its half life and it asks for a renewal and the DHCP server then may say oh you want that address...sure nobody has it....because it forgot that it had given it (because of the reboot), or the DHCP server may say you want an address here use this address and then it doesn't match or it ignores the request to renew the other one because in its records it isn't really a valid renewal (since it forgot because of the reboot). All kinds of weird things can happen. If you have an old router that you haven't maintained in 2 years, then your problem could simply be an inadequate and unpatched router with bugs, or maybe just normal hardware failure starting to creep in. In this case you may very well notice that if you simply switch out your router that all your problems go away. But maybe the problem isn't the router. Maybe you have brown outs and you could benefit from running your router with a UPS (battery backup). Maybe there is bad Ethernet cable or a bad network switch being used. Maybe your Ethernet passes too close to florescent lights which is terrible for Ethernet networking. I'm just putting things out there that could present all kinds of network issues and there are many more. But that is neither here nor there. Start with the basics....old router....that needs attention. That makes sense for many reasons and at the top of the list is security, so that is a worthy investment even if it isn't the source of this problem with IP address changing. But yes ...ultimately the IP address is changing because of the router. This isn't to say that devices can't be at fault too. I've see device on a network not renew leases at the half life as is the proper way. Some devices have poorly implemented network stacks and they let the lease run out before they renew....and even worse some devices never renew after asking the first time assuming they can use that IP address forever without renewal. This is another reason why you should also update the firmware on your devices also.

I'll give you a few more network issues that can sometimes be an issues if things were not done correctly:
Another network issue some people encounter is two DHCP server on the same network. It can happen. If you have improperly connected Modem and router this can happen. If you attach a WiFi access point and it isn't properly configured or connected it could also be a rouge DHCP server. If you spun up a Linux system and you inadvertently started up a DHCP server deamon then this could also be a problem. A good way to trouble shoot this is to turn off some extra network stuff or devices and see if issues still happen. Another thing to try is to reduce the DHCP lease time to 5 or 10 minutes to test lease renewal.
« Last Edit: July 26, 2020, 11:22:46 PM by galfert »
Ecowitt GW1000 | Meteobridge on Raspberry Pi
WU: KFLWINTE111  |  PWSweather: KFLWINTE111
CWOP: FW3708  |  AWEKAS: 14814
Windy: pws-f075acbe
Weather Underground Issue Tracking
Tele-Pole

Online Mattk

  • Forecaster
  • *****
  • Posts: 2157
Re: WeatherLinkIP IP address keeps changing and this affects MeteoBridge
« Reply #9 on: July 26, 2020, 11:21:17 PM »

MattK,
I figured out and downloaded the API for XML and jason.  Lot of information, but no key code.  The Device ID and MAC are there, but I know those already.   Good try.

Then you need to have another look. The sticker values on the WLIP was for DID: and Key:

If you look in the XML file these are called <station_did> and <station_key>, and they are there.

Offline johnd

  • Forecaster
  • *****
  • Posts: 4850
    • www.weatherstations.co.uk
Re: WeatherLinkIP IP address keeps changing and this affects MeteoBridge
« Reply #10 on: July 27, 2020, 03:36:54 AM »
Johnd,
The key code is missing from the RJ-45  dongle.  Is it a stick-on label?  If so, it’s gone, fell off, and got vacuumed up.  The only writing says ‘DAVIS’. 

Are you _sure_ about that? Not impossible of course but the label is usually stuck on pretty tight. And are you definitely looking in the right place? It's on the RJ45 socket which is squarish and so obviously has 4 sides - not difficult to miss the label if you're looking at one side only. It's NOT on the logger itself.
Prodata Weather Systems
Prodata's FAQ/support site for Davis stations
Includes many details on 6313 Weatherlink console.
UK Davis Premier Dealer - All Davis stations, accessories and spares
Cambridge UK

Sorry, but I don't usually have time to help with individual issues by email unless you are a Prodata customer. Please post your issue in the relevant forum section here & I will comment there if I have anything useful to add.

Offline DenDen

  • Member
  • *
  • Posts: 4
Re: WeatherLinkIP IP address keeps changing and this affects MeteoBridge
« Reply #11 on: July 27, 2020, 05:37:44 PM »
Galfert,
Thanks for the excellent tutorial.  I am embarrassed to say that since installing my router in 2010, I have never updated the firmware or done maintenance beyond the setup, but I do have it password protected.   I can picture you smacking your forehead about now.   I am very rural and far off the road (you can see by my station SGL076 location if you look), so I  am not overly worried about anyone getting into my wifi.   

I am wondering if the router notices the Meteobridge accessing the same address as the WeatherLinkIP, so it moves one digit.  But I am thinking the MeteoBridge just ‘looks’ to that location.  If that is the case that the router protects from conflicts, it just started doing this after over 2 years.   

Point well taken, I will at least update firmware and make things right in the router.  And, as you say, I cannot use the DHCP range of IPs for static even if I wanted to do that.   Having the UPS, I do occasionally reboot the router just because I thought it was good idea, not because I had issues.

If  I go to a static IP of the correct allowable range, I will need to understand the other values, subnet mask, default gateway and DNS server.  Fortunately most of this stuff works on its own and is usually transparent to someone like me.

As far as power, no brown outs.  I not only run an UPS, but have another UPS feeding the computer UPS as well as other household items.  I have a 4,800 watt (with large golf cart batteries) Outback feeding my CyberPower 1500AVR UPS.  Reason being is that the CyberPower UPS wakes me up when power is lost, so now it never loses power, and power is good quality.  But you make a good point.  And I have LED lights, not fluorescent near the router.


Mattk,
JohnD,
Yes, I am sure, there is nothing on the dongle.  I can hold it in my hand now while I sit here.  I found a picture of a sticker on a dongle on google, and mine has no label stuck to it.   I do have the green light covered with electrical tape (that I removed to look for the label) because the green light keeps me awake.  Thing is, I always keep good records, or at least I used to.  I bet I have the info written down somewhere and stored so well that I can’t find it.

I gave false information when I said the DID was on the 6555.  Actually I got the DID from the WeatherLink.com website.

The .json and .xml files only have station_name and station_id.  To make certain I was not overlooking it, I ctr-f and searched for ‘station’ and ‘key’ and ‘code’ because I could see me overlooking it.  Wonder why my reports don’t have the key.

Thanks all

Offline galfert

  • Global Moderator
  • Forecaster
  • *****
  • Posts: 6822
Re: WeatherLinkIP IP address keeps changing and this affects MeteoBridge
« Reply #12 on: July 27, 2020, 08:29:44 PM »
Galfert,
Thanks for the excellent tutorial.  I am embarrassed to say that since installing my router in 2010, I have never updated the firmware or done maintenance beyond the setup, but I do have it password protected.   I can picture you smacking your forehead about now.   I am very rural and far off the road (you can see by my station SGL076 location if you look), so I  am not overly worried about anyone getting into my wifi.   
Password protected and living out far away from others may give you some protection on WiFi, but you are just as susceptible to Internet attacks and security exploits as anyone else. There are all kinds of security concerns and WiFi is only one aspect. There are firewall updates, and there are network updates that protect you from what may be running on your own computer....not necessarily WiFi related.

Quote
I am wondering if the router notices the Meteobridge accessing the same address as the WeatherLinkIP, so it moves one digit. But I am thinking the MeteoBridge just ‘looks’ to that location.  If that is the case that the router protects from conflicts, it just started doing this after over 2 years.
Hard to say what is going on without looking into the network and its configuration and capturing network packets. But the objective should be follow best practices to try and eliminate possible problems....short of having the expertise to really delve into the network. A 10 year old router needs to go. I'm not sure it is worth the trouble to update the firmware. You are likely missing a lot due to just network performance technology that can not be mitigated by a firmware update.

Seems like you have a good handle on power backup!
Ecowitt GW1000 | Meteobridge on Raspberry Pi
WU: KFLWINTE111  |  PWSweather: KFLWINTE111
CWOP: FW3708  |  AWEKAS: 14814
Windy: pws-f075acbe
Weather Underground Issue Tracking
Tele-Pole

 

anything