Metainformationen zur Seite

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen RevisionVorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
plugins:foshkplugin:foshkplugin_generic_version [2025/01/16 12:49] Oliver Engelplugins:foshkplugin:foshkplugin_generic_version [2025/03/06 21:33] (aktuell) Oliver Engel
Zeile 68: Zeile 68:
   * 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: 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: 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 Export\ADD_DEWPT = True you can enable/disable the dew point calculation for indoor sensor, WH31 and WH45/WH46 - default: False\\  the keys are dewptinf (indoor T/H sensor), dewptNf (WH31; where N=1..8), dewptf_co2 (for WH45/WH46) 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: 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: get complete dictionary with http:%%//%%ipaddress:portnumber/FOSHKplugin/getFullDict (with options like separator, sorted, json)
Zeile 74: Zeile 74:
   * new: Support for the old HP1001 console (conversion to WU format)   * 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: 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+  * new: with Export\ADD_SPREAD = True (default: False) there will be additionally spread values for indoor, outdoor and WH45/WH46 sensor as well as all WH31 calculated
   * changed: all incoming get-requests will be URL-decoded now   * 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: enable signal quality acquisition on supported consoles with Export\ADD_SIGNAL = True (default: False)
Zeile 95: Zeile 95:
   * 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   * 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   * 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+  * newConfig\RUN_DESC = note - string is output as additional information in push notifications (behind the IP address) and for internal html pages help, banner, fwdstat, keyhelp, scanWS in the headline 
 +  * improved: fixed some warnings regarding Python >= 3.11 string handling ("DeprecationWarning: invalid escape sequence" and "SyntaxWarning: invalid escape sequence"
 +  * new: support of WH48 (guess!) 
 +  * new: enable more keys (radcompensation, newVersion, upgrade, rainFallPriority, rainGain, rstRainDay, rstRainWeek, rstRainYear, piezo, rainN_gain (where N=1..5)) on supported consoles with Export\ADD_MORE = True (default: False) 
 +  * fixed: queued data may not be forwarded to InfluxDB because the quotes were missing in the value (missed="value"
 +  * improved: Firmware-Update-Check for WebUI devices (to be done) 
 +  * new: overview pages for formats WU and IoT: http://ipaddress:portnumber/WU and http://ipaddress:portnumber/IoT 
 +  * improved: variable Config\LB_IP falls back to "" instead of "LB_IP" if not configured 
 +  * new: globally define the key containing snow depth (e.g. depth_ch1) with Weatherstation\SNOW_DEPTH = keyname - a forward specific FWD_OPTION = SNOW_DEPTH=depth_chN overrules this global setting 
 +  * new: transmit snow depth to Awekas with AWEKAS forward - can be adjusted with FWD_OPTION = SNOW_DEPTH=depth_ch2 or the global setting Weatherstation\SNOW_DEPTH = keyname 
 +  * new: with Export\ADD_VPD = True you can enable/disable the VPD calculation for all T/H sensors (outdoor sensor, WH31 and WH45/WH46) - default: False\\  the keys are vpd (outdoor T/H sensor), vpdin (indoor T/H sensor), vpdN (WH31; where N=1..8), vpd_co2 (for WH45/WH46) 
  
 **Version 0.09 - 02.04.2022** **Version 0.09 - 02.04.2022**
Zeile 296: Zeile 307:
  **Features:**  **Features:**
  
-  * accepts http messages from a weather station (GW1000, GW1100, GW2000, HP2551, HP2560, WN19x0, DP1500, HP1000SE Pro, Sainlogic 7 in 1, ELV WS980WiFi, Eurochron EFWS 2900, Ambient Weather WS-2902, WS-2000, WS-5000, ???) locally in WU or Ecowitt protocol via network+  * accepts http messages from a weather station (GW1000, GW1100, GW2000, GW3000, HP2551, HP2560, WN19x0, WS6210, DP1500, HP1000SE Pro, Sainlogic 7 in 1, ELV WS980WiFi, Eurochron EFWS 2900, Ambient Weather WS-2902, WS-2000, WS-5000, ???) locally in WU or Ecowitt protocol via network
   * supports custom server on stations from Ambient Weather   * supports custom server on stations from Ambient Weather
   * does not require cloud services or internet connection   * does not require cloud services or internet connection
Zeile 302: Zeile 313:
   * is able to feed a MQTT broker   * is able to feed a MQTT broker
   * connection to any database system possible via telegraf   * connection to any database system possible via telegraf
-  * direct support of InfluxDB+  * direct support of InfluxDB und InfluxDB v2
   * saves the converted or imperial data sorted and / or extracted as CSV   * saves the converted or imperial data sorted and / or extracted as CSV
   * enables forwarding to up to 100 servers that are not supported by the weather station itself (e.g. [[https://www.awekas.at/|Awekas]], [[https://www.pwsweather.com/|PWSWeather]], [[https://www.windy.com/|Windy]] or [[https://luftdaten.info/|Luftdaten.info]], but you could also use [[https://www.wunderground.com/|WU]] in a different interval)   * enables forwarding to up to 100 servers that are not supported by the weather station itself (e.g. [[https://www.awekas.at/|Awekas]], [[https://www.pwsweather.com/|PWSWeather]], [[https://www.windy.com/|Windy]] or [[https://luftdaten.info/|Luftdaten.info]], but you could also use [[https://www.wunderground.com/|WU]] in a different interval)
Zeile 366: Zeile 377:
 {{anchor:install}} {{anchor:install}}
  
-**Installation**:\\  # create a local directory\\  sudo mkdir /opt/FOSHKplugin\\  #\\  # change into the created directory\\  cd /opt/FOSHKplugin\\  #\\  # get the current version of the plugin via wget\\  wget -N [[http://foshkplugin.phantasoft.de/files/generic-FOSHKplugin.zip]]\\  # or use a local zip-file\\  #\\  # unpack ZIP-File\\  unzip generic-FOSHKplugin.zip\\  #\\  # Allow execute right for generic-FOSHKplugin-install.sh (this script)\\  chmod u+x generic-FOSHKplugin-install.sh\\  #\\  # Run generic-FOSHKplugin-install.sh (this script)\\  sudo ./generic-FOSHKplugin-install.sh --install+**Installation**:\\  # create a local directory\\  sudo mkdir /opt/FOSHKplugin\\  #\\  # change into the created directory\\  cd /opt/FOSHKplugin\\  #\\  # get the current version of the plugin via wget\\  wget -N [[http://foshkplugin.phantasoft.de/files/generic-FOSHKplugin.zip]]\\  # or use a local zip-file\\  #\\  # unpack ZIP-File\\  unzip generic-FOSHKplugin.zip\\  #\\  # Allow execute right for generic-FOSHKplugin-install.sh (this script)\\  chmod u+x generic-FOSHKplugin-install.sh\\  #\\  # Run generic-FOSHKplugin-install.sh (this script)\\  sudo ./generic-FOSHKplugin-install.sh -install
  
 {{anchor:configure}} {{anchor:configure}}
Zeile 517: Zeile 528:
 LOX_PORT = 12340                # Loxone-Port - port to send data to LOX_PORT = 12340                # Loxone-Port - port to send data to
 LB_IP =                         # Loxberry-IP LB_IP =                         # Loxberry-IP
 +LINK_ADR =                      # use the specified IP address or a server name instead of the local IP address in links (when operating on a public server)
 LBU_PORT = 12341                # Loxberry-Port - port to receive UDP-datagrams LBU_PORT = 12341                # Loxberry-Port - port to receive UDP-datagrams
 LBH_PORT =                      # Loxberry-Port - port to receive HTML-in & out LBH_PORT =                      # Loxberry-Port - port to receive HTML-in & out
Zeile 532: Zeile 544:
 RESTART_ENABLE = False          # enable restarting FOSHKplugin via UDP and http (default: False - danger!) RESTART_ENABLE = False          # enable restarting FOSHKplugin via UDP and http (default: False - danger!)
 DT_FORMAT = %d.%m.%Y %H:%M:%S   # global default for date/time format (default: %d.%m.%Y %H:%M:%S - dd.mm.yyyy hh:mm:ss) DT_FORMAT = %d.%m.%Y %H:%M:%S   # global default for date/time format (default: %d.%m.%Y %H:%M:%S - dd.mm.yyyy hh:mm:ss)
 +RUN_DESC =                      # string is output as additional information in push notifications (behind the IP address) and for internal html pages help, banner, fwdstat, keyhelp, scanWS in the headline
  
 [Weatherstation] [Weatherstation]
Zeile 537: Zeile 550:
 WS_PORT =                       # UDP-port of weather station WS_PORT =                       # UDP-port of weather station
 WS_INTERVAL = 60                # weather station will send data every n seconds (16..3600) WS_INTERVAL = 60                # weather station will send data every n seconds (16..3600)
 +WS90_CONVERT = True             # automatically convert WS90 rain data keys to conventional rain sensor keys if only these WS90 rain values are present (globally)
  
 [Export] [Export]
Zeile 543: Zeile 557:
 ADD_DEWPT = False               # enable/disable additional dew point calculation (indoor sensor, WH31, WH45) - default: False; set to True to enable ADD_DEWPT = False               # enable/disable additional dew point calculation (indoor sensor, WH31, WH45) - default: False; set to True to enable
 ADD_SPREAD = False              # enable/disable additional spread calculation (indoor & outdoor sensor, WH31, WH45) - default: False; set to True to enable ADD_SPREAD = False              # enable/disable additional spread calculation (indoor & outdoor sensor, WH31, WH45) - default: False; set to True to enable
 +ADD_VPD = False                 # enable/disable additional VPD calculation (indoor & outdoor sensor, WH31 and WH45/46 - default: False; set to True to enable
 ADD_SIGNAL = False              # enable/disable signal quality acquisition on supported consoles - default: False; set to True to enable ADD_SIGNAL = False              # enable/disable signal quality acquisition on supported consoles - default: False; set to True to enable
 OUT_TEMP =                      # fake the temperature-value for outdoor-sensor with value of specific indoor-sensor e.g. temp1f OUT_TEMP =                      # fake the temperature-value for outdoor-sensor with value of specific indoor-sensor e.g. temp1f
Zeile 551: Zeile 566:
 URL_REPAIR = True               # automatically inserts a missing but required "http://" into the FWD_URL (default: True) URL_REPAIR = True               # automatically inserts a missing but required "http://" into the FWD_URL (default: True)
 LIMIT_WINDGUST =                # limit from which windgustmph and maxdailygust are blocked for any further processing to prevent unrealistic values (e.g. WS80/WS90). LIMIT_WINDGUST =                # limit from which windgustmph and maxdailygust are blocked for any further processing to prevent unrealistic values (e.g. WS80/WS90).
 +ADD_SCRIPT =                    # script to globally integrate data from third party devices - see https://foshkplugin.phantasoft.de/generic#script
  
 [Forward] [Forward]
Zeile 1210: Zeile 1226:
   - Adjust config foshkplugin.conf: Pushover\PO_ENABLE=True Pushover\PO_USER="Your User Key" and Pushover\PO_TOKEN=API-TOKEN:\\   - Adjust config foshkplugin.conf: Pushover\PO_ENABLE=True Pushover\PO_USER="Your User Key" and Pushover\PO_TOKEN=API-TOKEN:\\
  
-[Pushover]\\  PO_ENABLE = True\\  PO_USER = userkey\\  PO_TOKEN = token\\  It is not necessary to enter a URL under PO_URL. This setting would overwrite the internally predefined pushover URL. +[Pushover]\\  PO_ENABLE = True\\  PO_USER = userkey\\  PO_TOKEN = token\\  It is not necessary to enter a URL under PO_URL. This setting would overwrite the internally predefined pushover URL.\\  
- +Restart FOSHKplugin
-  - Restart FOSHKplugin+
  
 From now on there should be a push notification for all important status changes.\\  The sending of push messages is activated with the switch PO_ENABLE = True in the config file. Sending is deactivated by default (False).\\  Push notifications from FOSHKplugin can also be activated and deactivated during runtime, provided the correct credentials are stored in the config file.\\  This is done via http via any web browser by calling up the page http:%%//%%ipaddress:port/FOSHKplugin/pushover=enable (activate) or http:%%//%%ipaddress:port/FOSHKplugin/pushover=disable (deactivate). The port is the port specified in the config file under LBH_PORT.\\  This is also possible via the UDP interface of FOSHKplugin: sending "Plugin.pushover=enable" to the IP address of the host and the port on which FOSHKplugin is running (LBU_PORT in the config file) activates the sending; "Plugin.pushover=disable" deactivates this.\\  Any errors when sending push notifications as well as activating/deactivating during runtime are logged in the standard log file. From now on there should be a push notification for all important status changes.\\  The sending of push messages is activated with the switch PO_ENABLE = True in the config file. Sending is deactivated by default (False).\\  Push notifications from FOSHKplugin can also be activated and deactivated during runtime, provided the correct credentials are stored in the config file.\\  This is done via http via any web browser by calling up the page http:%%//%%ipaddress:port/FOSHKplugin/pushover=enable (activate) or http:%%//%%ipaddress:port/FOSHKplugin/pushover=disable (deactivate). The port is the port specified in the config file under LBH_PORT.\\  This is also possible via the UDP interface of FOSHKplugin: sending "Plugin.pushover=enable" to the IP address of the host and the port on which FOSHKplugin is running (LBU_PORT in the config file) activates the sending; "Plugin.pushover=disable" deactivates this.\\  Any errors when sending push notifications as well as activating/deactivating during runtime are logged in the standard log file.
Zeile 1231: Zeile 1246:
  
 WSDOG_RESTART > WSDOG_INTERVAL and there's still no data from weatherstation:\\  **<WARNING> weather station has not reported data for more than [count] seconds (WSDOG_INTERVAL send-intervals) - restarting** WSDOG_RESTART > WSDOG_INTERVAL and there's still no data from weatherstation:\\  **<WARNING> weather station has not reported data for more than [count] seconds (WSDOG_INTERVAL send-intervals) - restarting**
 +
 +REBOOT_WARNING = True and runtime sent by the console is equal or lower than the last runtime value:\\  **<WARNING> reboot of weather station detected ([daily count]) - last runtime: [lastvalue] current runtime: [currvalue]**
  
 after a start of FOSHKplugin and afterwards every UPD_INTERVAL seconds if there's a newer firmware available for your weatherstation:\\  **<WARNING> firmware update for [model] available - current: [current version] avail: [remote version] use the app [app name] to update!** after a start of FOSHKplugin and afterwards every UPD_INTERVAL seconds if there's a newer firmware available for your weatherstation:\\  **<WARNING> firmware update for [model] available - current: [current version] avail: [remote version] use the app [app name] to update!**
Zeile 1610: Zeile 1627:
 where ipaddress is the hostname or IP address of the system running FOSHKplugin and port is the port configured as Config\LBH_PORT. where ipaddress is the hostname or IP address of the system running FOSHKplugin and port is the port configured as Config\LBH_PORT.
  
-The string "SID = FOSHKplugin, Plugin.shutdown" must be sent via UDP to the port configured under LBU_PORT in order to terminate FOSHKplugin. It is then automatically restarted as a service by sytemd.+The string "SID = FOSHKplugin, Plugin.shutdown" must be sent via UDP to the port configured under LBU_PORT in order to terminate FOSHKplugin. It is then automatically restarted as a service by systemd.
  
 The upper and lower case is to be observed in all cases!\\  Please activate this switch only if you can ensure that no stranger has access to your FOSHKplugin installation. The upper and lower case is to be observed in all cases!\\  Please activate this switch only if you can ensure that no stranger has access to your FOSHKplugin installation.
Zeile 2648: Zeile 2665:
 WN34: wh34sigN (where N = 1..8) WN34: wh34sigN (where N = 1..8)
 WN35: wh35sigN (where N = 1..8) WN35: wh35sigN (where N = 1..8)
 +WH54: wh54sigN (where N = 1..4)
 </code> </code>
  
Zeile 3269: Zeile 3287:
  
 Again: Adjust paths if needed. Before sending data, it is a good idea to test/check the data. Use ''FWD_URL = /opt/loxberry/log/plugins/foshkplugin/'' for testing and only write the output file locally without sending (see also above). Again: Adjust paths if needed. Before sending data, it is a good idea to test/check the data. Use ''FWD_URL = /opt/loxberry/log/plugins/foshkplugin/'' for testing and only write the output file locally without sending (see also above).
 +++++
 +
 +----
 +
 +{{anchor:several}}
 +
 +++++ Why are there several versions of FOSHKplugin? |
 +
 +**Why are there several versions of FOSHKplugin?**
 +
 +There are two versions of FOSHKplugin - the [[https://foshkplugin.phantasoft.de/|LoxBerry version]] and the [[https://foshkplugin.phantasoft.de/generic|generic version]].\\
 +The LoxBerry version requires an existing [[https://wiki.loxberry.de/en/start|LoxBerry]] installation - a widely used, free add-on with many additional options in the Loxone Smarthome system environment.\\
 +You have to assess for yourself whether it is worth the effort to install and maintain a LoxBerry system just to run the LoxBerry version of FOSHKplugin on it. In general, the statement applies: without Loxone no LoxBerry and without LoxBerry no LoxBerry version of FOSHKplugin.\\
 +\\
 +The generic version of FOSHKplugin is intended for the general public. This only requires any Linux as a basis (although Debian derivatives are preferable). Documentation is available in English. Here you can install FOSHKplugin with very little effort - even on an existing Linux system.\\
 +The installation is described step by step here: [[https://foshkplugin.phantasoft.de/generic#fullinstall|Installation of FOSHKplugin generic version]]\\
 +\\
 +The code base and functionality is identical for the LoxBerry version and generic version.\\
 +The only difference is that some configuration changes in the LoxBerry version can be made via a web form. In the generic version, console access and an editor are required for [b]all[/b] configurations.\\
 +As this is also necessary for advanced configurations (e.g. forwards) in the LoxBerry version, you can also do this in general.\\
 +
 +++++
 +
 +----
 +
 +{{anchor:sunhours}}
 +
 +++++ Improved sunshine duration calculation and other solar topics |
 +
 +**Improved sunshine duration calculation and other solar topics**
 +
 +By default, FOSHKplugin checks whether the reported solar radiation value is higher than 120W/m² for the calculation of the daily sunshine duration in each transmission interval and if so, this minute is added to the sunshine duration.\\
 +A better calculation according to [[https://github.com/Jterrettaz/sunduration|Jterrettaz]] with dynamic and location-dependent thresholds (as WeeWX and WSWin also do) is available if you set Sunduration\SUN_CALC = True in the config file and (important!) also specify the geographical coordinates under Coordinates\ALT (altitude), Coordinates\LAT (latitude) and Coordinates\LON (logitude):\\
 +
 +<code syntaxhighlighter-pre>
 +[Coordinates]
 +# coordinates are only needed for calculating cloudbase and sunhours or export to Awekas-API, clientraw.txt, Weather365.net
 +ALT =                           # altitude in m e.g. 53
 +LAT =                           # latitude in decimal grad e.g. 52.668759; North of the equator has no sign. South of the equator has a - sign.
 +LON =                           # longitude in decimal grad e.g. 13.266274; for longitudes left of Greenwich a - sign is needed.
 +</code>
 +
 +Sunduration\SUN_MIN can be used to specify the solar radiation threshold above which the detection is counted as sunshine. The calculation can be tweaked with Sunduration\SUN_COEF (default=0.92): too little sunshine recorded: decrease value; too much sunshine recorded: increase the SUN_COEF value:\\
 +
 +<code syntaxhighlighter-pre>
 +[Sunduration]
 +SUN_CALC = False                # enable for better sunhours calculation (LAT, LON needed), disable to use static threshold of 120W/m²
 +SUN_MIN = 0                     # from this value (W/m²) calculation starts
 +SUN_COEF = 0.92                 # adjustment factor also depends on the location
 +SUNSHINE_HOLD = 0               # Hold time in seconds for value sunshine, this time continues to be output sunshine = True, even if there is no sunshine (default: 0)
 +</code>
 +
 +For compatibility reasons, the conventional calculation with a threshold value of 120W/m² - i.e. Sunduration\SUN_CALC = False - is the standard. The standard calculation is performed without specifying the geographical coordinates.\\
 +\\
 +FOSHKplugin outputs a few more light-specific entities, which are briefly explained here:\\
 +\\
 +last_suncheck = timestamp of the last time a sunshine check was performed\\
 +last_suntime = timestamp when sunshine was last detected\\
 +sunhours = shows the duration of daily sunshine in hours (solarradiation >= 120W/m² or - with Sunduration\SUN_CALC = True - with dynamic, location-dependent threshold value)\\
 +sunmins = shows the duration of daily sunshine in minutes (solarradiation >= 120W/m² or - with Sunduration\SUN_CALC = True - with dynamic, location-dependent threshold value)\\
 +sunshine = represents the presence of sunshine; can be artificially extended with Sunduration\SUNSHINE_HOLD to prevent constant changes\\
 +theosunsr = Theoretical sunshine limit above which sunshine would be declared\\
 +srsum = daily solar radiation sum since midnight (00:00)\\
 +\\
 +
 ++++ ++++