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

0 Members and 1 Guest are viewing this topic.

Offline falkunmalti

  • Member
  • *
  • Posts: 46
Re: FOSHKplugin - brief introduction
« Reply #275 on: July 26, 2022, 08:53:10 PM »
Hi

I need some help.  I installed FOSHKp;ugin as a service and now I cannot run CumulusMX - the station cannot connect.  I don't know how to disable FOXSHKplugin.  I tried to systemctl stop FOXSHKplugin but the file was not found.  Like an idiot, I installed FOX on the same pi as Cumulus.  Plesae help.

Offline thunder.ky

  • Weathering all the things!
  • Senior Member
  • **
  • Posts: 56
  • GW2000B, WS90, WeeWX, FOSHKplugin
    • thunder.ky
Re: FOSHKplugin - brief introduction
« Reply #276 on: July 26, 2022, 09:03:00 PM »
Hi

I need some help.  I installed FOSHKp;ugin as a service and now I cannot run CumulusMX - the station cannot connect.  I don't know how to disable FOXSHKplugin.  I tried to systemctl stop FOXSHKplugin but the file was not found.  Like an idiot, I installed FOX on the same pi as Cumulus.  Plesae help.

Oh no.

Try
Code: [Select]
systemctl stop foshkplugin (all lowercase).

Them try restarting CumulusMX.

Post your configuration for FOSHKplugin here (remove any passwords or API keys etc.) and we can have a look.
Ecowitt GW2000B v3.0.5 (Previous v2.2.4.8 )
Ecowitt WS90 v1.3.3
WeeWX v4.9.1
FOSHKplugin v0.10
https://wx.thunder.ky
  |  
  |  
  |  
  |  
  |  

Offline thunder.ky

  • Weathering all the things!
  • Senior Member
  • **
  • Posts: 56
  • GW2000B, WS90, WeeWX, FOSHKplugin
    • thunder.ky
Re: FOSHKplugin - brief introduction
« Reply #277 on: July 26, 2022, 09:07:58 PM »
Hi

I need some help.  I installed FOSHKp;ugin as a service and now I cannot run CumulusMX - the station cannot connect.  I don't know how to disable FOXSHKplugin.  I tried to systemctl stop FOXSHKplugin but the file was not found.  Like an idiot, I installed FOX on the same pi as Cumulus.  Plesae help.

Oh no.

Try

Code: [Select]
root@ubuntu:~# systemctl stop foshkplugin
"foshkplugin" in all lowercase.

Or you can try manually with

Code: [Select]
root@ubuntu:~# ps -ax | grep foshk
You'll get something like:

Code: [Select]
   2122 ?        Ssl   27:36 /usr/bin/python3 -u /opt/FOSHKplugin/foshkplugin.py
 303517 pts/0    S+     0:00 grep --color=auto foshk

Then kill the foshkplugin.py process like this:

Code: [Select]
root@ubuntu:~# kill 2122
Where 2122 is the PID for the foshkplugin.py process. Yours will be a different PID)

Then try restarting CumulusMX.

Post your configuration for FOSHKplugin here (remove any passwords or API keys etc.) and we can have a look.
« Last Edit: July 26, 2022, 09:12:09 PM by thunder.ky »
Ecowitt GW2000B v3.0.5 (Previous v2.2.4.8 )
Ecowitt WS90 v1.3.3
WeeWX v4.9.1
FOSHKplugin v0.10
https://wx.thunder.ky
  |  
  |  
  |  
  |  
  |  

Offline falkunmalti

  • Member
  • *
  • Posts: 46
Re: FOSHKplugin - brief introduction
« Reply #278 on: July 26, 2022, 09:35:35 PM »
Cumulus did not start and this is embarrassing but I cannot find where I installed fox.  What is the command to find a file in linux. I can't remember.


Offline thunder.ky

  • Weathering all the things!
  • Senior Member
  • **
  • Posts: 56
  • GW2000B, WS90, WeeWX, FOSHKplugin
    • thunder.ky
Re: FOSHKplugin - brief introduction
« Reply #279 on: July 26, 2022, 10:07:16 PM »
Cumulus did not start and this is embarrassing but I cannot find where I installed fox.  What is the command to find a file in linux. I can't remember.

Try this:

Code: [Select]
root@ubuntu:~# find / -name foshkplugin.py
It should come up with something like this:

Code: [Select]
/opt/FOSHKplugin/foshkplugin.py
Ecowitt GW2000B v3.0.5 (Previous v2.2.4.8 )
Ecowitt WS90 v1.3.3
WeeWX v4.9.1
FOSHKplugin v0.10
https://wx.thunder.ky
  |  
  |  
  |  
  |  
  |  

Offline falkunmalti

  • Member
  • *
  • Posts: 46
Re: FOSHKplugin - brief introduction
« Reply #280 on: July 26, 2022, 10:23:48 PM »
OK everyone.  I fixed the problem and Cumulus is now starting.  What was wrong was the  path and port were wrong in the HP2553 custom server configuration.  I guess I made erroneous entries when configuring fos (port 8080 and the wrong path.  I did not realize that foshk would change entries in my 2553 but I guess it did.  No wonder CMX did not start if the path and port were wrong!

Now I also looked everywhere on my pi and I cannot find the foshk directory,  I guess doing these things late at night is not a good idea!

I think I will try this again from scratch when I am more fresh.  Thanks for putting up with me LOL

Good night

Offline Gyvate

  • Forecaster
  • *****
  • Posts: 3329
Re: FOSHKplugin - brief introduction
« Reply #281 on: July 27, 2022, 02:29:29 AM »
the default directory for FOSHKplugin is /opt/FOSHKplugin
try the following command to locate your FOSHKplugin directory in your file system:
Code: [Select]
sudo find / -type d -name "FOSHKplugin"
on my system this produces the following output:
Code: [Select]
pi@NAS-Pi:~/FOSHKplugin $ sudo find / -type d -name "FOSHKplugin"
find: ‘/run/user/1000/gvfs’: Permission denied
find: ‘/proc/23750’: No such file or directory
/home/pi/FOSHKplugin
/mnt/TS-453A/Transfer/FOSHKplugin
and here we go
/home/pi/FOSHKplugin is my FOSHKplugin installation directory  :-)
yours may be different - I intentionally chose /home/pi instead of /opt

and, by the way, there's no harm installing and running FOSHKplugin on the same server (RPi) as CMX ...
« Last Edit: July 27, 2022, 02:33:27 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 falkunmalti

  • Member
  • *
  • Posts: 46
Re: FOSHKplugin - brief introduction
« Reply #282 on: July 27, 2022, 08:04:42 AM »
Gyvate

This is what I get. 
I know what this is trying to do but don't know why the permission denied.
sudo find / -type d -name "FOSHKplugin"
find: ‘/run/user/1000/gvfs’: Permission denied

There is a /run/user/1000 tree and the gvfs folder is blank.    I don't recall this at all.  Anyway probably doesn't matter much.  I am running the latest build of the raspberrry pi os.



Offline Gyvate

  • Forecaster
  • *****
  • Posts: 3329
Re: FOSHKplugin - brief introduction
« Reply #283 on: July 27, 2022, 08:24:01 PM »
Gyvate

This is what I get. 
I know what this is trying to do but don't know why the permission denied.
sudo find / -type d -name "FOSHKplugin"
find: ‘/run/user/1000/gvfs’: Permission denied

There is a /run/user/1000 tree and the gvfs folder is blank.    I don't recall this at all.  Anyway probably doesn't matter much.  I am running the latest build of the raspberrry pi os.
This
find: ‘/run/user/1000/gvfs’: Permission denied
will also appear but can be ignored - it just means that the command couldn't check any subdirectories due to missing permissions for the gvfs directory (or folder) - probably because it is empty - that's just part of the search process
but, if there is a subdirectory FOSHKplugin somewhere in the file system, its path will be displayed in one line - if you don't see anything, then there is no such directory and it got removed/deleted at some point (provided it was ever created)
the command may need some time to complete - so don't interrupt it with CTRL-C
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 joem

  • Member
  • *
  • Posts: 16
Re: FOSHKplugin - brief introduction
« Reply #284 on: October 02, 2022, 11:27:36 PM »
Anyone feeding (successfully) data to the Home Assistant Ecowitt integration?

See the HA instruction attached
 [ You are not allowed to view attachments ]

My foshkplugin config looks like this:
Code: [Select]
[Forward-6]
FWD_ENABLE = True
FWD_CMT = Sending to NEW home assistant ECOWITT format
FWD_URL = http://192.168.2.13:8123/api/webhook/3b1bbc5a752a1b30c50ffd6abd5a3901
FWD_INTERVAL =
FWD_IGNORE =
FWD_TYPE = EW
FWD_SID =
FWD_PWD =
FWD_STATUS = False
FWD_MQTTCYCLE = 0
FWD_EXEC =
« Last Edit: October 02, 2022, 11:30:49 PM by joem »

