Author Topic: FOSHKplugin - brief introduction  (Read 39164 times)

0 Members and 1 Guest are viewing this topic.

Online olicat

  • Forecaster
  • *****
  • Posts: 1515
  • GWxx00, HPx5x1C, WN1900C, WN1980C & WS3800C
    • FOSHKplugin
Re: FOSHKplugin - brief introduction
« Reply #25 on: September 16, 2020, 06:28:41 PM »
Hi!

Quote
I am experiencing the GW100 reconnecting to the WiFi every 10 minutes, apparently it is looking for a HTTP 200 OK from ecowitt.net
I haven't noticed that before. But after you wrote that, I took a closer look at it.

My test GW1000 with firmware v1.6.1 is configured via WS View in such a way that, apart from the custom server, all other Internet-pointing services (WU, EW, WC, WOW) are deactivated.
In addition, I blocked the Internet traffic via the firewall at the gateway. Requests from the GW1000 to the Internet would be logged at the gateway, but not forwarded.

In fact, this GW1000 cuts the WIFI connection every 10 minutes, only to re-establish it a short time later (12 seconds).
Of course, this also results in a DHCP request. I did not check further whether any packets were lost during the renegotiation of the IP address.

During the observation period, however, I did not find any attempts by the GW1000 to call up any external servers - apart from NTP!

After a reboot, the GW1000 has the time 08/22/2019 10:00:00 - without internet access it cannot get the current time from cn.pool.ntp.org via NTP due to lack of internet access.
The messages sent via custom server would therefore have the wrong time!
Thus, for proper operation - since you unfortunately cannot configure the NTP server in WS View - you would have to direct the hostname cn.pool.ntp.org to a local NTP server via a local DNS.
I also don't know whether the DHCP client of the ESP8266 would make use of option 042 (transmission of the time server via DHCP) - unfortunately my router (Fritzbox) cannot send this by itself.

So I have now forbidden internet access for the GW1000 on the firewall except for NTP. After a reboot, he receives the correct time (unfortunately from an external source).

I will ask Lucy to make the time server configurable in the future - but I have little hope of a quick implementation.
I will also ask why the GW1000 interrupts the WLAN connection every 10 minutes when ecowitt.net is deactivated.
Apparently the GW1000 is testing the WIFI-connection by checking every 10 minutes whether a connection to ecowitt.net was successful. If not, the WIFI connection will be re-established as a precaution.
That's not a bad idea in the beginning. However, at FOSHK they obviously did not think that someone might not want to use or cannot use ecowitt.net.
As soon as I enable sending to Ecowitt via firewall again, the WIFI connection remains stable.

For someone who plans to use the GW1000 completely without the Internet, the only thing left for the time being is the use of a local DNS server, which redirects requests from the GW1000 for cdnrtpdate.ecowitt.net and cn.pool.ntp.org to internal services.
DNSmasq could be suitable for this ...

Quote
FOSHKplugin states no internet is required. Have you solved this issue?
FOSHKplugin does not need the Internet to make the data available locally or to convert it between the different formats.
The GW1000 currently requires access to an external NTP server because of the time and a successful connection to Ecowitt in order to satisfy the watchdog in the GW1000. Otherwise the WIFI connection will be re-established every 10 minutes.

It would be interesting to know whether the HP2551C or other devices from FOSHK/Ecowitt also causes these problems.

Greetings, Oliver

Offline WA4OPQ

  • Forecaster
  • *****
  • Posts: 320
  • 4 stations: 2902 array, GW1000, 3 on Meteobridge
Re: FOSHKplugin - brief introduction
« Reply #26 on: September 16, 2020, 07:51:30 PM »
Thank you for so thoroughly confirming my observations.

I send the GW1000 observation data to WeeWx which then creates a wxnow.txt type file which is sent to an application called aprx, which transmits the data about 20 km via ham radio.
WeeWx is using the correct time and date so the output is correct regardless of the wrong time and date from the GW1000

When I saw that FOSHKplugin included an integrated web server I incorrectly thought it could be used to send the HTTP 200 OK to the GW1000. But it is not that simple.

Thank you again for looking into this.

