Page 1 of 1

new plugin ecowittNet

Posted: Sat Jul 30, 2022 9:25 pm
by davidefa
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 56604 times

Re: new plugin ecowittNet

Posted: Thu Aug 04, 2022 6:38 pm
by Dehatter
Is there an index.php missing from the download?

Re: new plugin ecowittNet

Posted: Thu Aug 04, 2022 8:40 pm
by davidefa
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 )

Re: new plugin ecowittNet

Posted: Fri Aug 05, 2022 7:52 am
by meteoesine
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

Re: new plugin ecowittNet

Posted: Fri Aug 05, 2022 8:47 am
by davidefa
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 56540 times

Re: new plugin ecowittNet

Posted: Sat Aug 27, 2022 8:37 am
by BONSAI
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

Re: new plugin ecowittNet

Posted: Sat Aug 27, 2022 8:54 am
by davidefa
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 )

Re: new plugin ecowittNet

Posted: Tue Aug 30, 2022 3:05 am
by andyk1
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.

Re: new plugin ecowittNet

Posted: Sat Sep 10, 2022 4:48 am
by Dehatter
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 56318 times
Tom

Re: new plugin ecowittNet

Posted: Sat Sep 10, 2022 10:29 pm
by davidefa
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 )

Re: new plugin ecowittNet

Posted: Sun Jul 14, 2024 8:56 am
by El_Viejo
Using this plugin how to configure "Customize - Gateway". If I understand correctly, it should be:

Server IP: <hostname>
Path: /template/plugins/ecowitt/updateEcowittNet.php

Is it correct?

Thank you very much.

Re: new plugin ecowittNet

Posted: Fri Jul 19, 2024 6:33 pm
by El_Viejo
Following Davide's instructions, I have been able to get my template to recognize the Ecowitt WittBoy station (GW2000 + WS90) and everything works correctly.

I didn't need to use the “ecowittModules” block or configure the “Customize” parameters.

It was simple and I didn't have to invest a lot of time.

Thanks Davide for your valuable help for the inexperienced.

Re: new plugin ecowittNet

Posted: Sat Mar 01, 2025 8:42 am
by BONSAI
Hello everyone.
I have had the offline station using this plugin for a week now.
The station is working and sends the data well to WU and the plugin but it is not seen in the "current".
I don't know what could be happening.
I haven't touched anything
Thanks

Re: new plugin ecowittNet

Posted: Sat Mar 01, 2025 4:10 pm
by BONSAI
Hi again
I think I have already located the problem. What I don't know is how to solve it.
The cron runs fine but the information is not stored in the file apiCache.txt.

Re: new plugin ecowittNet

Posted: Fri Mar 07, 2025 5:28 pm
by BONSAI
Problem solved. I had to reinstall the entire template because for some reason I don't know the cron did its job but the information was not saved in the database so the station was always OFF.