NETATMO : Live picture and stream URL update

The Netatmo documentation says : “The vpn_url expire after 3 hours and if the camera reboots” (cf https://dev.netatmo.com/resources/technical/reference/security/live).

I noticed that the netatmo binding does not update the Live picture URL nor the Live Stream URL. After a while these URL are not valid anymore and I need to stop and restart the netatmo binding to get new valid URLs.

I think that the problem is in the NAWelcomeCameraHander.java which does not take into account changes of vpn_url of the cameras.

1 - The getVpnUrl() method should always return the value obtained by calling module.getVpnUrl() since this value may change every 3 hours. It does not do so if the vpnUrl attribute has already been set by the first call to getVpnUrl().

2 - The getLivePictureURL() method should always rebuild the live picture URL by calling getVpnUrl(). It does not do so if the livePictureURL attribute has already been set by the first call to getLivePictureURL()

3 - getLiveStreamURL() method should always rebuild the live stream URL by calling getVpnUrl(). It does not do so if the liveStreamURL attribute has already been set by the first call to getLiveStreamURL().

Could you tell me if I am right ?

You study seems quite good. Could you file an issue in openHAB-addins github repo ?