Online olicat

  • Forecaster
  • *****
  • Posts: 1515
  • GWxx00, HPx5x1C, WN1900C, WN1980C & WS3800C
    • FOSHKplugin
Re: FOSHKplugin - brief introduction
« Reply #27 on: September 17, 2020, 01:44:42 AM »
Hi!

Quote
When I saw that FOSHKplugin included an integrated web server I incorrectly thought it could be used to send the HTTP 200 OK to the GW1000.
It does.
But of course only if FOSHKplugin receives the data from the GW1000. It cannot send such a response to requests to external addresses because it does not normally receive these requests.
However, if you redirect the hostname cdnrtpdate.ecowitt.net to FOSHKplugin via the local DNS server, FOSHKplugin responds with 200 and this answer should be sufficient to satisfy the watchdog. The WIFI should remain stable.

Oliver

Offline WA4OPQ

  • Forecaster
  • *****
  • Posts: 320
  • 4 stations: 2902 array, GW1000, 3 on Meteobridge
Re: FOSHKplugin - brief introduction
« Reply #28 on: September 17, 2020, 01:58:27 AM »

Ahhh.... this could work. Tomorrow I'll install FOSHKplugin and rename my hotspot to cdnrtpdate.ecowitt.net and play with dnsmasq.

Thanks!

Offline KC5JIM

  • Senior Contributor
  • ****
  • Posts: 231
    • KC5JIM Weather
Re: FOSHKplugin - brief introduction
« Reply #29 on: October 27, 2020, 06:08:27 PM »
As usual, I was overthinking everything and got hung up on what you were asking for the UDP port for in the setup script. Once my wife broke through my engineer's analysis paralysis I skipped it and now I have the plugin sending to two instances of PWT, Ecowitt, and WU. I'll soon be hosting my Meteotemplate site on my Pi and forwarding to that as well.

Thanks for the great plugin.
« Last Edit: October 27, 2020, 07:18:36 PM by kd7eir »
Ecowitt Wittboy| FOSHKplugin on Pi 4


Online olicat

  • Forecaster
  • *****
  • Posts: 1515
  • GWxx00, HPx5x1C, WN1900C, WN1980C & WS3800C
    • FOSHKplugin
Re: FOSHKplugin - brief introduction
« Reply #30 on: October 27, 2020, 07:09:51 PM »
Hi!

Congratulation!

Quote
hung up on what you were asking for the UDP port
Yes, unfortunately this is an omission in the current documentation, sorry! The UDP settings are not required for forward operation, so the default values are also empty. I'd better point it out. I will do that.

Quote
I'll soon be hosting my Meteotemplate site
Unfortunately, the forward to Meteotemplate is not yet possible with the currently available version v0.06. In the upcoming version v0.07, Meteotemplate will be fully supported via API interface. And there will be some other nice functions ...
Let me know if you can't wait and want to use a beta version of FOSHKplugin.

Oliver

Offline KC5JIM

  • Senior Contributor
  • ****
  • Posts: 231
    • KC5JIM Weather
Re: FOSHKplugin - brief introduction
« Reply #31 on: October 27, 2020, 07:17:29 PM »
Hi!

Congratulation!

Quote
hung up on what you were asking for the UDP port
Yes, unfortunately this is an omission in the current documentation, sorry! The UDP settings are not required for forward operation, so the default values are also empty. I'd better point it out. I will do that.

Quote
I'll soon be hosting my Meteotemplate site
Unfortunately, the forward to Meteotemplate is not yet possible with the currently available version v0.06. In the upcoming version v0.07, Meteotemplate will be fully supported via API interface. And there will be some other nice functions ...
Let me know if you can't wait and want to use a beta version of FOSHKplugin.

Oliver

I'm fine waiting for Meteotemplate compatibility as that's the lowest priority for me right now.
Ecowitt Wittboy| FOSHKplugin on Pi 4


Online olicat

  • Forecaster
  • *****
  • Posts: 1515
  • GWxx00, HPx5x1C, WN1900C, WN1980C & WS3800C
    • FOSHKplugin
Re: FOSHKplugin - brief introduction
« Reply #32 on: October 28, 2020, 03:40:39 AM »
Hi!