Offline Gyvate

  • Forecaster
  • *****
  • Posts: 3329
Re: FOSHKplugin - brief introduction
« Reply #285 on: October 03, 2022, 03:15:50 AM »
it just wants the custom server functionality of your console being used to post its data to the HA.

The wording "DIY Upload servers" is technically correct but unfortunately confusing as it doesn't match the Header in the WSView Plus app, the WebUI or the display page of the console - there it's found under "Weather Services --> Customized".

One can clearly see that the integration hasn't been made by Ecowitt themselves but by someone else (which is not always helpful - especially as EW wasn't - so far - even not allowed to take the development lead even though they wanted - from there some strange things in this integration originate; but "people's wish is their kingdom of Heaven" they say).

Not that it doesn't work - I got it running on my NAS inside a Docker container - but it's not yet fully thought through I find (which also comes from ignoring the manufacturer's advise who knows their devices throughout and deeply). I'd say it's "work in progress" but already quite functional. Some of the "widgets" get still stuck regarding history every now and then, and design is always a matter of taste (doesn't fully meet mine), but it's imo +/- working.

As for FOSHKplugin, you simply need to create a FORWARD section to the IP, path, port - and don't forget to select a reasonable posting interval. It can e.g. display they full sensor data sent by a GW2000 with plenty of extra sensors including both traditional and piezo rain. Their naming is a bit confusing especially with the rain observations. Need to figure out what they mean by what they say. (to me it looks as if the developer technically created the entities but did not fully understand the functionality behind each observation and name).

EDIT: removed orthographic mistakes
« Last Edit: October 03, 2022, 04:16:15 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 joem

  • Member
  • *
  • Posts: 16
Re: FOSHKplugin - brief introduction
« Reply #286 on: October 03, 2022, 02:42:17 PM »
Nice description.
What I understand, from your message is that the only thing from my config, posted above, I'm missing the
Code: [Select]
FWD_INTERVAL value.
Even with a value set, I'm getting the following error:
Code: [Select]
Logger: homeassistant.components.webhook
Source: components/ecowitt/__init__.py:27
Integration: Webhook (documentation, issues)
First occurred: 7:38:30 AM (4 occurrences)
Last logged: 7:39:42 AM

Error processing webhook 3b1bbc5a752a1b30c50ffd6abd5a3901
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/webhook/__init__.py", line 129, in async_handle_webhook
    response = await webhook["handler"](hass, webhook_id, request)
  File "/usr/src/homeassistant/homeassistant/components/ecowitt/__init__.py", line 27, in handle_webhook
    return await ecowitt.handler(request)
  File "/usr/local/lib/python3.10/site-packages/aioecowitt/server.py", line 102, in handler
    self.process_data(data)
  File "/usr/local/lib/python3.10/site-packages/aioecowitt/server.py", line 51, in process_data
    station = extract_station(data)
  File "/usr/local/lib/python3.10/site-packages/aioecowitt/station.py", line 28, in extract_station
    frequence = data.pop("freq")
KeyError: 'freq'

Offline olicat

  • Forecaster
  • *****
  • Posts: 1522
  • GWxx00, HPx5x1C, WN1900C, WN1980C & WS3xx0C
    • FOSHKplugin
Re: FOSHKplugin - brief introduction
« Reply #287 on: October 03, 2022, 03:07:44 PM »
Hi!

This is more an HA integration than FOSHKplugin error.
Have a look here.

Oliver

Offline joem

  • Member
  • *
  • Posts: 16
Re: FOSHKplugin - brief introduction
« Reply #288 on: October 03, 2022, 03:11:50 PM »
Hi olicat,
that's what I wanted to hear, that my foshkplugin settings are correct. Thanks.
I just wonder how did Gyvate manage to get it to work on his side. Sorry for spamming around.

Offline Gyvate

  • Forecaster
  • *****
  • Posts: 3329
Re: FOSHKplugin - brief introduction
« Reply #289 on: October 03, 2022, 03:17:05 PM »
what's your WiFi firmware version of your console which posts to FOSHKplugin ?
Should be 1.6.4 - or 1.7.5/2.1.9/1.20 if your console is a GW1000, WH2650/GW1100, GW2000/WN19x0 console

