Author Topic: Ecowitt.net API release  (Read 11960 times)

0 Members and 1 Guest are viewing this topic.

Offline Rover1822

  • Forecaster
  • *****
  • Posts: 1989
    • Mini Wind and Solar Data project
Re: Ecowitt.net API release
« Reply #50 on: January 26, 2022, 04:00:27 PM »
Brian, the documentation says that the application key can be used with any user key, then the mac defines the station within that users account. So I think the intent it is one-off per application.

Without knowing your intent , then you create a wrapper that communicates with the API and do what you want .

Would you mind defining your intent with the use of the API?

I mean I understand the API is not a ready for a prime time application , what exactly are you after in function? . one off? something to make into an app for others? Not meeting your own use?

I mean also you have complained about numeric being supplied as strings. Surprise, you know how common that is in the real world?. If you don't have the ability to convert with or/ if radix is needed, then you should not be complaining to hard. This is done all the time. If this doesn't match your skill set, I suggest you augment it , as this is how we do stuff. If you are trying to plug this into something else and whining it doesn't meet your ability or needs, work on them.
 
« Last Edit: January 26, 2022, 04:07:02 PM by Rover1822 »
Ambient:
  WS-2000
  PM 2.5(2)
  WH31B(2)
  WH40E
  WH31P
EcoWitt:
  GW1100
  GW1000(4)
  WH31(2)
  WH57
  WH51(12),
  WH40
  WH5360B
  WN34S
  WittBoy WS90 + GW2000
  WS90 (other one) + GW1100
Personal Sites: Weather Cam

Offline waiukuweather

  • Forecaster
  • *****
  • Posts: 1072
Re: Ecowitt.net API release
« Reply #51 on: January 26, 2022, 04:12:15 PM »
why do you say its not ready for a prime time application?
because of the rate limiting applied to the application key? (3 calls per second means even if the application only accessed the data once a minute, on that minute, if 3 applications making a call at the same time, then limit reached...a random time to get data would get around that a bit)

it doesn't mention if that limit resets either? (eg after 5 minutes)
« Last Edit: January 26, 2022, 04:19:47 PM by waiukuweather »

Offline Rover1822

  • Forecaster
  • *****
  • Posts: 1989
    • Mini Wind and Solar Data project
Re: Ecowitt.net API release
« Reply #52 on: January 26, 2022, 04:16:49 PM »
Actually I just meant in the simplicity of use. Wasn't really meaning anything towards the whole key issue.

Sorry If it came off that way

Ambient:
  WS-2000
  PM 2.5(2)
  WH31B(2)
  WH40E
  WH31P
EcoWitt:
  GW1100
  GW1000(4)
  WH31(2)
  WH57
  WH51(12),
  WH40
  WH5360B
  WN34S
  WittBoy WS90 + GW2000
  WS90 (other one) + GW1100
Personal Sites: Weather Cam

Offline waiukuweather

  • Forecaster
  • *****
  • Posts: 1072
Re: Ecowitt.net API release
« Reply #53 on: January 26, 2022, 04:20:53 PM »
I am not the person who complained about strings
that doesn't worry me
you can just parse data out of a string easily anyway

Offline mcrossley

  • Forecaster
  • *****
  • Posts: 1132
    • Wilmslow Astro
Re: Ecowitt.net API release
« Reply #54 on: January 27, 2022, 05:25:02 AM »
It was me!

Don't get me wrong, I think it is great that Ecowitt have released this API. It's just frustration over the process, where it looked like they were going to solicit testing and feedback, but then didn't and we have a poorer produce for that.

For example, they started with a blank piece of paper, and the JSON standard provides a perfectly good value of 'null' for missing values that all the parsers understand. But of the first few sensors I have looked at so far Ecowitt decided sensor #1 will return a value of "140.0" for missing, sensor #2 will return "-", and sensor #3 will not return anything at all. There is no internal self consistency.

It's not that I cannot code all this in, it's just that it all adds up to making things harder and more error prone than they should/could be, and it could have been avoided. That's the frustration.

Anyway, I'll crawl back under my rock and start writing the code!
Mark

