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

0 Members and 1 Guest are viewing this topic.

Offline docbee

  • Forecaster
  • *****
  • Posts: 734
    • smartbedded
Reading data locally from WLL
« on: May 04, 2019, 05:17:03 AM »
While monitoring the TCP traffic of the WLL it is quite obvious how to get data from it. Please lets share information about that in this thread. As there is no formal API definition from Davis yet, we might do one preliminary for ourselves instead of waiting.

It is plain HTTP GET requests, so no magic tricks from Davis at this point.

As I don't have sensors connected yet it returns an error message when doing a request on "/v1/real_time":

Code: [Select]
mars:~ # curl 192.168.123.232/v1/real_time

{"data":null,"error":{"code":409,"message":"No ISS Transmitters.  Real Time broadcast not enabled"}}

More interesting is asking for current conditions:

Code: [Select]
mars:~ # curl 192.168.123.232/v1/current_conditions

{"data":{"did":"XXXXXXXXXXXX","ts":1556961293,"conditions":[{"lsid":225156,"data_structure_type":4,"temp_in": 77.2,"hum_in":34.9,"dew_point_in": 47.4,"heat_index_in": 75.7},{"lsid":225155,"data_structure_type":3,"bar_sea_level":29.596,"bar_trend":null,"bar_absolute":29.585}]},"error":null}

All rather straight forward JSON.  :grin:

Can you please also post example replies here, preferably with some larger arrays connected?
founder of smartbedded.com - home of meteohub, meteoplug, meteobridge, meteostick

Offline waiukuweather

  • Forecaster
  • *****
  • Posts: 880
Re: Reading data locally from WLL
« Reply #1 on: May 04, 2019, 05:34:33 AM »
interesting
good work
I would presume its not a static IP address?
so how does the Davis app get around the problem of when the IP address is changed? (e.g if the WLL is reset?)

Offline kobuki

  • Forecaster
  • *****
  • Posts: 737
Re: Reading data locally from WLL
« Reply #2 on: May 04, 2019, 06:42:59 AM »
It is plain HTTP GET requests, so no magic tricks from Davis at this point.
That's exactly what I thought after someone mentioned in the other general thread that probing the WLL with a browser, a JSON error string is returned :)  I was 100% sure someone will take the effort and sniff that traffic. Nice, Boris. I guess you're eager to support this device, too.

Offline kobuki

  • Forecaster
  • *****
  • Posts: 737
Re: Reading data locally from WLL
« Reply #3 on: May 04, 2019, 06:45:34 AM »
so how does the Davis app get around the problem of when the IP address is changed? (e.g if the WLL is reset?)
There are standard ways for that like STUN, some kind of broadcast, client app probing the local subnet, mDNS, or simply the WLL reports its local IP to the cloud and that passes on the info to the app. I'm sure I could quickly invent some more.

Offline docbee

  • Forecaster
  • *****
  • Posts: 734
    • smartbedded
Re: Reading data locally from WLL
« Reply #4 on: May 04, 2019, 07:52:50 AM »
I guess you're eager to support this device, too.

Yes, of course as the ones not wanting to be locked-in to Davis and like to do with their weather data what, when and how they like are my target market.

As mentioned before, it will speed up things, if users of WLL with a larger sensor set will post their data here. So, please gimme and the other developers listening here data to work with.  :grin:
founder of smartbedded.com - home of meteohub, meteoplug, meteobridge, meteostick

Offline kobuki

  • Forecaster
  • *****
  • Posts: 737
Re: Reading data locally from WLL
« Reply #5 on: May 04, 2019, 08:01:17 AM »
So, please gimme and the other developers listening here data to work with.  :grin:
I would of course but my little paradox is I don't want to buy one until I see I can freely access the data it's spitting out. I wonder how the real time update of eg. the wind data is transmitted.

Offline johnd

  • Forecaster
  • *****
  • Posts: 3663
    • www.weatherstations.co.uk
Re: Reading data locally from WLL
« Reply #6 on: May 04, 2019, 08:25:17 AM »
Might be useful to understand/document the trigger for the UDP broadcasts.
Prodata Weather Systems
Prodata's dedicated Davis EnviroMonitor website
UK Davis Premier Dealer - All Davis stations, accessories and spares
Littleport, Ely, Cambs UK

