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

0 Members and 1 Guest are viewing this topic.

Offline Maximux

  • Member
  • *
  • Posts: 32
    • My Weather Station
Re: FOSHKplugin - brief introduction
« Reply #100 on: May 16, 2021, 10:27:37 AM »
Hi Olicat, I wanted to suggest if you can implement a function to the plugin, that of setting the log deletion after certain time or when they exceed a certain size.
It would be possible?
Thank you.
Regards.

Offline olicat

  • Forecaster
  • *****
  • Posts: 1515
  • GWxx00, HPx5x1C, WN1900C, WN1980C & WS3800C
    • FOSHKplugin
Re: FOSHKplugin - brief introduction
« Reply #101 on: May 16, 2021, 10:39:39 AM »
Hi!

Why not just use logrotate?

Oliver

Offline Maximux

  • Member
  • *
  • Posts: 32
    • My Weather Station
Re: FOSHKplugin - brief introduction
« Reply #102 on: May 16, 2021, 11:08:26 AM »
Hi!

Why not just use logrotate?

Oliver

I don't know what way, I only know that it has been lit for a while more than 24 hours is the log files are over 5 mb, let's say a long time to go saturate the memory of the device,
for that I was asking if it was possible a programmed cancellation,
let's say that Have all plugins to avoid a separate script for cleaning.


Offline olicat

  • Forecaster
  • *****
  • Posts: 1515
  • GWxx00, HPx5x1C, WN1900C, WN1980C & WS3800C
    • FOSHKplugin
Re: FOSHKplugin - brief introduction
« Reply #103 on: May 17, 2021, 05:50:58 AM »
Hi!

In response to current events, I wrote a post on the subject of logging "Log file handling". Hopefully this is informative and helpful.

Regards, Oliver

Offline Maximux

  • Member
  • *
  • Posts: 32
    • My Weather Station
Re: FOSHKplugin - brief introduction
« Reply #104 on: May 17, 2021, 06:30:35 AM »
Hi!

In response to current events, I wrote a post on the subject of logging "Log file handling". Hopefully this is informative and helpful.

Regards, Oliver

Yes, thanks it was useful.

Offline olicat

  • Forecaster
  • *****
  • Posts: 1515
  • GWxx00, HPx5x1C, WN1900C, WN1980C & WS3800C
    • FOSHKplugin
Re: FOSHKplugin - brief introduction
« Reply #105 on: May 28, 2021, 01:20:38 PM »
Hi!

There is a new public beta of FOSHKplugin v0.08.
In addition to minor bug fixes and optimizations, a few little things have been added:

- new config options REBOOT_ENABLE and RESTART_ENABLE - enable the weather station and FOSHKplugin to be restarted via http/UDP
- new forward type RAWTEXT enables the storage of incoming raw values from the weather station as a text file locally in the file system and remotely via http (s)/POST and ftp(s)
- Firmware update status (updatewarning) is now updated immediately after receiving new data from the updated weather station

As usual, the complete changelog can be found here.

To upgrade:
Change via ssh to the directory in which FOSHKplugin is running - according to my recommendations, it could be /opt/FOSHKplugin/.
If you run FOSHKplugin as root, you can do the following commands without "sudo -u username" - if you run FOSHKplugin in a certain user context, the specification of that user would be important so that the permissions are correct:

Code: [Select]
sudo -u username ./generic-FOSHKplugin-install.sh -upgrade generic-FOSHKplugin-0.0.8Beta.zip
sudo -u username ./generic-FOSHKplugin-install.sh -repair

The "repair" is important if you come from a version prior v0.08Beta, because FOSHKplugin has to install a new package via apt/pip to get InfluxDB support.
If you are updating from a v0.08Beta the repair is not necessary. But it doesn't hurt either.

Let me know if there're any problems or you need some explanations of the new functions. Most things should already be described on the website.

For first time (or parallel) installation just use this link.
LoxBerry users should download and install this version the usual LoxBerry-installation-way instead.

Have fun and a nice weekend!

Regards, Oliver

Offline zoomx

  • Senior Contributor
  • ****
  • Posts: 188
Re: FOSHKplugin - brief introduction
« Reply #106 on: May 28, 2021, 03:31:44 PM »
Just updated from the previous 0.08beta.

I made a repair and it downloaded this file
https://files.pythonhosted.org/packages/0c/cd/1e2ec680ec7b09846dc6e605f5a7709dfb9d7128e51a026e7154e18a234e/urllib3-1.26.5-py2.py3-none-any.whl
maybe an update.