Quote
The UDP settings are not required for forward operation, so the default values are also empty. I'd better point it out. I will do that.
There is a new recipe for Installation of FOSHKplugin generic version for several PWT instances in the recipes-section of FOSHKplugin.
There you will find a more detailed description of the steps required to install and configure FOSHKplugin to handle multiple PWT-instances.
I hope it helps.

Regards, Oliver

Offline KC5JIM

  • Senior Contributor
  • ****
  • Posts: 231
    • KC5JIM Weather
Re: FOSHKplugin - brief introduction
« Reply #33 on: October 28, 2020, 10:41:41 AM »
Hi!

Quote
The UDP settings are not required for forward operation, so the default values are also empty. I'd better point it out. I will do that.
There is a new recipe for Installation of FOSHKplugin generic version for several PWT instances in the recipes-section of FOSHKplugin.
There you will find a more detailed description of the steps required to install and configure FOSHKplugin to handle multiple PWT-instances.
I hope it helps.

Regards, Oliver

Thank you. I'm currently running two instances of PWT. The amount of time and work you put into this is just amazing.
Ecowitt Wittboy| FOSHKplugin on Pi 4


Online olicat

  • Forecaster
  • *****
  • Posts: 1515
  • GWxx00, HPx5x1C, WN1900C, WN1980C & WS3800C
    • FOSHKplugin
Re: FOSHKplugin - brief introduction
« Reply #34 on: November 10, 2020, 04:17:41 AM »
Hi!

Because the public beta test for FOSHKplugin v0.07 will start shortly, I have provided a short update guide in the recipe section on the website.

Maybe this is helpful for one or the other.

Oliver

Offline KC5JIM

  • Senior Contributor
  • ****
  • Posts: 231
    • KC5JIM Weather
Re: FOSHKplugin - brief introduction
« Reply #35 on: November 16, 2020, 07:45:50 PM »
Eagerly awaiting the beta.
Ecowitt Wittboy| FOSHKplugin on Pi 4


Online olicat

  • Forecaster
  • *****
  • Posts: 1515
  • GWxx00, HPx5x1C, WN1900C, WN1980C & WS3800C
    • FOSHKplugin
Re: FOSHKplugin - brief introduction
« Reply #36 on: November 17, 2020, 01:37:31 AM »
Hi!

Quote
Eagerly awaiting the beta.
You have a PM.
If anyone is interested in a beta version, please contact me.
I'd like to get some feedback from the internal beta test before I launch the public beta test.
So far, Beta v0.07 seems to be working fine for a handful of people.

Oliver

Offline KC5JIM

  • Senior Contributor
  • ****
  • Posts: 231
    • KC5JIM Weather
Re: FOSHKplugin - brief introduction
« Reply #37 on: November 18, 2020, 04:17:33 PM »
(Edited because I just needed to reboot the Pi to get it working)

I'm testing the beta and forwarding to Meteotemplate. It's working just fine!
« Last Edit: November 18, 2020, 06:19:44 PM by kd7eir »
Ecowitt Wittboy| FOSHKplugin on Pi 4


Online olicat

  • Forecaster
  • *****
  • Posts: 1515
  • GWxx00, HPx5x1C, WN1900C, WN1980C & WS3800C
    • FOSHKplugin
Re: FOSHKplugin - brief introduction
« Reply #38 on: November 18, 2020, 04:46:32 PM »
Hi!

Quote
If I enter the FWD_URL in my browser it successfully connects, but again, the API is never updated.
Your config seems to be ok so far. This is mine here:
Code: [Select]
[Forward-13]
FWD_CMT=Meteotemplate auf 15.100
FWD_URL=http://192.168.15.100/template/api.php?PASS=meteotemplate&
FWD_TYPE=MT
FWD_INTERVAL=30
FWD_ENABLE=True
Do you get any error in the FOSHKplugin logfile (sndfile)? At the end of each forward entry, the return code should be logged, separated by a colon.
Probably not - because you can use the URL in your browser. But who knows?
Do you have some special characters in your Meteotemplate password? There could be a problem with URL-encoding.
Do you have the APIViewer available for your Meteotemplate-installation? Do you see something strange there?