If you are on a lower WiFi firmware version, it is possible that the console sends something the ecowitt-integration cannot decipher
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 joem

  • Member
  • *
  • Posts: 16
Re: FOSHKplugin - brief introduction
« Reply #290 on: October 03, 2022, 03:23:43 PM »
I was on 1.6.1, just updated to 1.6.4. Having the same behavior.

Offline Gyvate

  • Forecaster
  • *****
  • Posts: 3329
Re: FOSHKplugin - brief introduction
« Reply #291 on: October 03, 2022, 03:54:28 PM »
any change if the FWD_TYPE in FOSHKplug is RAWEW instead of EW ?
And maybe you put a FWD_INTERVAL = 10
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 joem

  • Member
  • *
  • Posts: 16
Re: FOSHKplugin - brief introduction
« Reply #292 on: October 03, 2022, 04:13:10 PM »
I just fired up a VM with the dev version of HA, and everything is working.
It looks like it takes some time until the fix is going to be pushed to the public.
Thanks for your help guys!

Offline joem

  • Member
  • *
  • Posts: 16
Re: FOSHKplugin - brief introduction
« Reply #293 on: November 08, 2022, 04:36:15 AM »
..... and it's me again.
I just noticed that the plugin website is showing a blank page.
I've looked into the logs, and could not identify anything that could cause the blank page.
Where else could I check?

Offline olicat

  • Forecaster
  • *****
  • Posts: 1522
  • GWxx00, HPx5x1C, WN1900C, WN1980C & WS3xx0C
    • FOSHKplugin
Re: FOSHKplugin - brief introduction
« Reply #294 on: November 08, 2022, 05:01:28 AM »
Hi!

Which website do you mean?
If you mean the standard local FOSHKplugin page showing all the current data unter http://ipaddress:port it is always a good idea to add a status&minmax to the url: http://ipaddress:port/status&minmax.
This way there's anything shown even if the weather station does not send any data (anymore).
Just to check the installation ...
Perhaps FOSHKplugin is running fine but your weather station stopped sending for unknown reason?

Oliver

Offline joem

  • Member
  • *
  • Posts: 16
Re: FOSHKplugin - brief introduction
« Reply #295 on: November 08, 2022, 05:08:56 AM »
Hi Oliver,
as I remember I was accessing it without the trailing status&minmax, in my case: http://192.168.2.207:8080/
There were lots of info, I was able to see all the foshkplugin details.
Now, following your advice, with status&minmax I get the following data:
Code: [Select]
minmax_init 1667892874
sunmins 0
last_suntime
last_suncheck
running True
wswarning True
sensorwarning False
batterywarning False
stormwarning True
tswarning False
updatewarning False
leakwarning False
co2warning False
intvlwarning False
time 1667902015

Offline olicat

  • Forecaster
  • *****
  • Posts: 1522
  • GWxx00, HPx5x1C, WN1900C, WN1980C & WS3xx0C
    • FOSHKplugin
Re: FOSHKplugin - brief introduction
« Reply #296 on: November 08, 2022, 05:15:10 AM »
Hi!

Quote
wswarning   True
Your station has stopped transmitting.
Check whether sending via custom server with the required settings (server ip, port, path) is activated in the configuration of the weather station.
FOSHKplugin waits for incoming data - but receives nothing.

Oliver

Offline joem

  • Member
  • *
  • Posts: 16
Re: FOSHKplugin - brief introduction
« Reply #297 on: November 08, 2022, 05:36:59 AM »
That's strange.
I just replaced my old weather station, since some sensors died a few weeks ago.
I've set up all the settings for the customized server as on my old one.

I'm seeing this in the logs: Nov 08 10:36:59 foshk foshkplugin[1115]: post-request from 192.168.2.61: /

192.168.2.61 being the weather station.

Offline olicat

  • Forecaster
  • *****
  • Posts: 1522
  • GWxx00, HPx5x1C, WN1900C, WN1980C & WS3xx0C
    • FOSHKplugin
Re: FOSHKplugin - brief introduction
« Reply #298 on: November 08, 2022, 05:48:55 AM »
Hi!

You should check the path setting again.
It should be /data/report/ - nothing else. In your case the path is currently just "/" - what is wrong.

Oliver

Offline joem

  • Member
  • *
  • Posts: 16
Re: FOSHKplugin - brief introduction
« Reply #299 on: November 08, 2022, 05:51:08 AM »
That was it. Thank you!

 

anything