Offline olicat

  • Forecaster
  • *****
  • Posts: 1515
  • GWxx00, HPx5x1C, WN1900C, WN1980C & WS3800C
    • FOSHKplugin
Re: FOSHKplugin - brief introduction
« Reply #107 on: May 28, 2021, 04:34:19 PM »
Hi!

Quote
maybe an update.
Indeed.
It is urllib3 - a Python library that is referenced by the requests library (which is used by FOSHKplugin).
But I have no idea why this library is stored in the FOSHKplugin directory.
On my test computers here, the Python package manager pip3 pulls the required libraries in the background and stores them properly where the libs belong. In any case, such libs do not belong in the FOSHKplugin directory.

So I don't find it fundamentally worrying.
But something seems to be wrong with your Python installation.
But as long as FOSHKplugin works so far, you may not necessarily have to take action.

I am curious to see whether other users will also notice this behavior

Regards, Oliver

Offline olicat

  • Forecaster
  • *****
  • Posts: 1515
  • GWxx00, HPx5x1C, WN1900C, WN1980C & WS3800C
    • FOSHKplugin
Re: FOSHKplugin - brief introduction
« Reply #108 on: June 06, 2021, 09:01:06 AM »
Hi!

a slightly improved beta of FOSHKplugin v0.08 is now available for download. You may upgrade the usual way.
Changes:
  • Firmware update status (updatewarning) is now updated immediately after receipt of new data from the updated weather station
  • slightly improved installation routine generic-FOSHKplugin-install.sh - clarification of UDP server and port, interception of incorrect URL file names during update
  • Adjustment for WH6006 (dateutc with "%3A" instead of ":", indoorhumidity, absbaro)
No big deal - hope to release this version in the near future.

But I already have a few ideas (and these are already being worked on) for the next version: backup/restore of the station configuration and a function FWD_REMAP to be able to assign the values of other keys to output keys - if a forward target only supports 4 temperature sensors, for example, you could specify which of the sensors should be transmitted in the future.
As an an example:
Awekas only supports 4 additional temperature sensors. However, we in our Ecowitt world can transfer the temperature values of 8 WH31/WN30, 1 WH45 and (in the future) 8 WN34.
The remap function can then be used to specify that awekastemp1=WH34temp3, awekastemp2=WH31temp8 etc.
This also applies to the forwards to Ambient Weather, WSWin, Weathercloud, ... and includes other sensors (soil moisture, air quality, leaf wetness, ...) - so I think that's very desirable.
But that will probably only come with v0.09 - I finally want to celebrate a release again ...
;-)

Regards, Oliver

Offline zoomx

  • Senior Contributor
  • ****
  • Posts: 188
Re: FOSHKplugin - brief introduction
« Reply #109 on: June 06, 2021, 09:27:58 AM »
Some people has a GW1000 and one or more WH31, no WH32. It will possible to remap one of the WH31 as main temperature sensor to upload on Wunderground or other services?


Edit: I updated and made a repair. It downloaded
Downloading https://files.pythonhosted.org/packages/05/1b/0a0dece0e8aa492a6ec9e4ad2fe366b511558cdc73fd3abc82ba7348e875/certifi-2021.5.30-py2.py3-none-any.whl

« Last Edit: June 06, 2021, 09:34:03 AM by zoomx »

Offline olicat

  • Forecaster
  • *****
  • Posts: 1515
  • GWxx00, HPx5x1C, WN1900C, WN1980C & WS3800C
    • FOSHKplugin
Re: FOSHKplugin - brief introduction
« Reply #110 on: June 06, 2021, 09:42:53 AM »
Hi!

Quote
It will possible to remap one of the WH31 as main temperature sensor to upload on Wunderground or other services?
Yes.
But this function is already implemented.
Have a look in the docs regarding Fake-Mode.
You can already use a WH31 as a replacement for outdoor temp & humidity. This works globally.
The remap-function can limit this to dedicated forwards.

Oliver

Offline olicat

  • Forecaster
  • *****
  • Posts: 1515
  • GWxx00, HPx5x1C, WN1900C, WN1980C & WS3800C
    • FOSHKplugin
Re: FOSHKplugin - brief introduction
« Reply #111 on: June 07, 2021, 02:03:48 PM »
Hi!

Spinoff from other thread regarding the new/to be released Ecowitt.net-API:

Quote
2. In the event for local storage, could someone share with my all the variables available? not just temperature and humidity, for example, rain amount and soil wetness, wind speed, wind avg etc. in addition to what is being called for below:

Code: [Select]
#!/bin/bash
tempf=`curl -s http://192.168.15.236:8080/getvalue?key=tempf`
tempc=`curl -s http://192.168.15.236:8080/getvalue?key=tempc`
echo current temp in °F: $tempf
echo current temp in °C: $tempc
Almost all available variables are documented on the FOSHKplugin-website.
But the question is what you are going to do.
Of course one could gather every single value in separate requests like in the example-script above.
But if you're interested in having more values there're better ways to gather them.
To receive the complete RAW-line you could request for example:

Code: [Select]
line=`curl -s http://192.168.15.236:8080/RAW`

The possibilities are diverse - it depends on the requirements.
You could also get the station data as JSON or CSV or STRING or ...
Since there can still be gaps in the documentation, I always suggest first looking at everything with about http://ipaddress:port/status&minmax as a website and then deciding what (which fieldnames) is required.
Have a look to the Demo-page with metric and imperial values - these fields can be queried individually with http://ipaddress:port/getvalue?key=KEYNAME - depending on the existence of the respective sensors and the configuration.

Regards, Oliver

Offline olicat

  • Forecaster
  • *****
  • Posts: 1515
  • GWxx00, HPx5x1C, WN1900C, WN1980C & WS3800C
    • FOSHKplugin
Re: FOSHKplugin - brief introduction
« Reply #112 on: June 27, 2021, 08:11:39 AM »
Hi!

FOSHKplugin v0.08 is released now.
This time it is a major update with countless innovations such as MQTT and InfluxDB support as well as new forward targets such as wetter.com, weather365.net, ... as well as the generation of realtime.txt and clientraw.txt and better support by WSWin.

Have a look at the "Version History" here for changes and improvements.

To upgrade:
Change via ssh to the directory in which FOSHKplugin is running - according to my recommendations, it could be /opt/FOSHKplugin.
If you run FOSHKplugin as root, you can do the following commands without sudo - if you run FOSHKplugin in a certain user context, the specification of that user would be important so that the permissions are correct:

Code: [Select]
sudo -u username ./generic-FOSHKplugin-install.sh -upgrade generic-FOSHKplugin-0.0.8Beta.zip
sudo -u username ./generic-FOSHKplugin-install.sh -repair

The "repair" is important this time, because FOSHKplugin has to install two new packages via apt/pip to get MQTT support.
If a beta of v0.08 was already installed, a new repair is not necessary.
Let me know if there're any problems or you need some explanations of the new functions. Most things should already be described on the website.

For first time (or parallel) installation just use this link and the common installation procedure.
LoxBerry users should download and install this version the usual LoxBerry-installation-way instead.

Have fun!

Regards, Oliver

Offline KC5JIM

  • Senior Contributor
  • ****
  • Posts: 231
    • KC5JIM Weather
Re: FOSHKplugin - brief introduction
« Reply #113 on: July 02, 2021, 09:02:32 PM »
Any chance for CWOP or APRS?
Ecowitt Wittboy| FOSHKplugin on Pi 4


Offline olicat

  • Forecaster
  • *****
  • Posts: 1515
  • GWxx00, HPx5x1C, WN1900C, WN1980C & WS3800C
    • FOSHKplugin
Re: FOSHKplugin - brief introduction
« Reply #114 on: July 03, 2021, 03:00:28 AM »
Hi!

Quote
Any chance for CWOP or APRS?
If there is an increased need and also corresponding format descriptions, I would be happy to take a look.
Are there any further requests in this regard?

Oliver

Offline WA4OPQ

  • Forecaster
  • *****
  • Posts: 320
  • 4 stations: 2902 array, GW1000, 3 on Meteobridge
Re: FOSHKplugin - brief introduction
« Reply #115 on: July 11, 2021, 02:27:52 AM »
Any chance for CWOP or APRS?

Your Meteobridge does CWOP and APRS.  Is there some reason it won't work for you?

Offline KC5JIM

  • Senior Contributor
  • ****
  • Posts: 231
    • KC5JIM Weather
Re: FOSHKplugin - brief introduction
« Reply #116 on: July 11, 2021, 04:11:15 PM »
Any chance for CWOP or APRS?

Your Meteobridge does CWOP and APRS.  Is there some reason it won't work for you?

It works perfectly, but I'm trying to get away from it since after almost a year he still refuses to properly report lightning from Ecowitt. Right now CWOP and APRS is all that I'm using Meteobridge for.
Ecowitt Wittboy| FOSHKplugin on Pi 4


Offline olicat

  • Forecaster
  • *****
  • Posts: 1515
  • GWxx00, HPx5x1C, WN1900C, WN1980C & WS3800C
    • FOSHKplugin
Re: FOSHKplugin - brief introduction
« Reply #117 on: July 12, 2021, 04:07:47 AM »
Hi!