Sorry, but I can't help with individual issues by email. Please post your issue in the relevant forum section here & I will comment there if I have anything useful to add.

Offline miraculon

  • Sunrise Side Weather
  • Forecaster
  • *****
  • Posts: 3629
  • KE8DAF
    • Sunrise Side Weather in Rogers City MI USA
Re: Reading data locally from WLL
« Reply #7 on: May 04, 2019, 08:30:02 AM »
I just pasted the URL for my WLL into the Edge browser (Firefox shows it briefly and then gives a "connection was reset" error). I found the IP address using AngryIP. There is a Hostname of WeatherLinkLIVE.localdomain listed by AngryIP. It works in the browser with v1/current_conditions appended. This responds with the same result as the IP address: http://weatherlinklive.localdomain/v1/current_conditions

My WLL shows this for "current_conditions":

Code: [Select]
{"data":{"did":"001D0_REDACTED","ts":1556972192,"conditions":[{"lsid":224114,"data_structure_type":1,"txid":2,"temp":-99.0,"hum":null,"dew_point":null,"wet_bulb":null,"heat_index":null,"wind_chill":-107.8,"thw_index":null,"thsw_index":null,"wind_speed_last":1.00,"wind_dir_last":288,"wind_speed_avg_last_1_min":0.06,"wind_dir_scalar_avg_last_1_min":288,"wind_speed_avg_last_2_min":0.50,"wind_dir_scalar_avg_last_2_min":288,"wind_speed_hi_last_2_min":1.00,"wind_dir_at_hi_speed_last_2_min":288,"wind_speed_avg_last_10_min":1.37,"wind_dir_scalar_avg_last_10_min":286,"wind_speed_hi_last_10_min":4.00,"wind_dir_at_hi_speed_last_10_min":287,"rain_size":1,"rain_rate_last":0,"rain_rate_hi":0,"rainfall_last_15_min":0,"rain_rate_hi_last_15_min":0,"rainfall_last_60_min":0,"rainfall_last_24_hr":0,"rain_storm":null,"rain_storm_start_at":null,"solar_rad":1782,"uv_index":null,"rx_state":0,"trans_battery_flag":0,"rainfall_daily":0,"rainfall_monthly":0,"rainfall_year":0,"rain_storm_last":null,"rain_storm_last_start_at":null,"rain_storm_last_end_at":null},{"lsid":224115,"data_structure_type":1,"txid":3,"temp": 44.1,"hum":72.2,"dew_point": 35.7,"wet_bulb": 39.7,"heat_index": 44.1,"wind_chill":null,"thw_index":null,"thsw_index":null,"wind_speed_last":null,"wind_dir_last":null,"wind_speed_avg_last_1_min":null,"wind_dir_scalar_avg_last_1_min":null,"wind_speed_avg_last_2_min":null,"wind_dir_scalar_avg_last_2_min":null,"wind_speed_hi_last_2_min":null,"wind_dir_at_hi_speed_last_2_min":null,"wind_speed_avg_last_10_min":null,"wind_dir_scalar_avg_last_10_min":null,"wind_speed_hi_last_10_min":null,"wind_dir_at_hi_speed_last_10_min":null,"rain_size":1,"rain_rate_last":0,"rain_rate_hi":0,"rainfall_last_15_min":0,"rain_rate_hi_last_15_min":0,"rainfall_last_60_min":0,"rainfall_last_24_hr":0,"rain_storm":0,"rain_storm_start_at":null,"solar_rad":null,"uv_index":null,"rx_state":0,"trans_battery_flag":0,"rainfall_daily":0,"rainfall_monthly":847,"rainfall_year":1037,"rain_storm_last":847,"rain_storm_last_start_at":1556706240,"rain_storm_last_end_at":1556924461},{"lsid":224116,"data_structure_type":1,"txid":4,"temp": 46.7,"hum":null,"dew_point":null,"wet_bulb":null,"heat_index":null,"wind_chill": 46.7,"thw_index":null,"thsw_index":null,"wind_speed_last":1.00,"wind_dir_last":24,"wind_speed_avg_last_1_min":0.25,"wind_dir_scalar_avg_last_1_min":180,"wind_speed_avg_last_2_min":0.62,"wind_dir_scalar_avg_last_2_min":217,"wind_speed_hi_last_2_min":2.00,"wind_dir_at_hi_speed_last_2_min":272,"wind_speed_avg_last_10_min":1.37,"wind_dir_scalar_avg_last_10_min":265,"wind_speed_hi_last_10_min":4.00,"wind_dir_at_hi_speed_last_10_min":270,"rain_size":1,"rain_rate_last":0,"rain_rate_hi":0,"rainfall_last_15_min":0,"rain_rate_hi_last_15_min":0,"rainfall_last_60_min":0,"rainfall_last_24_hr":0,"rain_storm":null,"rain_storm_start_at":null,"solar_rad":1731,"uv_index":16.0,"rx_state":0,"trans_battery_flag":0,"rainfall_daily":0,"rainfall_monthly":0,"rainfall_year":0,"rain_storm_last":null,"rain_storm_last_start_at":null,"rain_storm_last_end_at":null},{"lsid":224117,"data_structure_type":1,"txid":5,"temp": 42.3,"hum":80.6,"dew_point": 36.8,"wet_bulb": 39.5,"heat_index": 42.3,"wind_chill": 42.3,"thw_index": 42.3,"thsw_index": 40.3,"wind_speed_last":0.00,"wind_dir_last":0,"wind_speed_avg_last_1_min":0.00,"wind_dir_scalar_avg_last_1_min":null,"wind_speed_avg_last_2_min":0.00,"wind_dir_scalar_avg_last_2_min":null,"wind_speed_hi_last_2_min":null,"wind_dir_at_hi_speed_last_2_min":null,"wind_speed_avg_last_10_min":0.06,"wind_dir_scalar_avg_last_10_min":null,"wind_speed_hi_last_10_min":1.00,"wind_dir_at_hi_speed_last_10_min":351,"rain_size":1,"rain_rate_last":0,"rain_rate_hi":0,"rainfall_last_15_min":0,"rain_rate_hi_last_15_min":0,"rainfall_last_60_min":0,"rainfall_last_24_hr":0,"rain_storm":0,"rain_storm_start_at":null,"solar_rad":309,"uv_index":0.8,"rx_state":0,"trans_battery_flag":0,"rainfall_daily":0,"rainfall_monthly":90,"rainfall_year":95,"rain_storm_last":3,"rain_storm_last_start_at":1556834760,"rain_storm_last_end_at":1556924461},{"lsid":224118,"data_structure_type":1,"txid":6,"temp": 44.8,"hum":null,"dew_point":null,"wet_bulb":null,"heat_index":null,"wind_chill":null,"thw_index":null,"thsw_index":null,"wind_speed_last":null,"wind_dir_last":null,"wind_speed_avg_last_1_min":null,"wind_dir_scalar_avg_last_1_min":null,"wind_speed_avg_last_2_min":null,"wind_dir_scalar_avg_last_2_min":null,"wind_speed_hi_last_2_min":null,"wind_dir_at_hi_speed_last_2_min":null,"wind_speed_avg_last_10_min":null,"wind_dir_scalar_avg_last_10_min":null,"wind_speed_hi_last_10_min":null,"wind_dir_at_hi_speed_last_10_min":null,"rain_size":1,"rain_rate_last":0,"rain_rate_hi":0,"rainfall_last_15_min":0,"rain_rate_hi_last_15_min":0,"rainfall_last_60_min":0,"rainfall_last_24_hr":0,"rain_storm":0,"rain_storm_start_at":null,"solar_rad":null,"uv_index":null,"rx_state":0,"trans_battery_flag":0,"rainfall_daily":0,"rainfall_monthly":106,"rainfall_year":113,"rain_storm_last":106,"rain_storm_last_start_at":1556709480,"rain_storm_last_end_at":1556924461},{"lsid":224119,"data_structure_type":1,"txid":7,"temp": 39.9,"hum":null,"dew_point":null,"wet_bulb":null,"heat_index":null,"wind_chill":null,"thw_index":null,"thsw_index":null,"wind_speed_last":null,"wind_dir_last":null,"wind_speed_avg_last_1_min":null,"wind_dir_scalar_avg_last_1_min":null,"wind_speed_avg_last_2_min":null,"wind_dir_scalar_avg_last_2_min":null,"wind_speed_hi_last_2_min":null,"wind_dir_at_hi_speed_last_2_min":null,"wind_speed_avg_last_10_min":null,"wind_dir_scalar_avg_last_10_min":null,"wind_speed_hi_last_10_min":null,"wind_dir_at_hi_speed_last_10_min":null,"rain_size":1,"rain_rate_last":0,"rain_rate_hi":0,"rainfall_last_15_min":0,"rain_rate_hi_last_15_min":0,"rainfall_last_60_min":0,"rainfall_last_24_hr":0,"rain_storm":null,"rain_storm_start_at":null,"solar_rad":null,"uv_index":null,"rx_state":0,"trans_battery_flag":0,"rainfall_daily":0,"rainfall_monthly":0,"rainfall_year":0,"rain_storm_last":null,"rain_storm_last_start_at":null,"rain_storm_last_end_at":null},{"lsid":224112,"data_structure_type":4,"temp_in": 65.1,"hum_in":44.9,"dew_point_in": 43.2,"heat_index_in": 62.9},{"lsid":224111,"data_structure_type":3,"bar_sea_level":30.125,"bar_trend": 0.033,"bar_absolute":29.472}]},"error":null}
and real_time:

Code: [Select]
{"data":{"broadcast_port":22222,"duration":1200},"error":null}
Greg H.
« Last Edit: May 18, 2019, 11:26:45 AM by miraculon »


Blitzortung Stations #706 and #1682
CoCoRaHS: MI-PI-1
CWOP: CW4114 and KE8DAF-13
WU: KMIROGER7
Amateur Radio Callsign: KE8DAF

Offline docbee

  • Forecaster
  • *****
  • Posts: 734
    • smartbedded
Re: Reading data locally from WLL
« Reply #8 on: May 04, 2019, 09:00:18 AM »
@miraculon: Looks like you have
on TX #2 a wind plus solar station
on TX #3 a temp/hum plus rain station
on TX #4 a wind plus UV and solar station
on TX #5 a ISS with UV and solar
on TX #6 a temp/hum plus rain station
on TX #7 a temp station

Is that right? Existing data does not seem to match available Davis stations types perfectly.
Station identifier (telling what kind of station it is) seems not to be in the data. May be the user has to define that within the SW and SW just grabs the data pieces from JSON that make sense to the selected sensor type... still guessing
founder of smartbedded.com - home of meteohub, meteoplug, meteobridge, meteostick

Offline kobuki

  • Forecaster
  • *****
  • Posts: 737
Re: Reading data locally from WLL
« Reply #9 on: May 04, 2019, 09:00:49 AM »
Might be useful to understand/document the trigger for the UDP broadcasts.
Are you sure there's such a thing? That UDP broadcast type thing is for a different company's unique custom solution.

