Author Topic: New things for Davis console  (Read 2417 times)

0 Members and 1 Guest are viewing this topic.

Offline WiFiLogger

  • Forecaster
  • *****
  • Posts: 666
Re: New things for Davis console
« Reply #25 on: January 12, 2021, 08:48:53 AM »
Does your IP logger have any keep alive strategy? Or, if there is no activity for a while, does it drop the connection?

ut, until @WiFiLogger gets back to us, we'll never know what the issue is.

Tom
I am very sorry for the delay. I had a lot of urgent work before vacations all ASAP.

I would like to describe connection in WiFiLogger now.
There is 3 options, but "Collision" I have not tested and maybe it is not finished. Collision is when WiFiLogger internal functions are able to read station even if TCP port 22222 is opened.
Other more civilized options are:
- "PAUSE with Disconnection"
- "PAUSE"

In general WL IP and WiFiLogger need to make access to console to read data for export. So disconnection option in Cumulus and WeeWX is very needed for proper working.
This is part on PC software like Cumulus, WeatherLink and WeeWX.
On WiFiLogger there are also such options:
WiFiLogger can't disconnect port 22222 every 1 minute, because reading of archive records 513 pages takes 2 minutes 15 sec. And uploading firmware to console takes about 5-7 minutes. But anyway it needs to take care of own export options e.g. to WL.COM, or WU if those are enabled.

So "PAUSE with Disconnection" will close TCP port if there is no command send to console via this port for 60 sec.
Cumulus is sending one command to console to receive continue readings of LOOP. So here is little problem, because one command is sent on the beginning then there is no TX data to console, so WiFiLogger will close such port after 60 sec.
No problem if Cumulus has set discon period. It is closing connection itself every 1 minute.

option "PAUSE" is blocking WiFiLogger against reading console when TCP port is OPEN.
Here, please note that TCP port 22222 will be closed and opened for new software connection.

e.g. WeatherLink PC is reading data via TCP port. Then we opening Cumulus and Cumulus is starting to read console on port 22222. So Cumulus is closing TCP port for WeatherLink PC and new socket is opened for Cumulus. Ofcourse WL PC can make reconnection and close socket for Cumulus.
On the begining it was different. TCP port was assigned to first software. New TCP socket was not opened, before first one was closed.
But Cumulus was making reconnections without closing old port. So Cumulus was trying to open sockets 10 times to access console, but was not releasing first socket which WiFiLogger was reserving for it.
Now new connection drop old.

Also WiFiLogger is working in main loop. TCP port is maintain in same loop where exports to weather services (WL.com, Wu etc....) are made. If connection to WU will be invalid then TIMEOUT for socket is 15 sec. So WeeWX will not have access to console.
On the other hand users knows about that and they are closing all exports and other activities of WiFiLogger, leaving just TCP port access.

In general connection to WeeWX is working fine, but WiFiLogger has a few routines to reboot itself if needed.
I had info from clients that WeeWX with WiFiLogger crash every 4 days. So 4 days it is not issue with TCP port access which can be reset every 1 minute. It is more like WiFiLogger is rebooting. After reboot It takes minimum 8 sec. to works again, sometimes more when archive records have problem to read on the beginning.
I do believe that here will be main problem.

On the other hand why WeeWX is crashing?


Offline TomKeffer

  • Member
  • *
  • Posts: 37
  • Author of weeWX
Re: New things for Davis console
« Reply #26 on: January 12, 2021, 09:10:10 AM »
Perhaps it's a language issue, but I'm not understanding much of what you are saying.

It sounds like port 22222 is being used to both communicate with the console, and to communicate with the computer, as well as perform updates, etc. So you are having to multiplex between its many uses. Is that correct? Keep in mind, that while I'm very familiar with the Davis logger, I know nothing about your logger.

On the other hand why WeeWX is crashing?

Why indeed? Perhaps it's because your logger has a very different state management strategy than the Davis logger it is trying to emulate. If I'm understanding you correctly, and I may not be, you cannot have a logger which simply closes a connection to go off and do something else. You'll have to find a way to teach it to maintain the connection and open up a new one.

Or, maybe I'm completely misunderstanding you.

Offline mcrossley

  • Forecaster
  • *****
  • Posts: 792
    • Wilmslow Astro
Re: New things for Davis console
« Reply #27 on: January 12, 2021, 09:24:44 AM »
So "PAUSE with Disconnection" will close TCP port if there is no command send to console via this port for 60 sec.
Cumulus is sending one command to console to receive continue readings of LOOP. So here is little problem, because one command is sent on the beginning then there is no TX data to console, so WiFiLogger will close such port after 60 sec.

Which is not how the Davis logger works, it does not arbitrarily close the connection.

Quote
But Cumulus was making reconnections without closing old port. So Cumulus was trying to open sockets 10 times to access console, but was not releasing first socket which WiFiLogger was reserving for it.
Now new connection drop old.

