Author Topic: Reading data locally from WLL  (Read 5907 times)

0 Members and 1 Guest are viewing this topic.

Online johnd

  • Forecaster
  • *****
  • Posts: 4827
    • www.weatherstations.co.uk
Re: Reading data locally from WLL
« Reply #50 on: May 08, 2019, 07:08:15 AM »
but looks like a confirmation message about enabling the broadcast message stream for 1200 seconds (I assume seconds).

Give that man a coconut! Yes it seems to last exactly 480 messages at what appears to be 2.5sec intervals (only integer seconds reported as 'ts' so interval tends to alternate 2 and 3 secs) or approx 1200 secs.

But no sign of data_structure_type 2 or 3 in the UDP data, though both are there in current_conditions. Guess there are 3 possibilities: Leaf/soil & Bar not implemented yet; Not planned to be implemented (HTTP GET may be considered sufficient for these long-refresh parameters); Different trigger needed?
« Last Edit: May 08, 2019, 08:16:35 AM by johnd »
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 kobuki

  • Forecaster
  • *****
  • Posts: 838
Re: Reading data locally from WLL
« Reply #51 on: May 08, 2019, 07:12:15 AM »
Give that man a coconut! Yes it seems to last exactly 480 messages at what appears to be 2.5sec intervals (only integer seconds reported as 'ts' so interval tends to alternate 2 and 3 secs) or approx 1200 secs.
You can give a like instead here. So we've discovered almost all the dirty little details. I wonder whose driver will be released first...
« Last Edit: May 08, 2019, 03:18:25 PM by kobuki »

Offline waiukuweather

  • Forecaster
  • *****
  • Posts: 1072
Re: Reading data locally from WLL
« Reply #52 on: May 08, 2019, 03:04:05 PM »
Yes, I have got wind/ rain UDP Data coming in now
Once I fixed my parsing out of the port number :)
« Last Edit: May 08, 2019, 04:32:49 PM by waiukuweather »

Offline kobuki

  • Forecaster
  • *****
  • Posts: 838
Re: Reading data locally from WLL
« Reply #53 on: May 08, 2019, 03:19:13 PM »
Yes, I have got wind/ rain UDP Data coming in now
Once I fixed my parsing our of the port number :)
What system or software is it for?

Offline waiukuweather

  • Forecaster
  • *****
  • Posts: 1072
Re: Reading data locally from WLL
« Reply #54 on: May 08, 2019, 04:34:16 PM »
not really wanting to say, as am not wanting people to think I am just trying to promote my software here

Offline kobuki

  • Forecaster
  • *****
  • Posts: 838
Re: Reading data locally from WLL
« Reply #55 on: May 08, 2019, 05:12:03 PM »
not really wanting to say, as am not wanting people to think I am just trying to promote my software here
I don't think people here would think that, but do as you feel.

Offline mcrossley

  • Forecaster
  • *****
  • Posts: 1132
    • Wilmslow Astro
Re: Reading data locally from WLL
« Reply #56 on: May 08, 2019, 05:13:50 PM »
The username gives you a clue  ;)
Mark

Offline waiukuweather

  • Forecaster
  • *****
  • Posts: 1072
Re: Reading data locally from WLL
« Reply #57 on: May 08, 2019, 05:19:15 PM »
I didn't even want the username to give me away
I am though an original wxforum member (which came about from another forum that Gary Oldham set up,weatherforum.net ) :) and I have been working on my weather software for nearly 20 years so I am no newbie to all this :)

Offline galfert

  • Global Moderator
  • Forecaster
  • *****
  • Posts: 6822
Re: Reading data locally from WLL
« Reply #58 on: May 08, 2019, 05:20:06 PM »
Can someone explain in nonprogramming terms why UDP sensor data broadcast would be better than the HTTP GET (curl).

I'm techie enough as I'm a network systems manager. So I get that UDP traffic being best effort blind send versus TCP traffic having delivery confirmation and retransmission. So that isn't the question I'm asking.

I want to know from the perspective of getting data from the WLL why one would favor one method over the other. Does one method deliver quicker sensor updates? Does one method require less overhead for the device requesting the data? Does one method provide more sensors data (meaning maybe one method is missing sensors and only sends a subset of info and is not complete?)