Quote
almost a year he still refuses to properly report lightning from Ecowitt.
Is there a definition for the transmission of lightning data in the APRS format or in CWOP?  I haven't found that yet.
Does anyone have a link to the appropriate description?
Thanks!

Oliver

Offline KC5JIM

  • Senior Contributor
  • ****
  • Posts: 231
    • KC5JIM Weather
Re: FOSHKplugin - brief introduction
« Reply #118 on: July 12, 2021, 04:00:55 PM »
Hi!

Quote
almost a year he still refuses to properly report lightning from Ecowitt.
Is there a definition for the transmission of lightning data in the APRS format or in CWOP?  I haven't found that yet.
Does anyone have a link to the appropriate description?
Thanks!

Oliver

APRS and CWOP do not report lightning.

Here's a link to my raw CWOP weather data: http://www.findu.com/cgi-bin/rawwx.cgi?call=KC5JIM
Here's a link to my CWOP report: http://www.findu.com/cgi-bin/wxpage.cgi?call=KC5JIM&last=240
Ecowitt Wittboy| FOSHKplugin on Pi 4


Offline Gyvate

  • Forecaster
  • *****
  • Posts: 3298
Re: FOSHKplugin - brief introduction
« Reply #119 on: July 31, 2021, 07:57:47 AM »
Any chance for CWOP or APRS?

Your Meteobridge does CWOP and APRS.  Is there some reason it won't work for you?

It works perfectly, but I'm trying to get away from it since after almost a year he still refuses to properly report lightning from Ecowitt. Right now CWOP and APRS is all that I'm using Meteobridge for.
The only thing Meteobridge is not doing completely correct for lightning meanwhile (this applies to users who have the outdoor sensors temp, wind and rain active) is that the lightning count is one (1) less per day than the real count of the WH57.
« Last Edit: July 31, 2021, 10:27:11 AM by Gyvate »
WS2350 1.6.7, GW1000(3) 1.7.7,WH2650 WiFi (2) 1.7.7 (test/backup), GW1100 2.3.1, GW2000(3) 3.1.1, HP2551 1.9.5,5.1.5;HP3500 1.7.2,WS3800 1.2.8, WN1910 1.2.3,WN1980 1.2.3;
Ecowitt WS90(2)1.3.5/1.4.0, WS80(2)1.2.5, WS68, WS69, WH40, WH31, WH31-EP, WN30, WN34L, WN35, WH32, WH32-EP, WH32B, WH57 [Lightning], WH41 [PM2.5], WH51, WH45, WH55
MeteobridgePro(2)[test,prod] 5.8 Mar 01 2024, 15185 - Blake-Larsen Sun Recorder - RPi4/weewx 4.8.0/4.10.2/CumulusMX 3283/Meteobridge RPi4B-2GB(3169)
Barani Meteoshield Pro, MetSpec Rad02 - Ecowitt 5763,34418;WU ISAARB3(WH4000SE),ISAARB22(HP2553), http://meshka.eu

Offline Gyvate

  • Forecaster
  • *****
  • Posts: 3298
Re: FOSHKplugin - brief introduction
« Reply #120 on: July 31, 2021, 10:27:19 AM »
@olicat: see PM
WS2350 1.6.7, GW1000(3) 1.7.7,WH2650 WiFi (2) 1.7.7 (test/backup), GW1100 2.3.1, GW2000(3) 3.1.1, HP2551 1.9.5,5.1.5;HP3500 1.7.2,WS3800 1.2.8, WN1910 1.2.3,WN1980 1.2.3;
Ecowitt WS90(2)1.3.5/1.4.0, WS80(2)1.2.5, WS68, WS69, WH40, WH31, WH31-EP, WN30, WN34L, WN35, WH32, WH32-EP, WH32B, WH57 [Lightning], WH41 [PM2.5], WH51, WH45, WH55
MeteobridgePro(2)[test,prod] 5.8 Mar 01 2024, 15185 - Blake-Larsen Sun Recorder - RPi4/weewx 4.8.0/4.10.2/CumulusMX 3283/Meteobridge RPi4B-2GB(3169)
Barani Meteoshield Pro, MetSpec Rad02 - Ecowitt 5763,34418;WU ISAARB3(WH4000SE),ISAARB22(HP2553), http://meshka.eu

Offline KC5JIM

  • Senior Contributor
  • ****
  • Posts: 231
    • KC5JIM Weather
Re: FOSHKplugin - brief introduction
« Reply #121 on: July 31, 2021, 04:12:06 PM »
Any chance for CWOP or APRS?

