new plugin ecowittNet

Post Reply
davidefa
Expert
Expert
Posts: 862
Joined: Tue Jan 12, 2021 8:03 am
Location: Italy
Station model: WH2650
Software: WH2650 (direct upload)
Contact:

new plugin ecowittNet

Post by davidefa » Sat Jul 30, 2022 9:25 pm

This plugin retrieves the data to feed the meteotemplate database from ecowitt.net via the ecowitt v3 api.
If for, some reason, you can't use the ecowitt plugin, this plugin is for you.

Installation:
- extract the compressed archive in the plugin folder
- copy the updateEcowittNet.php script in the load/crons folder ( and set a cron job, if not already set, to execute the load/cron.php script as described in the wiki )
- execute the plugin setup via the meteotemplate control panel ( it could be quite long if you have many sensors )

Setup:
1) first time you execute the setup insert your application_key, api_key and mac address, click the 'save' button and reload the page
2) you have now access to all your 'sensors'
3) now you have to set the 3 parameters:
- MT Field ( field name as used by meteotemplate T,H,P,W,G,B... see meteotemplate wiki, you can use also other field names, all will be imported in the meteotemplatreLive.txt file )
- Conversion ( unit of measure conversion from the ecowitt format to the format used in the meteotemplate database, the alldata table has user definable unit of measure of each fields via the main setup, the alldataExtra table fields all have fixed unit of measure, for example extra temperature sensors are always saved in °C, even if main outdoor temperature is saved in °F )
- Enabled ( enable all sensor you want to pass to meteotemplate )