What if you wanted to run multiple weather software. In the past we had things like Virtual VP and needing to balance logger polling. Does the WLL allow through either method the ability to run multiple weather software? I would think at at least the HTTP GET would work in this sense. Not sure about the UDP if the WLL gets set to broadcast UDP mode and then it can only do so to one IP destination as from what I've read then maybe it doesn't support multicast?
Ecowitt GW1000 | Meteobridge on Raspberry Pi
WU: KFLWINTE111  |  PWSweather: KFLWINTE111
CWOP: FW3708  |  AWEKAS: 14814
Windy: pws-f075acbe
Weather Underground Issue Tracking
Tele-Pole

Offline waiukuweather

  • Forecaster
  • *****
  • Posts: 1072
Re: Reading data locally from WLL
« Reply #59 on: May 08, 2019, 05:46:22 PM »
UDP is less over head
because the data is sent out to any listener on that local port
i.e so more than one listener can use that data
and that listener does not have to keep asking for the data and the sender does not have to then process that request and send it to who requested it
and so the wind and current rain is sent out at 2.5 seconds via UDP
and then the other data that does not change as fast (temperature/humidity/barometer etc) can be requested say every minute via a HTTP get

Offline kobuki

  • Forecaster
  • *****
  • Posts: 838
Re: Reading data locally from WLL
« Reply #60 on: May 08, 2019, 05:52:49 PM »
Can someone explain in nonprogramming terms why UDP sensor data broadcast would be better than the HTTP GET (curl).
In short, a message oriented protocol such as UDP is quicker and uses less resources. There's no such thing as TCP broadcast, either. There are very few values that change quickly enough to warrant a stream oriented standard protocol with all the bells and whistles. Broadcasts are an easy way to publish quickly changing conditions in short messages in the broadcast domain of your device. Also, you would need to poll with http gets, where the frequency and http overhead is getting stressful with a small device when many devices are polling. Yes, there are modern methods like websockets, but I think UPD broadcasts are an adequate solution to the problem at hand, for instance no need to maintain a heap of connection states in memory, etc.

Offline galfert

  • Global Moderator
  • Forecaster
  • *****
  • Posts: 6822
Re: Reading data locally from WLL
« Reply #61 on: May 08, 2019, 06:57:26 PM »
Okay thank you both.

So UDP for the WLL only sends wind and rain I'm hearing. So the HTTP GET is still required for other sensors.

Regarding running multiple weather software simultaneously, any issues?
Ecowitt GW1000 | Meteobridge on Raspberry Pi
WU: KFLWINTE111  |  PWSweather: KFLWINTE111
CWOP: FW3708  |  AWEKAS: 14814
Windy: pws-f075acbe
Weather Underground Issue Tracking
Tele-Pole

Offline waiukuweather

  • Forecaster
  • *****
  • Posts: 1072
Re: Reading data locally from WLL
« Reply #62 on: May 08, 2019, 11:35:59 PM »
only issue with more than 1 software running would be if there is a clash with the http get request for the other data and well the WLL can handle that?

Online johnd

  • Forecaster
  • *****
  • Posts: 4827
    • www.weatherstations.co.uk
Re: Reading data locally from WLL
« Reply #63 on: May 09, 2019, 03:42:43 AM »
So UDP for the WLL only sends wind and rain I'm hearing.

No, it sends more than that. AFAICR it sends Type 1 messages via UDP, but not Type 2 and Type 3. My picture is:

Type 1 = ISS-type transmitter (basically any active Tx that uses the ISS SIM board, which includes 6332 etc)

Type 2 = 6345 Tx data (ie leaf soil/moisture etc)

Type 3 = Pressure data
« Last Edit: May 09, 2019, 03:45:15 AM by johnd »
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 waiukuweather

  • Forecaster
  • *****
  • Posts: 1072
Re: Reading data locally from WLL
« Reply #64 on: May 09, 2019, 03:50:32 AM »
here is the UDP data
{"did":"001D0A710197","ts":1557314117,"conditions":[{"lsid":223656,"data_structure_type":1,"txid":1,"wind_speed_last":0.00,"wind_dir_last":0,"rain_size":2,"rain_rate_last":0,"rain_15_min":0,"rain_60_min":0,"rain_24_hr":0,"rain_storm":null,"rain_storm_start_at":null,"rainfall_daily":0,"rainfall_monthly":0,"rainfall_year":0,"wind_speed_hi_last_10_min":0.00,"wind_dir_at_hi_speed_last_10_min":0}]}