Offline johnd

  • Forecaster
  • *****
  • Posts: 3663
    • www.weatherstations.co.uk
Re: Reading data locally from WLL
« Reply #10 on: May 04, 2019, 09:04:47 AM »
Are you sure there's such a thing?

Yes.
Prodata Weather Systems
Prodata's dedicated Davis EnviroMonitor website
UK Davis Premier Dealer - All Davis stations, accessories and spares
Littleport, Ely, Cambs UK

Sorry, but I can't help with individual issues by email. 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: 737
Re: Reading data locally from WLL
« Reply #11 on: May 04, 2019, 09:05:21 AM »
...
My WLL shows this for "current_conditions":
...
That's a lot of data you got there. Hint: I pasted your data to http://json.parser.online.fr/ to have a better look.

Offline kobuki

  • Forecaster
  • *****
  • Posts: 737
Re: Reading data locally from WLL
« Reply #12 on: May 04, 2019, 09:07:09 AM »
Are you sure there's such a thing?
Yes.
And what do those broadcast messages carry? All we're aware of are the json messages, no mention of any UDP thing. Could you please point me to the source of that information? Maybe I have missed an important bit here.

@docbee, what are you seeing? Have you encountered those UDP messages?

Offline docbee

  • Forecaster
  • *****
  • Posts: 734
    • smartbedded
Re: Reading data locally from WLL
« Reply #13 on: May 04, 2019, 09:08:15 AM »
Data from Greg in a better format...