Please have a look to the Meteotemplate log file apiLog.txt in /var/www/template/cache/ (probably /var/www/weather/cache/ in your installation).
Maybe we can find an approach to problem solving there.

I once had the effect with Meteotemplate that the data was only displayed very late. After I set the interval in the forward to 30 seconds, this no longer occurred.

Here and on another location Meteotemplate is running fine via FOSHKplugin. Therefore it should be possible for you too.

Regards, Oliver

Offline KC5JIM

  • Senior Contributor
  • ****
  • Posts: 231
    • KC5JIM Weather
Re: FOSHKplugin - brief introduction
« Reply #39 on: November 18, 2020, 06:19:02 PM »
I rebooted the Pi and it started working just fine. I did restart the plugin after the config changes, but I guess the Pi wanted a reboot to be obstinate.

THANKS for all you work and help with FOSHk!
Ecowitt Wittboy| FOSHKplugin on Pi 4


Offline KC5JIM

  • Senior Contributor
  • ****
  • Posts: 231
    • KC5JIM Weather
Re: FOSHKplugin - brief introduction
« Reply #40 on: November 19, 2020, 12:05:48 PM »
Does your plugin support the lightning detector? I'm not seeing any data for it.

To better clarify - I get thunderstorm warnings, but it's displaying anything in Meteotemplate.
« Last Edit: November 19, 2020, 12:10:52 PM by kd7eir »
Ecowitt Wittboy| FOSHKplugin on Pi 4


Online olicat

  • Forecaster
  • *****
  • Posts: 1515
  • GWxx00, HPx5x1C, WN1900C, WN1980C & WS3800C
    • FOSHKplugin
Re: FOSHKplugin - brief introduction
« Reply #41 on: November 19, 2020, 12:15:02 PM »
Hi!

In Meteotemplate you should mark the missing additional sensors in Administration under "Extra Sensors" with "Save in Database".
But showing this data on the page is part of Meteotemplate. Perhaps this not supported yet.

Oliver


Offline KC5JIM

  • Senior Contributor
  • ****
  • Posts: 231
    • KC5JIM Weather
Re: FOSHKplugin - brief introduction
« Reply #42 on: November 19, 2020, 12:27:49 PM »
I have done that already. I will contact Jachym about actually displaying it. Thanks.
Ecowitt Wittboy| FOSHKplugin on Pi 4


Online olicat

  • Forecaster
  • *****
  • Posts: 1515
  • GWxx00, HPx5x1C, WN1900C, WN1980C & WS3800C
    • FOSHKplugin
Re: FOSHKplugin - brief introduction
« Reply #43 on: November 19, 2020, 01:02:44 PM »
Hi!

Then please write what came out of it.  My Meteotemplate installation is missing the lightning data also.  (Whereby I also lack the extra sensors, the leakage sensors and the PM2.5 sensors.)

Oliver

Offline KC5JIM

  • Senior Contributor
  • ****
  • Posts: 231
    • KC5JIM Weather
Re: FOSHKplugin - brief introduction
« Reply #44 on: November 21, 2020, 11:23:34 AM »
So, I found a slightly roundabout way to get the lightning data in Meteotemplate. This also provides the PM2.5 and any other Ecowitt modules that you have.

It involves feeding the iz0qwm ecowitt_http_gateway from FOSHK. This gives not only the lightning, but all the other features of iz0qwm ecowitt_http_gateway, while still keeping everything that FOSHK does. This takes the place of the FOSHK Meteotemplate FWD. Here is the recipe that I used.

[Forward-1]
FWD_ENABLE = True
FWD_CMT = iz0qwm ecowitt_http_gateway
FWD_URL = http://xxx.xxx.xxx.xxx:80/weather/plugins/ecowitt/report/
FWD_INTERVAL = 30
FWD_IGNORE =
FWD_TYPE = RAWEW
FWD_SID =
FWD_STATUS = False

So now I am feeding 2 PWT instances, Meteotemplate, Ecowitt, WU, Weathercloud, and getting Pushover notifications.
« Last Edit: November 21, 2020, 11:31:40 AM by kd7eir »
Ecowitt Wittboy| FOSHKplugin on Pi 4