NOTE
Ecowitt has a 'funny' way of defining your sensors ( for example you'll find the sensors of a WS65 in group outdoor, solar_and_uvi , rain and wind ) and you need to carefully choose which to import.
The file cache/updateEcowittNetLog.txt contains a log of the import process.

v1.0
- initial release

v1.1
- typo correction ( it affects only linux servers )

ecowittnet01.png
ecowittnet01.png (452.26 KiB) Viewed 1943 times
Attachments
ecowittNet_1.1.zip
(7.37 KiB) Downloaded 64 times
ecowittNet_1.0.zip
(7.35 KiB) Downloaded 42 times
Last edited by davidefa on Sun Aug 28, 2022 4:35 pm, edited 4 times in total.
Image

User avatar
Dehatter
Professional
Professional
Posts: 349
Joined: Sun Jan 07, 2018 5:11 am
Location: Matthews, NC, USA
Station model: Ecowitt WH80
Software: Ecowitt GW1000
Contact:

Re: new plugin ecowittNet

Post by Dehatter » Thu Aug 04, 2022 6:38 pm

Is there an index.php missing from the download?
Image

davidefa
Expert
Expert
Posts: 862
Joined: Tue Jan 12, 2021 8:03 am
Location: Italy
Station model: WH2650
Software: WH2650 (direct upload)
Contact:

Re: new plugin ecowittNet

Post by davidefa » Thu Aug 04, 2022 8:40 pm

No, actually there is no index.php script, as all the functionalities of the plugin are carried out by the updateEcowittNet.php ( import current data ) and the setup.php ( configuration ).
I'd like to extend the features of the plugin to include the import of 'historic data' ( in the 'near future' ).

The configuration of the plugin consists in defining the 'ecowitt fields' to import in the 'meteotemplate database'
Here the configuration I use in my test site ( to import n.1 ws65, n.1 wh32b, n.1 wh57, n.2 wh31 and n.2 wh51 )
Attachments
EcowittNetConf.zip
(258.12 KiB) Downloaded 71 times
Image

User avatar
meteoesine
Forecaster
Forecaster
Posts: 166
Joined: Sun Aug 20, 2017 4:08 pm
Location: Esine, Valcamonica (BS) - Italy
Station model: Davis Pro2+
Software: Meteobridge nano
Contact:

Re: new plugin ecowittNet

Post by meteoesine » Fri Aug 05, 2022 7:52 am

one question:
in my specific case that I use ecowitt ONLY for the wh57 (lightning) and the WH51 (soil moisture) via GW1100 (now with the ecowitt 3.0 plugin), do you say that it is appropriate to switch to this new plugin, perhaps in view of the next developments?

furthermore, where do I find the 'application_key'?
thank you
:arrow: https://meteoesine.it
ham wx aprs/cwop: IW2LAO-13

Image

davidefa
Expert
Expert
Posts: 862
Joined: Tue Jan 12, 2021 8:03 am
Location: Italy
Station model: WH2650
Software: WH2650 (direct upload)
Contact:

Re: new plugin ecowittNet

Post by davidefa » Fri Aug 05, 2022 8:47 am

No, I think you won't find any improvement using this plugin.
Is more oriented towards those who can't use the 'custom upload' ( for example because are on an 'https' server and are unable to disable the http->https redirection )

The api key can be generated on ecowitt.net -> user profile page

ecowitt_apikey.png
ecowitt_apikey.png (90.06 KiB) Viewed 1879 times
Image

User avatar
BONSAI
Observer
Observer
Posts: 35
Joined: Sat Sep 23, 2017 10:59 am
Location: San Sebastian
Station model: Davis Vantage Pro2 Plus
Software: Meteobridge
Contact:

Re: new plugin ecowittNet

Post by BONSAI » Sat Aug 27, 2022 8:37 am

Thank you very much as always David for your enormous work. Thanks to you I have returned to continue perfecting my template.
I have the problem that once I have entered the api key data for everything else and created the cron, the sensors do not appear.
In the MSG zone it tells me that everything is Success



I think I have followed all the steps you have indicated:
1.- Download the zip, unzip it and put it in the plugins folder.
2.- I have taken the updateEcowittNet file to the load/crons folder. I have created a cron every 5 minutes with the following url .....meteodonostia.es/garos/load/cron.php?password....
3.- I have configured the setup from the template by entering the credentials correctly.
4.- I have told the template that I obtain the data through the API and not from WU as before.

And despite all this in the setup the sensors do not appear.

I don't know what I can be doing wrong.

Thank you

davidefa
Expert
Expert
Posts: 862
Joined: Tue Jan 12, 2021 8:03 am
Location: Italy
Station model: WH2650
Software: WH2650 (direct upload)
Contact:

Re: new plugin ecowittNet

Post by davidefa » Sat Aug 27, 2022 8:54 am

Please pm me your application_key, api_key and mac address so I can take a look ( you can always regenerate new application_key and api_key once everything is ok )
Image

andyk1
Professional
Professional
Posts: 431
Joined: Tue Feb 27, 2018 10:56 pm
Location: OKLAHOMA, USA
Station model: Ecowitt WS90
Software: Meteobridge/GW2000B
Contact:

Re: new plugin ecowittNet

Post by andyk1 » Tue Aug 30, 2022 3:05 am

Thanks you so much for another option.

I'll try this once I get PHP 8.0 or 8.1 working but as of now on IONS host (1and1 previous name) I can not get MT to work.
Image

User avatar
Dehatter
Professional
Professional
Posts: 349
Joined: Sun Jan 07, 2018 5:11 am
Location: Matthews, NC, USA
Station model: Ecowitt WH80
Software: Ecowitt GW1000
Contact:

Re: new plugin ecowittNet

Post by Dehatter » Sat Sep 10, 2022 4:48 am

My setup does not have LD or LT

how can I fix this?
Screenshot 2022-09-10 004634.jpg
Screenshot 2022-09-10 004634.jpg (70.45 KiB) Viewed 1657 times
Tom
Image

davidefa
Expert
Expert
Posts: 862
Joined: Tue Jan 12, 2021 8:03 am
Location: Italy
Station model: WH2650
Software: WH2650 (direct upload)
Contact:

Re: new plugin ecowittNet

Post by davidefa » Sat Sep 10, 2022 10:29 pm

I noticed that too, I think this happen when the console/gateway is reset, lightning count is zeroed and last strike distance/time is lost.
You can try this version.

ver 1.3
- added lightning distance/time data ( if not already present )
Attachments
ecowittNet_1.3.zip
(7.54 KiB) Downloaded 84 times
Image

Post Reply