Code: [Select]
{

    "data":{
        "did":"XXXXXXXXXX",
        "ts":1556972192,
        "conditions":[
            {
                "lsid":224114,
                "data_structure_type":1,
                "txid":2,
                "temp":-99.0,
                "hum":null,
                "dew_point":null,
                "wet_bulb":null,
                "heat_index":null,
                "wind_chill":-107.8,
                "thw_index":null,
                "thsw_index":null,
                "wind_speed_last":1.00,
                "wind_dir_last":288,
                "wind_speed_avg_last_1_min":0.06,
                "wind_dir_scalar_avg_last_1_min":288,
                "wind_speed_avg_last_2_min":0.50,
                "wind_dir_scalar_avg_last_2_min":288,
                "wind_speed_hi_last_2_min":1.00,
                "wind_dir_at_hi_speed_last_2_min":288,
                "wind_speed_avg_last_10_min":1.37,
                "wind_dir_scalar_avg_last_10_min":286,
                "wind_speed_hi_last_10_min":4.00,
                "wind_dir_at_hi_speed_last_10_min":287,
                "rain_size":1,
                "rain_rate_last":0,
                "rain_rate_hi":0,
                "rainfall_last_15_min":0,
                "rain_rate_hi_last_15_min":0,
                "rainfall_last_60_min":0,
                "rainfall_last_24_hr":0,
                "rain_storm":null,
                "rain_storm_start_at":null,
                "solar_rad":1782,
                "uv_index":null,
                "rx_state":0,
                "trans_battery_flag":0,
                "rainfall_daily":0,
                "rainfall_monthly":0,
                "rainfall_year":0,
                "rain_storm_last":null,
                "rain_storm_last_start_at":null,
                "rain_storm_last_end_at":null
            },
            {
                "lsid":224115,
                "data_structure_type":1,
                "txid":3,
                "temp":44.1,
                "hum":72.2,
                "dew_point":35.7,
                "wet_bulb":39.7,
                "heat_index":44.1,
                "wind_chill":null,
                "thw_index":null,
                "thsw_index":null,
                "wind_speed_last":null,
                "wind_dir_last":null,
                "wind_speed_avg_last_1_min":null,
                "wind_dir_scalar_avg_last_1_min":null,
                "wind_speed_avg_last_2_min":null,
                "wind_dir_scalar_avg_last_2_min":null,
                "wind_speed_hi_last_2_min":null,
                "wind_dir_at_hi_speed_last_2_min":null,
                "wind_speed_avg_last_10_min":null,
                "wind_dir_scalar_avg_last_10_min":null,
                "wind_speed_hi_last_10_min":null,
                "wind_dir_at_hi_speed_last_10_min":null,
                "rain_size":1,
                "rain_rate_last":0,
                "rain_rate_hi":0,
                "rainfall_last_15_min":0,
                "rain_rate_hi_last_15_min":0,
                "rainfall_last_60_min":0,
                "rainfall_last_24_hr":0,
                "rain_storm":0,
                "rain_storm_start_at":null,
                "solar_rad":null,
                "uv_index":null,
                "rx_state":0,
                "trans_battery_flag":0,
                "rainfall_daily":0,
                "rainfall_monthly":847,
                "rainfall_year":1037,
                "rain_storm_last":847,
                "rain_storm_last_start_at":1556706240,
                "rain_storm_last_end_at":1556924461
            },
            {
                "lsid":224116,
                "data_structure_type":1,
                "txid":4,
                "temp":46.7,
                "hum":null,
                "dew_point":null,
                "wet_bulb":null,
                "heat_index":null,
                "wind_chill":46.7,
                "thw_index":null,
                "thsw_index":null,
                "wind_speed_last":1.00,
                "wind_dir_last":24,
                "wind_speed_avg_last_1_min":0.25,
                "wind_dir_scalar_avg_last_1_min":180,
                "wind_speed_avg_last_2_min":0.62,
                "wind_dir_scalar_avg_last_2_min":217,
                "wind_speed_hi_last_2_min":2.00,
                "wind_dir_at_hi_speed_last_2_min":272,
                "wind_speed_avg_last_10_min":1.37,
                "wind_dir_scalar_avg_last_10_min":265,
                "wind_speed_hi_last_10_min":4.00,
                "wind_dir_at_hi_speed_last_10_min":270,
                "rain_size":1,
                "rain_rate_last":0,
                "rain_rate_hi":0,
                "rainfall_last_15_min":0,
                "rain_rate_hi_last_15_min":0,
                "rainfall_last_60_min":0,
                "rainfall_last_24_hr":0,
                "rain_storm":null,
                "rain_storm_start_at":null,
                "solar_rad":1731,
                "uv_index":16.0,
                "rx_state":0,
                "trans_battery_flag":0,
                "rainfall_daily":0,
                "rainfall_monthly":0,
                "rainfall_year":0,
                "rain_storm_last":null,
                "rain_storm_last_start_at":null,
                "rain_storm_last_end_at":null
            },
            {
                "lsid":224117,
                "data_structure_type":1,
                "txid":5,
                "temp":42.3,
                "hum":80.6,
                "dew_point":36.8,
                "wet_bulb":39.5,
                "heat_index":42.3,
                "wind_chill":42.3,
                "thw_index":42.3,
                "thsw_index":40.3,
                "wind_speed_last":0.00,
                "wind_dir_last":0,
                "wind_speed_avg_last_1_min":0.00,
                "wind_dir_scalar_avg_last_1_min":null,
                "wind_speed_avg_last_2_min":0.00,
                "wind_dir_scalar_avg_last_2_min":null,
                "wind_speed_hi_last_2_min":null,
                "wind_dir_at_hi_speed_last_2_min":null,
                "wind_speed_avg_last_10_min":0.06,
                "wind_dir_scalar_avg_last_10_min":null,
                "wind_speed_hi_last_10_min":1.00,
                "wind_dir_at_hi_speed_last_10_min":351,
                "rain_size":1,
                "rain_rate_last":0,
                "rain_rate_hi":0,
                "rainfall_last_15_min":0,
                "rain_rate_hi_last_15_min":0,
                "rainfall_last_60_min":0,
                "rainfall_last_24_hr":0,
                "rain_storm":0,
                "rain_storm_start_at":null,
                "solar_rad":309,
                "uv_index":0.8,
                "rx_state":0,
                "trans_battery_flag":0,
                "rainfall_daily":0,
                "rainfall_monthly":90,
                "rainfall_year":95,
                "rain_storm_last":3,
                "rain_storm_last_start_at":1556834760,
                "rain_storm_last_end_at":1556924461
            },
            {
                "lsid":224118,
                "data_structure_type":1,
                "txid":6,
                "temp":44.8,
                "hum":null,
                "dew_point":null,
                "wet_bulb":null,
                "heat_index":null,
                "wind_chill":null,
                "thw_index":null,
                "thsw_index":null,
                "wind_speed_last":null,
                "wind_dir_last":null,
                "wind_speed_avg_last_1_min":null,
                "wind_dir_scalar_avg_last_1_min":null,
                "wind_speed_avg_last_2_min":null,
                "wind_dir_scalar_avg_last_2_min":null,
                "wind_speed_hi_last_2_min":null,
                "wind_dir_at_hi_speed_last_2_min":null,
                "wind_speed_avg_last_10_min":null,
                "wind_dir_scalar_avg_last_10_min":null,
                "wind_speed_hi_last_10_min":null,
                "wind_dir_at_hi_speed_last_10_min":null,
                "rain_size":1,
                "rain_rate_last":0,
                "rain_rate_hi":0,
                "rainfall_last_15_min":0,
                "rain_rate_hi_last_15_min":0,
                "rainfall_last_60_min":0,
                "rainfall_last_24_hr":0,
                "rain_storm":0,
                "rain_storm_start_at":null,
                "solar_rad":null,
                "uv_index":null,
                "rx_state":0,
                "trans_battery_flag":0,
                "rainfall_daily":0,
                "rainfall_monthly":106,
                "rainfall_year":113,
                "rain_storm_last":106,
                "rain_storm_last_start_at":1556709480,
                "rain_storm_last_end_at":1556924461
            },
            {
                "lsid":224119,
                "data_structure_type":1,
                "txid":7,
                "temp":39.9,
                "hum":null,
                "dew_point":null,
                "wet_bulb":null,
                "heat_index":null,
                "wind_chill":null,
                "thw_index":null,
                "thsw_index":null,
                "wind_speed_last":null,
                "wind_dir_last":null,
                "wind_speed_avg_last_1_min":null,
                "wind_dir_scalar_avg_last_1_min":null,
                "wind_speed_avg_last_2_min":null,
                "wind_dir_scalar_avg_last_2_min":null,
                "wind_speed_hi_last_2_min":null,
                "wind_dir_at_hi_speed_last_2_min":null,
                "wind_speed_avg_last_10_min":null,
                "wind_dir_scalar_avg_last_10_min":null,
                "wind_speed_hi_last_10_min":null,
                "wind_dir_at_hi_speed_last_10_min":null,
                "rain_size":1,
                "rain_rate_last":0,
                "rain_rate_hi":0,
                "rainfall_last_15_min":0,
                "rain_rate_hi_last_15_min":0,
                "rainfall_last_60_min":0,
                "rainfall_last_24_hr":0,
                "rain_storm":null,
                "rain_storm_start_at":null,
                "solar_rad":null,
                "uv_index":null,
                "rx_state":0,
                "trans_battery_flag":0,
                "rainfall_daily":0,
                "rainfall_monthly":0,
                "rainfall_year":0,
                "rain_storm_last":null,
                "rain_storm_last_start_at":null,
                "rain_storm_last_end_at":null
            },
            {
                "lsid":224112,
                "data_structure_type":4,
                "temp_in":65.1,
                "hum_in":44.9,
                "dew_point_in":43.2,
                "heat_index_in":62.9
            },
            {
                "lsid":224111,
                "data_structure_type":3,
                "bar_sea_level":30.125,
                "bar_trend":0.033,
                "bar_absolute":29.472
            }
        ]
    },
    "error":null
« Last Edit: May 18, 2019, 11:42:41 AM by docbee »
founder of smartbedded.com - home of meteohub, meteoplug, meteobridge, meteostick

Offline docbee

  • Forecaster
  • *****
  • Posts: 734
    • smartbedded
Re: Reading data locally from WLL
« Reply #14 on: May 04, 2019, 09:16:05 AM »
@docbee, what are you seeing? Have you encountered those UDP messages?

Nope, I am happy to work on the HTTP GET responses. If they update in good frequency this is all we need ;-)
founder of smartbedded.com - home of meteohub, meteoplug, meteobridge, meteostick

