I already have the awekas link with its api that returns the data to me
https://api.awekas.at/current.php?key=tZNpNSIsEGM%2FIxpbyB6exyYvbI8wx8A0rJL6NLJ17c1OIiCvhyjs8S5PJan6b4e7%2FCMC1AV%2B7KfBC0AvYvuAAg%3D%3D
So I should fetch this json file and convert it to csv. weewx doesn't take .json data? Do I have to convert them to json?
the proposed approach is to use the weewx CSV import - how this works is described in
http://www.weewx.com/docs/latest/utilities.htm#wee_import_utilitynow the question is how to get this CSV file
as the AWEKAS API provides a JSON file, this needs to be converted into a CSV file which weewx can import
that mean that that CSV file has to have the names of the data you provide in the proper sequence - example see weewx documentation
the 2nd (and following lines if you import more than one line at a time) line has the data in the sequence of the header line separated by a ";" (without the "")
If you have (or can build) a PHP file/script which downloads the data from AWEKAS, converts the JSON format into a CSV and saves that, you are almost done.
The JSON file has a structure variable_name, "value" - so you have to build a line with all the variable names and another one with all the values, each one (also the variable names) separated by a ";"
after the last value no semicolon !
now save first the line of the names, then the line with the values into the same (txt) file which has then two line - headers and values
(you may save write or print instead of save but that's he same thing here as long as that file with the two lines is created)
When you have created the proper import description (import configuration file with its field map and the other options chosen which have to be in the import config file),
wee_import can import this file into weewx
when your PHP script runs every minute and creates that file (with the same file name), wee_import just also needs to run every minute and do the import
The name of the text file is irrelevant as long as it is a text file and contains the proper headers and values. in your import config file (proposed name import.conf) you refer to the CSV file - what's written there has to match the name of the file you created.
what's your weather station ? Brand, model ?