Seite 4 von 4

Re: FOSHKplugin & Home Assistant

Verfasst: 06 Nov 2024, 13:24
von reimuell
Hallo,
ihr seit ja echt schnell. Ich benutze die Version v0. 09. Die Konfiguration habe ich aus dem Beispiel kopiert, also hass=True (case sensitiv) ist und war schon immer drin.
Hilft aber nichts. Ich habe jetzt einen Forward der Ecowitt Daten eingerichtet und die ecowitt Integration installiert. Ging auf den ersten Knopfdruck.
Da ich jetzt x Stunden probiert und gelesen habe, ohne Erfolg, erscheint mit der andere Weg einfacher. Aber ich gebe zu nur die Basics von mqtt zu verstehen.
Aber wenn noch Ideen da sind, ich versuch gerne weiter. Es müßte doch ein Log von mqtt geben das Probleme meldet.
Danke nochmal.
Reiner Müller

Re: FOSHKplugin & Home Assistant

Verfasst: 06 Nov 2024, 16:00
von olicat
Hi!

Die v0.9 (release) ist dafuer leider zu alt. Zwar kann diese mit MQTT umgehen, die Autodiscovery von HA wird jedoch noch nicht unterstuetzt.
Insofern kann ich Dich nur bitten, die aktuelle Beta-Version zu installieren.
All die "huebschen", "neuen" Dinge sind erst damit realisiert, wie:

Code: Alles auswählen