Offline kobuki

  • Forecaster
  • *****
  • Posts: 737
Re: Reading data locally from WLL
« Reply #15 on: May 04, 2019, 09:53:00 AM »
@docbee, what are you seeing? Have you encountered those UDP messages?

Nope, I am happy to work on the HTTP GET responses. If they update in good frequency this is all we need ;-)
I see, not even if you start the WLL app in an Android emulator like Nox (if you've tried, that is)?

Offline johnd

  • Forecaster
  • *****
  • Posts: 3663
    • www.weatherstations.co.uk
Re: Reading data locally from WLL
« Reply #16 on: May 04, 2019, 09:57:25 AM »
@kobuki: Just in case you don't spot it, you should have a PM.
Prodata Weather Systems
Prodata's dedicated Davis EnviroMonitor website
UK Davis Premier Dealer - All Davis stations, accessories and spares
Littleport, Ely, Cambs UK

Sorry, but I can't help with individual issues by email. 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: 737
Re: Reading data locally from WLL
« Reply #17 on: May 04, 2019, 10:08:21 AM »
@kobuki: Just in case you don't spot it, you should have a PM.
Thanks, just read it. Thanks for the heads-up, as I rely on the email notifications and they tend to be sent out slowly nowadays from wxforum. Anyway, looks interesting.

Offline galfert

  • Global Moderator
  • Forecaster
  • *****
  • Posts: 5076
Re: Reading data locally from WLL
« Reply #18 on: May 04, 2019, 10:40:37 AM »
Very nice Boris. You know your stuff.
Ecowitt GW1000 | Meteobridge (WeatherBridge)
WU: KFLWINTE111  |  PWSweather: KFLWINTE111
CWOP: FW3708  |  AWEKAS: 14814
Windy: pws-f075acbe
Weather Underground Issue Tracking
Tele-Pole

Offline kobuki

  • Forecaster
  • *****
  • Posts: 737
Re: Reading data locally from WLL
« Reply #19 on: May 04, 2019, 11:22:36 AM »
With consent from John, I'm pasting a single UDP packet worth of json data from his packet capture:

Code: [Select]
{
    "did":"mac-address-of-WLL",
    "ts":1556813312,
    "conditions":[
        {
            "lsid":220585,
            "data_structure_type":1,
            "txid":1,
            "wind_speed_last":0.75,
            "wind_dir_last":310,
            "rain_size":2,
            "rain_rate_last":0,
            "rain_15_min":0,
            "rain_60_min":0,
            "rain_24_hr":5,
            "rain_storm":5,
            "rain_storm_start_at":1556740140,
            "rainfall_daily":1,
            "rainfall_monthly":5,
            "rainfall_year":17,
            "wind_speed_hi_last_10_min":2.31,
            "wind_dir_at_hi_speed_last_10_min":337
        },
        {
            "lsid":220586,
            "data_structure_type":1,
            "txid":2,
            "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
        }
    ]
}

They are sent at standard LOOP packet intervals, apparently (it could be radio message interval, I haven't investigated thoroughly). Unfortunately it is currently not known how to trigger these broadcast messages. The flow is possibly triggered by the startup of the mobile app, a login on the WL website, or some similar action. More captures and analysis is needed, unless we somehow acquire an API docs from Davis in the meantime. However, with the info in this thread, it's possible to start making an independent driver for eg. WeeWx...

EDIT: maybe it's worth a try calling http://weatherlinklive.localdomain/v1/real_time with sensors connected as mentioned in previous posts...
« Last Edit: May 04, 2019, 11:30:30 AM by kobuki »

Offline docbee

  • Forecaster
  • *****
  • Posts: 734
    • smartbedded
Re: Reading data locally from WLL
« Reply #20 on: May 04, 2019, 11:31:22 AM »
Payload looks pretty much the same. Always good to have 2 ways to get data. While the HTTP GET request can be routed the UDP broadcast does not need constant polling (but we currently don't know how to start it). My fear is that Davis will need you to have a certain subscription that tells the WLL unit to support UDP broadcasts. But at current state this is just guessing.

Do the HTTP Get requests also show updated data (especially wind data) every 2.5 seconds when polled with that frequency?
founder of smartbedded.com - home of meteohub, meteoplug, meteobridge, meteostick

Offline kobuki

  • Forecaster
  • *****
  • Posts: 737
Re: Reading data locally from WLL
« Reply #21 on: May 04, 2019, 11:41:13 AM »
Yeah. There are a few things to try:

1. Get (pull) data using a standard free subscription via http from the device each minute, for example. It should just work, I think.
2. Pull the real_time url to try starting the udp stream.

1. would be good for normal archive records, 2. would initiate real time updates. If 2. can work independently from 1, it would be enough in itself to build the contents of the archive records.

Offline johnd

  • Forecaster
  • *****
  • Posts: 3663
    • www.weatherstations.co.uk
Re: Reading data locally from WLL
« Reply #22 on: May 04, 2019, 11:58:56 AM »
The flow is possibly triggered by the startup of the mobile app, a login on the WL website, or some similar action.

The UDP flow is absent until the WL app starts up on the local network - that appears to be the (or at least one) trigger in principle. But the details of the message exchange that starts (and then maintains) the flow aren't clear as yet. Mark, not sure whether you might be able to add any extra snippetts?
« Last Edit: May 04, 2019, 12:02:39 PM by johnd »
Prodata Weather Systems
Prodata's dedicated Davis EnviroMonitor website
UK Davis Premier Dealer - All Davis stations, accessories and spares
Littleport, Ely, Cambs UK

Sorry, but I can't help with individual issues by email. 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: 737
Re: Reading data locally from WLL
« Reply #23 on: May 04, 2019, 12:05:34 PM »
Code: [Select]
mars:~ # curl 192.168.123.232/v1/real_time

{"data":null,"error":{"code":409,"message":"No ISS Transmitters.  Real Time broadcast not enabled"}}
What about this, with transmitters actually connected?

Offline waiukuweather

  • Forecaster
  • *****
  • Posts: 880
Re: Reading data locally from WLL
« Reply #24 on: May 04, 2019, 02:35:23 PM »
so the real time http get returns the port number of the UDP broadcast
to get the real time windspeed and direction and rain data
but its not known what triggers that UDP data to start up sending

but for now using the current conditions http get call you can get all the other data (I wonder how fast WLL can process those calls?)
« Last Edit: May 04, 2019, 02:44:51 PM by waiukuweather »