Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Cumulus MX V4 beta test release 4.0.0 (build 4018) - 28 March 2024

Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014 (a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

USB and TCP/IP support

Discussion specific to Davis weather stations
User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: USB and TCP/IP support

Post by steve »

I'll have a go at putting in the 'close' option, probably via an ini file switch. The only issue is that the code isn't in the main thread, so I'm not sure I can close the application from there. I'll probably have to send a 'close' message to the main thread. There will have to be some sort of threshold before it closes, I suggest retrying the connection for about a minute then giving up?

Steve
broadstairs
Posts: 745
Joined: Thu 14 Aug 2008 7:17 am
Weather Station: Ecowitt GW1003/GW1103/GW2000
Operating System: Windows 7 and Linux
Location: Broadstairs, Kent, UK
Contact:

Re: USB and TCP/IP support

Post by broadstairs »

steve wrote:I'll have a go at putting in the 'close' option, probably via an ini file switch. The only issue is that the code isn't in the main thread, so I'm not sure I can close the application from there. I'll probably have to send a 'close' message to the main thread. There will have to be some sort of threshold before it closes, I suggest retrying the connection for about a minute then giving up?

Steve

That sounds a good idea since if it recovers within a minute you are not going to get any archive records anyway.

Stuart
User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: USB and TCP/IP support

Post by steve »

broadstairs wrote:That sounds a good idea since if it recovers within a minute you are not going to get any archive records anyway.
An slightly more flexible alternative has occurred to me - instead of making the ini file setting a switch, it could specify the number of seconds to retry before closing the application.

Steve
User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: USB and TCP/IP support

Post by steve »

I've implemented this in build 726. To enable it, add a line to the [Station] section in cumulus.ini

VPClosedownTime=x

where x is the number of seconds after the start of the re-connect attempts that you want the program to close itself.

Steve
broadstairs
Posts: 745
Joined: Thu 14 Aug 2008 7:17 am
Weather Station: Ecowitt GW1003/GW1103/GW2000
Operating System: Windows 7 and Linux
Location: Broadstairs, Kent, UK
Contact:

Re: USB and TCP/IP support

Post by broadstairs »

Thanks Steve, I'll give it a go tomorrow....

Stuart
broadstairs
Posts: 745
Joined: Thu 14 Aug 2008 7:17 am
Weather Station: Ecowitt GW1003/GW1103/GW2000
Operating System: Windows 7 and Linux
Location: Broadstairs, Kent, UK
Contact:

Re: USB and TCP/IP support

Post by broadstairs »

Steve I actually got a chance to try this tonight and it works just fine.

The setup I have is Startwatch (which starts at boot time) will check the VirtualVP TCP/IP port and when it is available it starts Cumulus and monitors Cumulus to make sure it is always running, if Cumulus detects the IP will not recover after 30 seconds it terminates and at this point Startwatch has also found the VirtualVP TCP/IP port has gone away so it waits until it can detect VirtualVP coming back and then starts Cumulus again at which point Cumulus will read any archive data it can find and continues normally.

Stuart
User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: USB and TCP/IP support

Post by steve »

That's good, thanks. In Cumulus 2 I will try to make it so that it doesn't close down, it just waits until the connection is available again and catches up.

Steve
Bugs
Posts: 7
Joined: Sat 18 Oct 2008 10:21 am

Re: USB and TCP/IP support

Post by Bugs »

Not sure if this has already been raised but I notice with Cumulus running WeatherLink.com does not update which would indicate Cumulus takes total control over the IP logger?

Is this the case or should both work/run together?
User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: USB and TCP/IP support

Post by steve »

That does sound familiar. I think Cumulus needs to release the connection every minute or so to allow wl.com to be updated. Or at least stop reading the data for a short while. Does anyone know for sure?

Steve
oliver
Posts: 2
Joined: Wed 17 Jun 2009 11:30 pm
Weather Station: VP2 with WeatherLinkIP

Re: USB and TCP/IP support

Post by oliver »

I can confirm WeatherLink.com does not get updated while the Cumulus software is running. I tried the Beta 187 software with the VP2SleepInterval set as high as 30000 and it still doesn't seem to release the connection.

VP2 with WeatherLinkIP.
User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: USB and TCP/IP support

Post by steve »

Thanks - I'll look into what needs to be done to allow weatherlink.com to get updated
Steve
User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: USB and TCP/IP support

Post by steve »

I still haven't been able to find out what Cumulus needs to do exactly to allow updating to weatherlink.com to work. I understand that it needs to release the tcp/ip connection every so often - but how often and for how long? I don't understand how I can guarantee to release the connection at the right time for the update, and how long the update takes. Does anyone know for sure what it needs to do?
Steve
oliver
Posts: 2
Joined: Wed 17 Jun 2009 11:30 pm
Weather Station: VP2 with WeatherLinkIP

Re: USB and TCP/IP support

Post by oliver »

The WeatherLinkIP module updates weatherlink.com once a minute. As far as I know there is no setting anywhere to change that interval. When Cumulus is closed, the weatherlink.com page is updated with in seconds, so it appears to do the update as soon as the connection is released .

I think that a call to CloseTCPIPPort_V() used in conjunction with VP2SleepInterval already in the program so that the connection is closed during the sleep interval should work. Of course the connection would have to be reopened when time to wake up. I don't know how much trouble that would be to implement, but it would make the disconnected time adjustable for how ever long was needed.
User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: USB and TCP/IP support

Post by steve »

Thanks, I'll look into closing the connection every minute for a few seconds. I'll make the number of seconds configurable. I'm not sure using the sleep interval is a good idea, it normally wouldn't be long enough, I wouldn't have thought. If you set the sleep interval to more than about 2 seconds you will start to lose data (peak wind speeds etc) as Cumulus then won't be getting every update of the data. Of course, the same applies to the proposed releasing of the connection, but at least that would only be once a minute.
Steve
Post Reply