Offline olicat

  • Forecaster
  • *****
  • Posts: 1515
  • GWxx00, HPx5x1C, WN1900C, WN1980C & WS3800C
    • FOSHKplugin
Re: Ecowitt.net API release
« Reply #55 on: January 27, 2022, 06:10:02 AM »
Sorry to be offtopic, but:

Quote
Anyway, I'll crawl back under my rock and start writing the code!



Good luck!
;-)

Oliver

Offline waiukuweather

  • Forecaster
  • *****
  • Posts: 1072
Re: Ecowitt.net API release
« Reply #56 on: January 27, 2022, 01:03:25 PM »
getting history data for users of weather programs that use a GW1000 type bridge for when the program is not running seems like a win

Offline waiukuweather

  • Forecaster
  • *****
  • Posts: 1072
Re: Ecowitt.net API release
« Reply #57 on: January 27, 2022, 03:05:37 PM »
one thing that is a bit different re the json data, is that the data is not presented as an array  , i.e ["data"]
but if you treat the data as an object then it works OK

Offline waiukuweather

  • Forecaster
  • *****
  • Posts: 1072
Re: Ecowitt.net API release
« Reply #58 on: January 27, 2022, 09:27:52 PM »
another Q:
re the application API key
would it not be better for the user to create one along with the station api key ?
i.e so that a 3rd party software developer does not have just one application api key being used over and over by stations owners and having the limit rate reached easily?

Offline mcrossley

  • Forecaster
  • *****
  • Posts: 1132
    • Wilmslow Astro
Re: Ecowitt.net API release
« Reply #59 on: January 28, 2022, 03:54:32 AM »
Or remove the rate limit on the application key  ;)
Mark

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: Ecowitt.net API release
« Reply #60 on: January 28, 2022, 04:26:28 AM »
Or remove the rate limit on the application key  ;)

I agree, IMHO hat is the best solution, indeed.
The rate should be applied at the " 1 owner - multiple devices " level.

Wim

Offline olicat

  • Forecaster
  • *****
  • Posts: 1515
  • GWxx00, HPx5x1C, WN1900C, WN1980C & WS3800C
    • FOSHKplugin
Re: Ecowitt.net API release
« Reply #61 on: January 28, 2022, 04:59:26 AM »
To all developers:

Quote
remove the rate limit on the application key
Please ask Ecowitt to do this. Explain the problems regarding the current solution.
And any other suggestions for improvement (especially regarding the JSON structure) should (also) be communicated to Ecowitt.
Admittedly, we first have to accept what is available. But perhaps we can influence a future v4 of the API in this way.

Oliver

Offline waiukuweather

  • Forecaster
  • *****
  • Posts: 1072
Re: Ecowitt.net API release
« Reply #62 on: January 28, 2022, 12:30:59 PM »
i have it working (live data)
will work on history data next

the json structure works OK (just treat the data as an object and not as an array)

Offline mcrossley

  • Forecaster
  • *****
  • Posts: 1132
    • Wilmslow Astro
Re: Ecowitt.net API release
« Reply #63 on: January 28, 2022, 12:36:57 PM »
Yeah, I have historic data working as well. I'll push out a test version to some users to get some broader data sampling.

But I think we have to treat this as "experimental" until we have confirmation from Ecowitt if the API is final and stable.
Mark

Offline Rover1822

  • Forecaster
  • *****
  • Posts: 1989
    • Mini Wind and Solar Data project
Re: Ecowitt.net API release
« Reply #64 on: January 28, 2022, 12:41:26 PM »
Let us hope it is lol. Nothing worse than an API that changes all the time without deprecation. MS, Oracle (JAVA), others really good at messing things up with changes. Everyone hates going back in to alter something. Sadly it happens way too often.
Ambient:
  WS-2000
  PM 2.5(2)
  WH31B(2)
  WH40E
  WH31P
EcoWitt:
  GW1100
  GW1000(4)
  WH31(2)
  WH57
  WH51(12),
  WH40
  WH5360B
  WN34S
  WittBoy WS90 + GW2000
  WS90 (other one) + GW1100
Personal Sites: Weather Cam

Offline waiukuweather

  • Forecaster
  • *****
  • Posts: 1072