It keeps opening new sockets because the old ones repeatedly get connection closed by peer or connection aborted type error - I cannot close a socket that is already closed or in an error state. Reconnection often successfully opens a socket then fails to get any response to Davis commands, and Cumulus has close and reconnect several times before the logger finally makes a good connection that it responds over.  The same code reconnecting to the Davis logger always works first time.
« Last Edit: January 18, 2021, 07:03:59 AM by mcrossley »
Mark

Offline WiFiLogger

  • Forecaster
  • *****
  • Posts: 666
Re: New things for Davis console
« Reply #28 on: January 13, 2021, 06:01:05 AM »
It sounds like port 22222 is being used to both communicate with the console, and to communicate with the computer, as well as perform updates, etc. So you are having to multiplex between its many uses. Is that correct? Keep in mind, that while I'm very familiar with the Davis logger, I know nothing about your logger.

While socket with port 22222 is opened, then it makes direct access to console.
About firmware update. I have mentioned about console firmware update.
While firmware is being uploaded to console, then there can't be disruption for about 6 minutes.

Offline GHammer

  • Senior Contributor
  • ****
  • Posts: 184
    • Woodmar Weather
Re: New things for Davis console
« Reply #29 on: January 18, 2021, 06:02:35 PM »
I have had no problems with the WiFiLogger 2 since I use WeeWX to handle services I wish to send my data to.
In that case, there is no competing use of the port/wifi chip and all is well.
So, if used for a single connection to a single program, there should be no error until you have a firmware update. Then, there will be no connection and if the program you use with the WiFiLogger can't handle its absence, it will likely crash. I'd like to have a 'Dont update automatically' option in WiFiLogger for that reason.

An alternative for WeeWX would be to use the WeeWX-MQTTSubscribe driver to get data into WeeWX and the MQTT export to send from WiFiLogger. At the time, there is an issue with the data from the WiFiLogger and it will sometime produce values that are a string instead of the numeric that WeeWX-MQTTSubscribe/WeeWX wants.

If Wojtek can clean the MQTT export up, that would solve the connection problem as far as WeeWX is concerned as there would be no direct connection between WeeWX and the WiFiLogger.

Mind you, I do not run multiple programs accessing the logger, nor do I report to any service as I use WeeWX to do that.

Wireless Vantage Pro2 Plus with 24hr FARS, WLL

Offline davidmc36

  • He who dies with the most toys wins!
  • Forecaster
  • *****
  • Posts: 791
  • FN25ie61jw
    • MorewoodW34
Re: New things for Davis console
« Reply #30 on: March 30, 2021, 07:48:04 AM »
So I have been running this new Ethernet Logger for a while now. It works very well with an up-time now of almost 19 days.

Using Weather Display or Weatherlink it pauses for WL.com uploads every minute.

I decided to try Weewx on the Pi and when first starting up I got nothing. Then after trying WD and WL again, they would not connect. The Ethernet Logger was still running fine and sending to WL.com

Then I changed the IP to static on the Ethernet Logger and Weewx started working fine. The other programs would still connect and allow WL.com uploads.

The thing with Weewx running now is that it DOES NOT pause for WL.com

I wonder what the method is to make it do that.

Offline GHammer

  • Senior Contributor
  • ****
  • Posts: 184
    • Woodmar Weather
Re: New things for Davis console
« Reply #31 on: March 31, 2021, 10:13:42 AM »
So I have been running this new Ethernet Logger for a while now. It works very well with an up-time now of almost 19 days.

Using Weather Display or Weatherlink it pauses for WL.com uploads every minute.

I decided to try Weewx on the Pi and when first starting up I got nothing. Then after trying WD and WL again, they would not connect. The Ethernet Logger was still running fine and sending to WL.com

Then I changed the IP to static on the Ethernet Logger and Weewx started working fine. The other programs would still connect and allow WL.com uploads.

The thing with Weewx running now is that it DOES NOT pause for WL.com

I wonder what the method is to make it do that.

There is no method for WeeWX to pause data collection.
Curious as to what service wl.com is. If I put that in a browser I get a strange website that has nothing to do with weather.
Wireless Vantage Pro2 Plus with 24hr FARS, WLL

Offline mcrossley

  • Forecaster
  • *****
  • Posts: 792
    • Wilmslow Astro
Re: New things for Davis console
« Reply #32 on: March 31, 2021, 10:43:02 AM »
Curious as to what service wl.com is. If I put that in a browser I get a strange website that has nothing to do with weather.

It's an abbreviation for weatherlink.com
Mark

Offline davidmc36

  • He who dies with the most toys wins!
  • Forecaster
  • *****
  • Posts: 791
  • FN25ie61jw
    • MorewoodW34
Re: New things for Davis console
« Reply #33 on: March 31, 2021, 11:36:58 AM »
......

There is no method for WeeWX to pause data collection.......

OK Good to know.

At least I got WeeWx rolling again. Had it a while ago and this week drew a total blank ](*,) for a while.

My options are open.