Your Meteobridge does CWOP and APRS.  Is there some reason it won't work for you?

It works perfectly, but I'm trying to get away from it since after almost a year he still refuses to properly report lightning from Ecowitt. Right now CWOP and APRS is all that I'm using Meteobridge for.
The only thing Meteobridge is not doing completely correct for lightning meanwhile (this applies to users who have the outdoor sensors temp, wind and rain active) is that the lightning count is one (1) less per day than the real count of the WH57.

Right now Ecowitt shows 204 strikes for the day. Meteobridge shows 0. Meteobridge was right 45 minutes ago, then it just decided to stop. These are the last db entries (5 minutes increments) from Meteobridge sent to Meteotemplate for lightning: 203, 203, 203, 30, 11, 11, 0, 0. Somewhere along the line it decided that I was receiving "Anti-strikes" that reduce the total number of strikes detected. THAT is my problem. One less strike per day is meaningless, but turning 204 strikes into 0 strikes is not. I'm open to any suggestions of what I may be doing wrong.
Ecowitt Wittboy| FOSHKplugin on Pi 4


Offline davidefa

  • Forecaster
  • *****
  • Posts: 436
Re: FOSHKplugin - brief introduction
« Reply #122 on: July 31, 2021, 06:32:06 PM »
Right now Ecowitt shows 204 strikes for the day. Meteobridge shows 0. Meteobridge was right 45 minutes ago, then it just decided to stop. These are the last db entries (5 minutes increments) from Meteobridge sent to Meteotemplate for lightning: 203, 203, 203, 30, 11, 11, 0, 0. Somewhere along the line it decided that I was receiving "Anti-strikes" that reduce the total number of strikes detected. THAT is my problem. One less strike per day is meaningless, but turning 204 strikes into 0 strikes is not. I'm open to any suggestions of what I may be doing wrong.

Maybe you are seeing the 'strikes in the last xx minutes' and not the 'strikes today' ( only a supposition, I know nothing about meteobridge )

Offline Gyvate

  • Forecaster
  • *****
  • Posts: 3298
Re: FOSHKplugin - brief introduction
« Reply #123 on: July 31, 2021, 07:03:35 PM »
Right now Ecowitt shows 204 strikes for the day. Meteobridge shows 0. Meteobridge was right 45 minutes ago, then it just decided to stop. These are the last db entries (5 minutes increments) from Meteobridge sent to Meteotemplate for lightning: 203, 203, 203, 30, 11, 11, 0, 0. Somewhere along the line it decided that I was receiving "Anti-strikes" that reduce the total number of strikes detected. THAT is my problem. One less strike per day is meaningless, but turning 204 strikes into 0 strikes is not. I'm open to any suggestions of what I may be doing wrong.

Maybe you are seeing the 'strikes in the last xx minutes' and not the 'strikes today' ( only a supposition, I know nothing about meteobridge )
Thanks for commenting - @kd7eir and me have moved and continued the discussion via PM as it is completely off-topic here.  :-)
We will look into if and how Meteotemplate could play a role here, if the API string sent by Meteobridge needs modification etc.
If we don't find a solution, we will post in the Meteobridge board (in wxforum or/and in meteohub.com).
WS2350 1.6.7, GW1000(3) 1.7.7,WH2650 WiFi (2) 1.7.7 (test/backup), GW1100 2.3.1, GW2000(3) 3.1.1, HP2551 1.9.5,5.1.5;HP3500 1.7.2,WS3800 1.2.8, WN1910 1.2.3,WN1980 1.2.3;
Ecowitt WS90(2)1.3.5/1.4.0, WS80(2)1.2.5, WS68, WS69, WH40, WH31, WH31-EP, WN30, WN34L, WN35, WH32, WH32-EP, WH32B, WH57 [Lightning], WH41 [PM2.5], WH51, WH45, WH55
MeteobridgePro(2)[test,prod] 5.8 Mar 01 2024, 15185 - Blake-Larsen Sun Recorder - RPi4/weewx 4.8.0/4.10.2/CumulusMX 3283/Meteobridge RPi4B-2GB(3169)
Barani Meteoshield Pro, MetSpec Rad02 - Ecowitt 5763,34418;WU ISAARB3(WH4000SE),ISAARB22(HP2553), http://meshka.eu

Offline davidefa

  • Forecaster
  • *****
  • Posts: 436
Re: FOSHKplugin - brief introduction
« Reply #124 on: August 01, 2021, 03:08:14 PM »
If we don't find a solution, we will post in the Meteobridge board (in wxforum or/and in meteohub.com).

I suggest to post the solution even in the case you find a solution.