Re: Ecowitt.net API release
« Reply #65 on: January 28, 2022, 01:14:51 PM »
now that the API has been made public and developers have spent time working with it, I hope that it does not change much now

Offline waiukuweather

  • Forecaster
  • *****
  • Posts: 1072
Re: Ecowitt.net API release
« Reply #66 on: January 28, 2022, 01:16:49 PM »
Q:
re the start and end dates for the history data
is it UTC based?
(just tested for local time and I got data back...so will proceed)
« Last Edit: January 28, 2022, 01:36:11 PM by waiukuweather »

Offline waiukuweather

  • Forecaster
  • *****
  • Posts: 1072
Re: Ecowitt.net API release
« Reply #67 on: January 28, 2022, 01:56:28 PM »
the history data json data structure is not as easy to work with as the live data is , but it is what it is

Offline Rover1822

  • Forecaster
  • *****
  • Posts: 1989
    • Mini Wind and Solar Data project
Re: Ecowitt.net API release
« Reply #68 on: January 28, 2022, 02:38:00 PM »
I kind of look at it this way, if you are just working with the custom server output, I really don't expect anything better from the API.

I will also be quite honest, I can do what I need from just the custom server output pointed to a service I have, so I have not had a real reason to play with the API.

I di read the doc :)


Ambient:
  WS-2000
  PM 2.5(2)
  WH31B(2)
  WH40E
  WH31P
EcoWitt:
  GW1100
  GW1000(4)
  WH31(2)
  WH57
  WH51(12),
  WH40
  WH5360B
  WN34S
  WittBoy WS90 + GW2000
  WS90 (other one) + GW1100
Personal Sites: Weather Cam

Offline mcrossley

  • Forecaster
  • *****
  • Posts: 1132
    • Wilmslow Astro
Re: Ecowitt.net API release
« Reply #69 on: January 28, 2022, 02:53:20 PM »
Q:
re the start and end dates for the history data
is it UTC based?
(just tested for local time and I got data back...so will proceed)

I don't know, it's hard for me to test being in UTC as local time at the moment. Do the first UNIX timestamps you get back match the start time in UTC or local?
Mark

Offline waiukuweather

  • Forecaster
  • *****
  • Posts: 1072
Re: Ecowitt.net API release
« Reply #70 on: January 28, 2022, 03:46:07 PM »
the start and end time to request data is working as local time for me (I am 13 hours ahead of UTC)
I know its working as I get data returned with no date error
but then the time stamp numbers in the data returned are unix time
and when I convert that, its returned as UTC time
and then when I convert that to local time
its legit

but, the history data most recent is like 30 minutes old?
(the 5 minute interval data, requesting say the last 3 hours)

edit: the weather station I was using stopped updating...duh
« Last Edit: January 28, 2022, 07:02:44 PM by waiukuweather »

Offline mcrossley

  • Forecaster
  • *****
  • Posts: 1132
    • Wilmslow Astro
Re: Ecowitt.net API release
« Reply #71 on: January 28, 2022, 03:56:39 PM »
Thanks for confirming that they are local time.
Re the latest data, the last record I get is the latest 5 minute interval, I'm not seeing a 30 minute gap in mine.
Mark

Offline mcrossley

  • Forecaster
  • *****
  • Posts: 1132
    • Wilmslow Astro
Re: Ecowitt.net API release
« Reply #72 on: January 28, 2022, 03:57:48 PM »
That is requesting anything from a couple of hours to the full 24 hours per request.
Mark

Offline mcrossley

  • Forecaster
  • *****
  • Posts: 1132
    • Wilmslow Astro
Re: Ecowitt.net API release
« Reply #73 on: January 28, 2022, 06:47:05 PM »
OK, more testing, and the historic API never returns the last archive interval for me.

So for example at 23:39, sending a request with an end date of 23:39, I would expect the last record to be for 23:35, it will actually stop at 23:30.
This is consistent with every request I make.
Mark

Offline waiukuweather

  • Forecaster
  • *****
  • Posts: 1072
Re: Ecowitt.net API release
« Reply #74 on: January 28, 2022, 07:03:28 PM »
re my missing latest data..the station I am working with stopped updating...duh
making good progress re history data...nearly done

 

anything