LoxBerry-Plugin: FOSHKplugin - Wettergateway Froggit DP1500 / Ecowitt GW1000 anbinden

Einklappen
X
 
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge
  • olicat
    MS Profi
    • 25.08.2015
    • 587

    #721
    Hi!

    Zitat von madito
    The apt file cannot find the following package: python3-influxdb-client.
    That can happen. It's possible that this package isn't available in all distributions. That said, it should certainly be available in DietPI and direct Debian derivatives.
    If the InfluxDB package can't be installed via apt, the system will fall back to install it via pip (the Python way).
    Either way, it should be possible to install it.
    What exactly is your problem? Any logs or error messages?

    Oliver

    Kommentar

    • madito
      Extension Master
      • 03.07.2017
      • 137

      #722
      Zitat von olicat
      Hi!


      That can happen. It's possible that this package isn't available in all distributions. That said, it should certainly be available in DietPI and direct Debian derivatives.
      If the InfluxDB package can't be installed via apt, the system will fall back to install it via pip (the Python way).
      Either way, it should be possible to install it.
      What exactly is your problem? Any logs or error messages?

      Oliver

      I have the latest version of DietPI and the package doesn't exist. It installs via pip, but it shows an error during plugin installation, saying it can't install it!

      Kommentar

      • olicat
        MS Profi
        • 25.08.2015
        • 587

        #723
        Hi!

        Zitat von madito
        I have the latest version of DietPI and the package doesn't exist. It installs via pip, but it shows an error during plugin installation, saying it can't install it!
        So FOSHKplugin is installed, up and running?

        I'm not sure which version of dietPi you're using. In my current Trixie installation, the package is available via apt:
        Code:
        loxberry@loxberry:~ $ cat /etc/*release*
        PRETTY_NAME="Debian GNU/Linux 13 (trixie)"
        NAME="Debian GNU/Linux"
        VERSION_ID="13"
        VERSION="13 (trixie)"
        VERSION_CODENAME=trixie
        DEBIAN_VERSION_FULL=13.6
        ID=debian
        HOME_URL="https://www.debian.org/"
        SUPPORT_URL="https://www.debian.org/support"
        BUG_REPORT_URL="https://bugs.debian.org/"
        
        loxberry@loxberry:~ $ dpkg --list|grep influxdb
        ii influxdb 1.6.7~rc0-2+b12 amd64 Scalable datastore for metrics, events, and real-time analytics
        ii influxdb-client 1.6.7~rc0-2+b12 amd64 command line interface for InfluxDB
        
        loxberry@loxberry:~ $ apt-cache search influxdb
        ethflux - InfluxDB data gatherer for ethtool-style network interface information
        golang-github-dcso-fluxline-dev - Golang library to prepare sets of metrics in InfluxDB's Line Protocol format
        golang-github-influxdata-influxdb1-client-dev - Old clientv2 for InfluxDB 1.x (library)
        golang-github-influxdata-influxql-dev - parser for the InfluxDB query language
        golang-github-influxdata-line-protocol-dev - InfluxDB line protocol implementation
        golang-github-influxdb-enterprise-client-dev - Golang client for speaking to the InfluxDB Enterprise application
        golang-github-influxdb-usage-client-dev - library for speaking to the InfluxDB Anonymous Usage Reporting API
        golang-github-influxdb-influxdb-dev - Scalable datastore for metrics, events, and real-time analytics. Dev package
        influxdb - Scalable datastore for metrics, events, and real-time analytics
        influxdb-client - command line interface for InfluxDB
        python3-influxdb - Client for InfluxDB - Python 3.x
        libinfluxdb-http-perl - Perl way to interact with InfluxDB
        libinfluxdb-lineprotocol-perl - write and read InfluxDB LineProtocol
        pcp-export-pcp2influxdb - Tool for exporting data from PCP to InfluxDB
        python3-influxdb-client - InfluxDB 2.0 Python client library
        slurm-wlm-influxdb-plugin - Slurm InfluxDB plugin
        slurm-wlm-influxdb-plugin-dev - Slurm InfluxDB plugin development files
        python3-typeshed - collection of library stubs for Python, with static types
        ​

        Oliver

        Kommentar

        • madito
          Extension Master
          • 03.07.2017
          • 137

          #724
          Zitat von olicat
          Hi!


          So FOSHKplugin is installed, up and running?

          I'm not sure which version of dietPi you're using. In my current Trixie installation, the package is available via apt:
          Code:
          loxberry@loxberry:~ $ cat /etc/*release*
          PRETTY_NAME="Debian GNU/Linux 13 (trixie)"
          NAME="Debian GNU/Linux"
          VERSION_ID="13"
          VERSION="13 (trixie)"
          VERSION_CODENAME=trixie
          DEBIAN_VERSION_FULL=13.6
          ID=debian
          HOME_URL="https://www.debian.org/"
          SUPPORT_URL="https://www.debian.org/support"
          BUG_REPORT_URL="https://bugs.debian.org/"
          
          loxberry@loxberry:~ $ dpkg --list|grep influxdb
          ii influxdb 1.6.7~rc0-2+b12 amd64 Scalable datastore for metrics, events, and real-time analytics
          ii influxdb-client 1.6.7~rc0-2+b12 amd64 command line interface for InfluxDB
          
          loxberry@loxberry:~ $ apt-cache search influxdb
          ethflux - InfluxDB data gatherer for ethtool-style network interface information
          golang-github-dcso-fluxline-dev - Golang library to prepare sets of metrics in InfluxDB's Line Protocol format
          golang-github-influxdata-influxdb1-client-dev - Old clientv2 for InfluxDB 1.x (library)
          golang-github-influxdata-influxql-dev - parser for the InfluxDB query language
          golang-github-influxdata-line-protocol-dev - InfluxDB line protocol implementation
          golang-github-influxdb-enterprise-client-dev - Golang client for speaking to the InfluxDB Enterprise application
          golang-github-influxdb-usage-client-dev - library for speaking to the InfluxDB Anonymous Usage Reporting API
          golang-github-influxdb-influxdb-dev - Scalable datastore for metrics, events, and real-time analytics. Dev package
          influxdb - Scalable datastore for metrics, events, and real-time analytics
          influxdb-client - command line interface for InfluxDB
          python3-influxdb - Client for InfluxDB - Python 3.x
          libinfluxdb-http-perl - Perl way to interact with InfluxDB
          libinfluxdb-lineprotocol-perl - write and read InfluxDB LineProtocol
          pcp-export-pcp2influxdb - Tool for exporting data from PCP to InfluxDB
          python3-influxdb-client - InfluxDB 2.0 Python client library
          slurm-wlm-influxdb-plugin - Slurm InfluxDB plugin
          slurm-wlm-influxdb-plugin-dev - Slurm InfluxDB plugin development files
          python3-typeshed - collection of library stubs for Python, with static types
          Oliver
          You're absolutely right, I had updated DietPI but not the Debian version (although when I updated Loxberry, I thought I had).

          The plugin in version 12 works, although it gives the APT error.

          Thank you very much.
          Zuletzt geändert von madito; 05.09.2026, 17:56.

          Kommentar

          • Centauri
            Azubi
            • 04.04.2019
            • 3

            #725
            After upgrading my LoxBerry/DietPi system to Debian 12, FOSHKplugin forwards using Python requests instead of the previous urllib3 behaviour. My hosting provider/WAF blocks the default python-requests/... User-Agent with HTTP 403 “Request forbidden by administrative rules”.

            The exact same Ecowitt POST returns HTTP 200 when I set a custom User-Agent such as FOSHKplugin/0.10.

            I noticed FOSHKplugin already supports USER_AGENT in [Config], and several HTTP functions use it. Would it make sense to ship a default application-specific User-Agent like FOSHKplugin/<version> instead of leaving it empty? That would avoid generic python-requests blocking on some hosting/WAF setups.

            USER_AGENT = FOSHKplugin/0.10

            Kommentar

            • olicat
              MS Profi
              • 25.08.2015
              • 587

              #726
              Hi!

              Zitat von Centauri
              Would it make sense to ship a default application-specific User-Agent like FOSHKplugin/ instead of leaving it empty?
              If you do not set a specific user-agent, Python's "requests" library's default user-agent is used. It has always been this way.
              Up until now, I had assumed that the "requests" library was better known (and therefore perhaps also had a better reputation) than FOSHKplugin. That is why I had left the setting as it is.
              However, it is now possible to set any user-agent you like.
              Setting the agent to “FOSHKplugin” by default might just happen to work in your specific case. But who knows which web providers allow or block which agents, and when?
              I'm not sure whether FOSHKplugin is the better choice compared to "requests".
              I'll keep an eye on this.
              I’d be interested to hear the provider’s reasoning on this.

              Apart from that, I've published an FAQ/recipe on this topic.



              Und nochmal auf Deutsch für die anderen Mitleser ...
              Wenn man keinen speziellen User-Agent setzt wird der default-User-Agent der requests-Library von Python übernommen. Das war schon immer so.
              Ich ging bisher davon aus, dass die requests-Bibliothek einen höheren Bekanntheitsgrad (und somit vielleicht auch eine bessere Reputation) hat als FOSHKplugin. Daher ließ ich es bisher bei dieser Einstellung.
              Hinzugekommen ist jedoch die Möglichkeit, einen beliebigen Agent zu setzen.
              Den Agent per default auf "FOSHKplugin" festzulegen funktioniert vielleicht zufällig in Deinem konkreten Fall. Aber wer weiss schon, welcher Web-Anbieter wann welche Agents erlaubt oder verbietet?
              Ich bin mir nicht sicher, ob FOSHKplugin die bessere Wahl gegenüber requests ist.
              Ich werde das beobachten.
              Mich würde dazu mal die Argumentation des Providers interessieren.

              Davon abgesehen habe ich zu diesem Thema auch ein FAQ/Rezept veröffentlicht.

              Oliver
              Zuletzt geändert von olicat; 01.10.2026, 17:28.

              Kommentar

              • Prof.Mobilux
                Supermoderator
                • 25.08.2015
                • 5675

                #727
                Hi,

                ich habe auf meine LoxBerry (Debian 12.5 / DietPi) auch das Problem, dass apt das Paket python3-influxdb-client nicht findet. Außerdem wirft die WebUI einen HTTP Error 500 "Internal Server Error".

                FOSHKplugin läuft aber.
                Zuletzt geändert von Prof.Mobilux; In den letzten 4 Wochen.
                Meine Projekte:
                LoxBerry: https://wiki.loxberry.de
                SmartFleet Flottenmanagement: https://smartfleetmanager.de (Diskussion)
                WeatherLox Wetterstation: https://weatherlox.de (Diskussion)​

                Kommentar

                • Prof.Mobilux
                  Supermoderator
                  • 25.08.2015
                  • 5675

                  #728
                  Hi,

                  ich habe noch einen kleinen Fehler im FOSHKplugin gefunden (LoxBerry-Plugin, v0.10 Beta 260904).

                  Meine Wetterstation (ESP32 mit ESPEasy) sendet im Ecowitt-Format per POST an /data/report/. ESPEasy kodiert dateutc mit kleingeschriebenen Hex-Ziffern, also dateutc=2026-10-21%2009%3a38%3a08. FOSHKplugin ersetzt aber nur %3A (groß), dann scheitert strptime und do_POST bricht ab, bevor eine Antwort gesendet wird:

                  Code:
                  File "foshkplugin.py", line 7624, in do_POST
                      d_m = convertDictToMetricDict(d_e,IGNORE_EMPTY,LOX_TIME)
                  File "foshkplugin.py", line 1226, in convertDictToMetricDict
                      d_m.update({"loxtime" : str(loxTime(utcToLocal(time.mktime(time.strptime(zeit, "%Y-%m-%d+%H:%M:%S")))))})
                  ValueError: time data '2026-10-21+09%3a38%3a08' does not match format '%Y-%m-%d+%H:%M:%S'
                  Folgen:
                  • Der Sender bekommt keine Antwort (leere Antwort, Verbindung geschlossen) und wiederholt das Paket. Bei mir kamen dadurch rund 10 Kopien je Sendezyklus an.
                  • Die Daten werden trotzdem ins Raw-Log geschrieben, deshalb fällt es nicht sofort auf.

                  Groß- und Kleinschreibung sind bei der Prozent-Kodierung gleichwertig (RFC 3986, Abschnitt 2.1), %3a ist also gültig. Im Code steht replace("%3A",":") an 15 Stellen. Vorschlag: dort auch %3a ersetzen oder gleich urllib.parse.unquote verwenden. Schön wäre außerdem, wenn do_POST auch bei einem Fehler in der Verarbeitung noch mit 200 antwortet, damit der Sender nicht wiederholt.

                  Als Umgehung habe ich LOX_TIME = False gesetzt, seitdem läuft es sauber.

                  Viele Grüße
                  Michael
                  Meine Projekte:
                  LoxBerry: https://wiki.loxberry.de
                  SmartFleet Flottenmanagement: https://smartfleetmanager.de (Diskussion)
                  WeatherLox Wetterstation: https://weatherlox.de (Diskussion)​

                  Kommentar


                  • olicat
                    olicat kommentierte
                    Kommentar bearbeiten
                    "Fehler" wuerde ich es nicht nennen - FOSHKplugin ist ein reverse-engineering-Projekt und die bisherigen Geraete sendeten eben (wenn ueberhaupt) nur 3A bzw. 20. Mit der naechsten Version wird jedoch tatsaechlich unquote genutzt - das erspart mir die 3a-Ausnahme und ist sicher(er) fuer zukuenftige Aenderungen. Danke!
                • SehlingS
                  Smart Home'r
                  • 19.12.2016
                  • 98

                  #729
                  Hi zusammen,

                  gibt es eigentlich ne Möglichkeit die Weiterleitung per UDP zum Miniserver zu deaktivieren und nur auf MQTT zu setzen?
                  Einfach den Port leer lassen?

                  Grüße
                  Sascha

                  Kommentar

                  • olicat
                    MS Profi
                    • 25.08.2015
                    • 587

                    #730
                    Hi!

                    gibt es eigentlich ne Möglichkeit die Weiterleitung per UDP zum Miniserver zu deaktivieren und nur auf MQTT zu setzen?
                    ja, gibt es.
                    Im foshkplugin.conf unter [Config] UDP_ENABLE = False setzen.

                    Aber:
                    Es gibt verschiedene Steuerungsmoeglichkeiten via UDP (VirtualOuts) die es so unter MQTT nicht gibt.

                    Oliver

                    Kommentar

                    Lädt...