changed: maxdailygust is now maxdailygustkmh in metric data (kmh) - the unit of maxdailygust is mph - ATTENTION! may cause compatibility issues!
fixed: typo in generic-FOSHKplugin-install.sh fixed sytemd –> systemd
fixed: UDP command Plugin.intvlwarning=enable/disable triggered co2warning instead (copy/paste-Error)
fixed: min/max values for leaf moisture sensors 1-8 were not written to the daily CSV
fixed: WS90 rain-handling - replacing the new names with the old ones now works correctly (e.g. "rrain_piezo" –> "rainratein")
fixed: scanWS MAC address output
fixed: Sending of additional temp/hum sensors now according to WeatherCloud API documentation: temp02/hum02
fixed: sunhours calculation - formula corrected like WeeWX extension (Jterrettaz)
fixed: modifications for altered AWEKAS-API (response OK)
fixed: possible error in the creation of the daily CSV fixed
improved: improved 10 minutes average calculation "winddir_avg10m" (avgWind)
improved: ignore "@" in the field identifier of OUT_TEMP and OUT_HUM to standardise the assignments as with FWD_REMAP
improved: Pushover notification for missing weather station changed to red text color
improved: existing values can now be assigned via FWD_REMAP to the WeatherCloud keys co, no, no2, so2, o3, tempagro, et, pwrsply, battery and noise
improved: sending pm25 & aqi of WH41/43 channel #1 to WeatherCloud if no WH45 present (WH45 still preferred)
improved: conversion to WU: tempNf, humidityN, qcStatus, softwareType
improved: better error handling for saving as file via ftp(s)
improved: error handling for Weathercloud forwards
improved: error handling for Pushover push notifications (automatic retry)
improved: parameter -scanWS gathers all weather stations now - including GW2000
improved: WH45 for WU - if no WH41 present, use data from WH45 instead
improved: internal functions stringToDict & getfromDict
improved: if the structure of the daily CSV is changed, a new file is created
new: introducing REBOOT_WARNING - check wether current runtime ⇐ last runtime - if so: warn (log, push, UDP: rebootwarning=1 dailyboot=#count)
can be deactivated with http: /FOSHKplugin/rebootwarning=disable and UDP: Plugin.rebootwarning=disable
LoxBerry: commands are included as virtual outputs in the template
new: "dailyboot" (number of restarts) and "rebootwarning" as keys, reset at midnight and is also part of the daily CSV (if EVAL_VALUES active)
LoxBerry: Keys "rebootwarning" and "dailyboot" are included as virtual inputs in the template
new: "sunshine" represents the presence of sunshine; can be artificially prolonged with SUNSHINE_HOLD to prevent constant changes
LoxBerry: key "sunshine" also included in template as virtual input
new: introducing SUNSHINE_HOLD = seconds - Hold time in seconds for value sunshine, this time continues to be output sunshine = True, even if there is no sunshine (default: 0)
new: FWD_TYPE = MIYO; sends temperature, wind and rain state (rain = rainratemm > 0 or hourlyrainmm > 1 or dailyrainmm > 1) to a MIYO cube (irrigation system)
rain forecast is still missing; could be implemented too via API AerisWeather or AccuWeather (both in test)
new FWD_TYPE = INFLUX2MET and INFLUX2IMP - support of InfluxDB2 - Python 3.6 or later and Python lib influxdb-client are required!
bucket = dbname; org = fwd_sid; token = fwd_pwd
missed forwards are queued and transmitted when the destination is available again
new: (Loxone) virtual input FOSHK-getMinMax for command Plugin.getminmax integrated in Loxone template
new: send the fwd_type, prgname & prgver as an argument with postFile
new: FWD_WARNING, FWD_WARNINT, http://ipaddress:portnumber/FOSHKplugin/fwdstat, enable/disable via http & UDP
new: BATTERY_WARNING may be enabled/disabled via http & UDP
new: support for leafwetness sensors for Ambient Weather stations
new: change the date/time output format via Config\DT_FORMAT (default = %d.%m.%Y %H:%M:%S - dd.mm.yyyy hh:mm:ss) for all (!) date/time outputs: log, csv, push
new: forward warning via Pushover
after a configurable number of successive unsuccessful attempts, a push message is sent through Pushover
new: statistics page for forwards: http://ipaddress:portnumber/FOSHKplugin/fwdstat
new: scan weather station page: http://ipaddress:portnumber/FOSHKplugin/scanWS
new: missed forwards for forward types EW and RAWEW may be queued and sent when destination is available again (with FWD-xx\FWD_QUEUE = True)
new: exclude list for battery warning: BATTERY_WARNEXCLUDE - a comma separated list of keys to exclude from battery warning e.g. wh90batt
new: Awekas-API: deliver weather report conditions & tendency
missed forwards are automatically queued as FOSHKplugin-queue/FWD-nr/FOSHKplugin-queued-data-nr.csv in config dir (or dir configured as FWD_QDIR)
new: Adaptations for installation under (Open)Suse, Synology, Fedora (zypper, ipkg, dnf) in generic version
new: custom push notifications via Pushover (user-defined push messages when values exceed or fall below a definable value)
new: Conversion to UTF-8 of all programme parts (may cause problems)
new: Weather Report for Awekas - automatically report rain, storm and thunderstorm
new: FWD_TYPE = BANNER - automatic generation of banners and stickers with current weather data
new: further queryable key names for getvalue, JSON, … and forward types MQTT, InfluxDB, BANNER and TAGFILE:
prgname (FOSHKplugin)
prgver (current version number)
winddirtext (if available, 10min winddir-mean otherwise winddir as short text (N, NE, NNO, …)
aqtime (Time of processing by FOSHKplugin)
pchange1in (1 hour pressure change in inHg)
pchange3in (3 hour pressure change in inHg)
lightningmi (lightning distance in miles)
starttime (start time of FOSHKplugin)
new: FWD_TYPE = TAGFILE - user-defined output format based on tags and templates
new: config option Export\LIMIT_WINDGUST = n to prevent processing of unrealistic values for windgustmph and maxdailygust (e.g. for WS80/WS90).
if value >= n the windgustmph will be renamed to _windgustmph (thus not processed); last "good" maxdailygust will be used as maxdailygust
new: calculation of windrun (in miles) and windrunkm (in km) and daily solar radiation sum (srsum)
new: with getvalue, the additional parameter &comma can be used to force the output of a comma (",") instead of the dot (".") in numeric values
new: with Config\LINK_ADR = address in Config file you may specify a name or address for all links created by FOSHKplugin (e.g. for use on public web server)
new: support of Debian Bookworm based distributions by using virtual environment venv (problem with installation of required Python libraries with pip - PEP 668)
new: with Export\ADD_DEWPT = True you can enable/disable the dew point calculation for indoor sensor, WH31 and WH45 - default: False
the keys are dewptinf (indoor T/H sensor), dewptNf (WH31; where N=1..8), dewptf_co2 (for WH45) and for metric units: dewptinc, dewptNc, dewptc_co2
Loxone: new metric keys dewptinc, dewptNc, dewptc_co2 added to the Loxone template
new: with Logging\COLOR_PRINT (default: True), messages in the console window are highlighted in colour (ERROR = red, WARNING = yellow and after a warning has been cancelled = green; can be deactivated with COLOR_PRINT = False
new: get complete dictionary with http://ipaddress:portnumber/FOSHKplugin/getFullDict (with options like separator, sorted, json)
new: supports the Prometheus time series database - see https://foshkplugin.phantasoft.de/generic#prometheus
new: Support for the old HP1001 console (conversion to WU format)
new: use "&human" to output the time as readable time (e.g. dd.mm.yyyy hh:mm:ss) for time-specific getvalue queries; output format and locale may be specified (defaults to DT_FORMAT & LANGUAGE)
Example: http://192.168.15.100:8096/FOSHKplugin/getvalue?key=aqtime&human&format="%A %x %H:%M:%S"&locale=nl_NL.UTF-8 –> zaterdag 03-02-24 10:17:22
new: with Export\ADD_SPREAD = True (default: False) there will be additionally spread values for indoor, outdoor and WH45 sensor as well as all WH31 calculated
changed: all incoming get-requests will be URL-decoded now
new: enable signal quality acquisition on supported consoles with Export\ADD_SIGNAL = True (default: False)
new: with the option FWD_OPTION = blacklist=False, the additional values for spread and signal quality are forwarded in Ecowitt format for this specific forward
new: Introduction of a naming scheme for beta versions ("Beta YYMMDD") - displayed at startup, in the log files and on the web pages generated by FOSHKplugin
new: ADD_SCRIPT - offers the possibility to integrate data from third party devices - see https://foshkplugin.phantasoft.de/generic#script
changed: postroot.sh - check Pillow installation fixed (newer versions named pillow instead of Pillow) - LoxBerry only
changed: sed is now working globally in postinstall.sh & postupgrade.sh - LoxBerry only
new: enable debug mode if file debug.enable found in the config directory
enable debug mode with bin/service.sh debug-enable and disable with bin/service.sh debug-disable - LoxBerry only
changed: changed default SUN_COEF from 0.8 to 0.92 - should fit better for Germany (too little sunshine recorded: decrease value; too much: increase)
changed: all sun related values (e.g. sunshine, srsum, sunhours, …) are only transmitted if solarradiation is present
improved: better integration with Home Assistant (MQTT discovery) - see https://foshkplugin.phantasoft.de/generic#hass
new: support of soilmoisture sensors 10..16
improved: optimised clientraw.txt output (10x6 minute history for windspeed, outtemp, rainrate, winddir), Current Condition Icon (#48)
new: Loxone: support rain state (srain_piezo) in Loxone template
new: support of WS85 sensor array (wh85batt, ws85_ver)
new: keys wnowcnd = current weather condition and theosunsr = theoretical sunshine threshold are available for several forward types (TAGFILE, BANNER, http query)
wnowcnd:
0=sunny
1=clearnight
2=cloudy
4=cloudynight
5=dry (cloudy periods)
6=fog
8=heavyrain (heavy rain)
9=mainlyfine
10=mist
11=nightfog
13=nightovercast
16=snow
20=rain (normal rain)
31=thunderstorms
33=windy
35=windy rain
improved: http request getFullDict and keyhelp can be filtered noch (&filter=searchstring)
new: experimental support of IoT devices AC1100 & WFC01 with GW2000 console (not yet complete)
fixed: During the first query of the day, the last values of the previous day could still be transmitted - now the reset for the daily rainfall amount takes place when the first data of the day is received
new: for use in Docker environments, the configuration file to be used can be specified with the environment variable FOSHKPLUGINCONFIGFILE
improved: the target bucket for InfluxDB 2 no longer needs to be created manually - it is created automatically if necessary
Speziell:
improved: better integration with Home Assistant (MQTT discovery) - see https://foshkplugin.phantasoft.de/generic#hass
ist das, worauf es Dir hier ankommt.
;-)

Bzgl. Update siehe hier.

Oliver

Oliver

Re: FOSHKplugin & Home Assistant

Verfasst: 06 Nov 2024, 16:43
von reimuell
Hallo,

siehe da nun geht auch das --) auf Anhieb. Jetzt habe ich zwei Lösungen.
Danke.
Reiner Müller

Re: FOSHKplugin & Home Assistant

Verfasst: 15 Nov 2024, 23:46
von putyourlitterhere
Hi, ich verwendet jetzt auch die 0.10 beta Version um Daten per MQTT und Auto Discovery an Home Assistant zu senden. Das klappt super! Gerne würde ich die Datenmenge, die auf HA protokolliert wird reduzieren und daher ein paar Werte nicht übermitteln.
es scheint, als würde FWD_IGNORE bei dieser Übertragungsart ignoriert.
Laut Doku überträgt FOSHKplugin nur die geänderten Werte direkt bei Änderung. Da es aber mehrere Zeitstempel-Werte gibt (aqtime, dateutc) findet faktisch fast jede Sekunde eine Wert-Aktualisierung statt. Außerdem gibt es einige Werte, die meine Wetterstation nicht erfasst und die ich daher nicht übertragen möchte (z.b. CO2warning, battery, etc.). Und manche Werte machen meiner Meinung nach auch keinen Sinn (wenn ich sie richtig verstehe). Dazu zählt z.B. dailyrainmm_min oder dailyrainmm_min_time.
Kann ich FOSHKplugin daran hindern diese Werte zu übertragen?

Re: FOSHKplugin & Home Assistant

Verfasst: 16 Nov 2024, 09:05
von olicat
Moin,
es scheint, als würde FWD_IGNORE bei dieser Übertragungsart ignoriert.
das muss ich mir naeher anschauen. Gedacht ist schon, das man in FWD_IGNORE angegebene Werte ignorieren kann.

Oliver

Re: FOSHKplugin & Home Assistant

Verfasst: 16 Nov 2024, 11:46
von Werner
Kann ich FOSHKplugin daran hindern diese Werte zu übertragen?
Natürlich - funktioniert einwandfrei.

Meine Konfiguration dazu

Code: Alles auswählen

[IoT]
IOT_ENABLE = True
IOT_INTERVAL = 20

[Export]
EVAL_VALUES = True
ADD_ITEMS = 
OUT_TEMP = 
OUT_HUM = 
OUT_TIME = False
FIX_LIGHTNING = True
UDP_MINMAX = False
ADD_SPREAD = False
ADD_SIGNAL = True
ADD_SIGNALMORE = True
ADD_DEWPT = False

[Forward-3]
FWD_TYPE = MQTTMET
FWD_CMT = MQTT-Forward of metric values to Home Assistant
FWD_URL = 192.168.0.96:1883@homeassistant/FOSHKplugin
FWD_ENABLE = True
FWD_OPTION = MQTTCYCLE=5,hass=True,devname=WS3910,minmax=False,status=True,diagnostic=True
FWD_SID = benutzer
FWD_PWD = kennwort
FWD_STATUS = True
FWD_IGNORE = freq,dateutc,wnowlvl,wswarning,co2warning,leakwarning,sensorwarning,tswarning,updatewarning,batterywarning,stormwarning,intvlwarning
FWD_IGNORE_OLD = freq,dateutc,isintvl,isintvl10,pchange1,ptrend1,wnowlvl,wswarning,co2warning,leakwarning,sensorwarning,tswarning,updatewarning,batterywarning,stormwarning,intvlwarning

FWD_IGNORE_OLD ist/war zum Testen und ist nicht aktiv!

Re: FOSHKplugin & Home Assistant

Verfasst: 20 Nov 2024, 23:33
von putyourlitterhere
Hi also nun funktioniert es bei mir auch. Ich vermute, ich hab das erste mal ohne FWD_IGNORE gesendet. Damit kannte HomeAssistant alle Werte und hat dafür Entitäten angelegt. Und vielleicht habe ich nicht genau genug gekuckt, wie alt die Werte waren.
Jetzt werden mir die Werte, die ich in FWD_IGNORE eingetragen habe in Home Assistant mit "nicht verfügbar" angezeigt.
Danke schön und sorry für die Verwirrung.