Online olicat

  • Forecaster
  • *****
  • Posts: 1515
  • GWxx00, HPx5x1C, WN1900C, WN1980C & WS3800C
    • FOSHKplugin
Re: FOSHKplugin - brief introduction
« Reply #45 on: November 21, 2020, 11:49:27 AM »
Hi!

Quote
So, I found a slightly roundabout way to get the lightning data in Meteotemplate.
Nice!
I wasn't even aware that Meteotemplate can also process Ecowitt. Had I known, I would probably not have implemented API support ...

Although I don't understand why that doesn't work with FOSHKplugin. The lightning data are provided to Meteotemplate via API.
Meteotemplate also shows it in the API viewer.
At what point do you now see the lightning data on the Meteotemplate web interface?

Oliver

Offline KC5JIM

  • Senior Contributor
  • ****
  • Posts: 231
    • KC5JIM Weather
Re: FOSHKplugin - brief introduction
« Reply #46 on: November 21, 2020, 12:31:00 PM »
The iz0qwm ecowitt_http_gateway includes blocks to display the lightning and PM2.5, as well as a block that will show the WiFi signal strength and battery level of all the sensors.
Ecowitt Wittboy| FOSHKplugin on Pi 4


Online olicat

  • Forecaster
  • *****
  • Posts: 1515
  • GWxx00, HPx5x1C, WN1900C, WN1980C & WS3800C
    • FOSHKplugin
Re: FOSHKplugin - brief introduction
« Reply #47 on: November 21, 2020, 05:22:30 PM »
Hi!

Quote
The iz0qwm ecowitt_http_gateway includes blocks to display the lightning and PM2.5
That makes sense.
FOSHKplugin does everything right on the API side, only Meteotemplate simply can't do anything with this data in the standard version.
Annoying!
I have now installed the blocks manually and after a few modifications to the database and the PHP files, I can now also see the lightning and PM2.5 data.
Meteotemplate will continue to be fed exclusively via FOSHKplugin (FWD_TYPE=MT).
:-)
Thanks for the hint!

After installing iz0qwm ecowitt_http_gateway you should probably be able to deliver the data via FOSHKplugin. The database should already be adjusted. And you also have the necessary blocks to display lightning, PM2.5 and modules.
Now I just have to take a look at what the red 0% bar on the right is all about ...

Greetings, Oliver

Offline KC5JIM

  • Senior Contributor
  • ****
  • Posts: 231
    • KC5JIM Weather
Re: FOSHKplugin - brief introduction
« Reply #48 on: November 21, 2020, 06:58:29 PM »
Corrected to say battery strength, not WiFi strength.

The red bar is reporting the battery strength from the sensors.

I believe the code starts around line 96 in the ecowittModulesBlock.php
« Last Edit: November 21, 2020, 07:04:59 PM by kd7eir »
Ecowitt Wittboy| FOSHKplugin on Pi 4


Offline wardie

  • Senior Contributor
  • ****
  • Posts: 212
Re: FOSHKplugin - brief introduction
« Reply #49 on: December 10, 2020, 03:36:05 PM »
Just got this up and working on my RaspPi4 as an EW protocol spass-through splitter ... easy install and config to feed a PWS tablet and Hubitat ... Very nice bit of middleware.
Froggit HP1000SE Pro-C console (HP2551-C)
Froggit HP1000SE Pro ultrasonic multi sensor with Ecowitt EC0002 heater (WS80)
Ecowitt Anemometer 5-in-1 array (WS68)
Froggit DP80 rain gauge (WH40) with spikes
Froggit indoor temp/humidity/pressure (WH32B)
Froggit DP50 Internal temp/humidity x2 (WH31)
Ecowitt Outdoor temp/humidity & RS-00001 shield (WH32)
Froggit DP200 PM2.5 outdoor (WH41)
Ecowitt indoor CO2 PM2.5 PM10 (WH45)
Froggit DP100 soil moisture (WH51)
Froggit DP60 Lightning detector (WH57)
Froggit DP1500 server dongle (GW1000A) x2
Raspberry Pi 4 / WeeWx-GW1000 API interface
WU: IKNEBW2