so not sure where there is more than wind and rain data?

Online johnd

  • Forecaster
  • *****
  • Posts: 4827
    • www.weatherstations.co.uk
Re: Reading data locally from WLL
« Reply #65 on: May 09, 2019, 03:56:04 AM »
Hmm, you may be right - don't have my data in front of me right now. Just assumed that a Type 1 message meant a complete Type 1 message, but maybe it doesn't? So potentially there are two Type 1 messages - complete (HTTP) and partial (UDP).
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 waiukuweather

  • Forecaster
  • *****
  • Posts: 1072
Re: Reading data locally from WLL
« Reply #66 on: May 09, 2019, 03:57:03 AM »
 [tup]

Offline kobuki

  • Forecaster
  • *****
  • Posts: 838
Re: Reading data locally from WLL
« Reply #67 on: May 09, 2019, 05:33:37 AM »
Type X might refer to a type of structure X in json that Davis made up for the device, not necessitating a complete one but one that has certain values in certain structure elements. After all, it's really only wind and rain that changes rapidly enough.

Offline galfert

  • Global Moderator
  • Forecaster
  • *****
  • Posts: 6822
Re: Reading data locally from WLL
« Reply #68 on: May 09, 2019, 07:30:10 AM »
Well this WLL API protocol is looking really really nice. Seems to me like the WLL will be key in the next console from Davis. All Davis needs to do now is come out with a reasonable cost color display that gets its data from the WLL.

But we don't need to wait for Davis to do that. Now someone can write an Android or iOS app with a nice console like display graphics and you've got a better console. It would even be neat to see for nostalgia a virtual VP2 console and a Vue one also. Pretty much like the web version I've seen some people have on their personal website. The real killer would be something that looks like the Ambient WS-2000 display where all the data is visible without having to press any buttons.

Davis can even come out with the app themselves instead of a real console.

Then the only thing left for Davis to do is come out with a new ISS that uses I2C bus sensors. And that would be good enough for me to consider it a VP3.
Ecowitt GW1000 | Meteobridge on Raspberry Pi
WU: KFLWINTE111  |  PWSweather: KFLWINTE111
CWOP: FW3708  |  AWEKAS: 14814
Windy: pws-f075acbe
Weather Underground Issue Tracking
Tele-Pole

Offline kobuki

  • Forecaster
  • *****
  • Posts: 838
Re: Reading data locally from WLL
« Reply #69 on: May 09, 2019, 07:37:56 AM »
I think the wisdom has been established about Davis' stance already. Starting with the WLL they're distancing themselves from the idea of modern colorful consoles and seem to encourage interested parties make apps instead, using their (yet undocumented) API.

Offline waiukuweather

  • Forecaster
  • *****
  • Posts: 1072
Re: Reading data locally from WLL
« Reply #70 on: May 09, 2019, 02:38:29 PM »
here is a curve ball
with the Davis IP data logger, it acted like a usb data logger re commands and so software could request a history data dump
I wonder if a data history data dump can be still done with the WLL
maybe by setting a start and end date/time in the http Get call via json commands or similar (probably will need to wait for the api release to now?)


Offline kobuki

  • Forecaster
  • *****
  • Posts: 838
Re: Reading data locally from WLL
« Reply #72 on: May 15, 2019, 07:44:16 PM »
Thanks. The material on the first link appears to originate from Jeremy Wall, System Architect and Principal Web Developer at Davis Instruments and weatherlink (according to GitHub), so I guess it's semi-official, or something like that. Stuff seems detailed enough for implementation in drivers, even some Python examples are provided for the real-time and the pull/REST API. Nice one, Davis!  [tup]

Offline waiukuweather

  • Forecaster
  • *****
  • Posts: 1072
Re: Reading data locally from WLL
« Reply #73 on: May 15, 2019, 08:37:32 PM »
only a few things new others had not worked out
does not look to be any way to get history data
(although you can get that from weatherlink.com)

Offline kobuki

  • Forecaster
  • *****
  • Posts: 838
Re: Reading data locally from WLL
« Reply #74 on: May 16, 2019, 03:17:31 AM »
I'd assume accessing the history is tied to a cloud account where that's stored and locally the device doesn't store historical data at all, or only for catching up in cases of loss or disturbance of the internet connection or upload. I'd say it's fine as long as local data querying is not hindered in any way.

 

anything