Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. Oekofen JSON Influx Datenpunkte abholen

    NEWS

    • Wir empfehlen: Node.js 22.x

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker goes Matter ... Matter Adapter in Stable

    Oekofen JSON Influx Datenpunkte abholen

    This topic has been deleted. Only users with topic management privileges can see it.
    • redjudge
      redjudge last edited by

      Guten Abend,

      mit der Bitte um Hilfe wende ich mich an das Forum.

      Situation:
      Neue Heizung von Oekofen, benötige Daten aus dieser für die Steuerung Akku und Solarertrag im Haus.

      Möglichkeit 1:
      Abfrage per JSON direkt an die Heizung per http://IP:4321/password/all?
      -> Antwort ist ein Array? mit {..{...}..}

      Möglichkeit 2:
      Diese JSON Abfrage gibt es als Adapter:
      Oekofen JSON @ GitHub, schreibt dann alle Werte des Array als Datenpunkte in IoBroker.

      Möglichkeit 3:
      Ein Oekofen-Spy @ GitLab, fragt mittels Python3 ab und schreibt direkt in eine Influx-Datenbank. (Visualisierung per Grafana sehr schön, aber nebensächlich)

      Möglichkeit 2 wäre für mich die smarteste, jedoch verweigert die Heizung regelmäßig die Verbindung mit ConnectionRefused, Terminate yourself. Dann geht die Instanz aus, Neustart per Script schon probiert, hilft nur sporadisch, es läuft nicht zuverlässig. (Ich vermute, alle APP-Anfrage und auch die Oekofen-Verbindung zum Werk laufen auch per JSON - und irgendwann ist es zuviel.)
      Möglichkeit 3 habe ich jetzt paar Tage ausgetestet, geht recht zuverlässig, wenn mal 1-2h keine Daten abgerufen werden konnten, sehe ich es in Grafana, das Python-Script läuft aber per Crontab zuverlässig alle 4 Minuten weiter.

      Problem / Fragestellung
      Ich benötige viele der Daten im Iobroker, um die Steuerlogik zuverlässig laufen zu lassen und per JSON (http://IP:4321/password/pe1.mode=X) Teile der Heizung zu steuern.
      Möglichkeit 2 ist nicht zuverlässig. Möglichkeit 1 scheitert an meinem Unvermögen das Result des JSON Script zuverlässig in die Datenpunkte schreiben zu lassen. Möglichkeit 3 scheitert an meinem Unvermögen die Daten aus der Datenbank in Datenpunkte im iobroker zu holen.

      Aufbau der Datenbank bei Oekofen-spy

      > show measurements
      oekofen
      
      
      > show series
      key
      ---
      oekofen,bereich=circ1
      oekofen,bereich=forecast
      oekofen,bereich=hk1
      oekofen,bereich=hk2
      oekofen,bereich=pe1
      oekofen,bereich=power
      oekofen,bereich=pu1
      oekofen,bereich=sk1
      oekofen,bereich=sk2
      oekofen,bereich=stirling
      oekofen,bereich=system
      oekofen,bereich=weather
      oekofen,bereich=ww1
      
      
      > show tag keys
      name: oekofen
      tagKey
      ------
      bereich
      
      
      > show field keys
      name: oekofen
      fieldKey                   fieldType
      --------                   ---------
      circ1_L_pummp              float
      circ1_L_release_temp       float
      circ1_L_ret_temp           float
      circ1_mode                 integer
      circ1_name                 string
      circ1_pump_release         float
      circ1_return_set           float
      circ1_time_prg             integer
      forecast_L_w_0             string
      forecast_L_w_1             string
      forecast_L_w_10            string
      forecast_L_w_11            string
      forecast_L_w_12            string
      forecast_L_w_13            string
      forecast_L_w_14            string
      forecast_L_w_15            string
      forecast_L_w_16            string
      forecast_L_w_17            string
      forecast_L_w_18            string
      forecast_L_w_19            string
      forecast_L_w_2             string
      forecast_L_w_20            string
      forecast_L_w_21            string
      forecast_L_w_22            string
      forecast_L_w_23            string
      forecast_L_w_24            string
      forecast_L_w_3             string
      forecast_L_w_4             string
      forecast_L_w_5             string
      forecast_L_w_6             string
      forecast_L_w_7             string
      forecast_L_w_8             string
      forecast_L_w_9             string
      hk1_L_comfort              float
      hk1_L_flowtemp_act         float
      hk1_L_flowtemp_set         float
      hk1_L_pump                 float
      hk1_L_roomtemp_act         float
      hk1_L_roomtemp_set         float
      hk1_L_state                integer
      hk1_L_statetext            string
      hk1_autocomfort            float
      hk1_autocomfort_sunrise    float
      hk1_autocomfort_sunset     float
      hk1_mode_auto              integer
      hk1_name                   string
      hk1_oekomode               integer
      hk1_remote_override        float
      hk1_temp_heat              float
      hk1_temp_setback           float
      hk1_temp_vacation          float
      hk1_time_prg               integer
      hk2_L_comfort              float
      hk2_L_flowtemp_act         float
      hk2_L_flowtemp_set         float
      hk2_L_pump                 float
      hk2_L_roomtemp_act         float
      hk2_L_roomtemp_set         float
      hk2_L_state                integer
      hk2_L_statetext            string
      hk2_autocomfort            float
      hk2_autocomfort_sunrise    float
      hk2_autocomfort_sunset     float
      hk2_mode_auto              integer
      hk2_name                   string
      hk2_oekomode               integer
      hk2_remote_override        float
      hk2_temp_heat              float
      hk2_temp_setback           float
      hk2_temp_vacation          float
      hk2_time_prg               integer
      pe1_L_ak                   float
      pe1_L_avg_runtime          float
      pe1_L_br                   float
      pe1_L_currentairflow       float
      pe1_L_ext_temp             float
      pe1_L_fluegas              float
      pe1_L_frt_temp_act         float
      pe1_L_frt_temp_end         float
      pe1_L_frt_temp_set         float
      pe1_L_lowpressure          float
      pe1_L_lowpressure_set      float
      pe1_L_modulation           float
      pe1_L_not                  float
      pe1_L_resttimeburner       float
      pe1_L_runtime              float
      pe1_L_runtimeburner        float
      pe1_L_starts               float
      pe1_L_state                integer
      pe1_L_statetext            string
      pe1_L_stb                  float
      pe1_L_storage_fill         float
      pe1_L_storage_max          float
      pe1_L_storage_min          float
      pe1_L_storage_popper       float
      pe1_L_temp_act             float
      pe1_L_temp_set             float
      pe1_L_type                 float
      pe1_L_uw                   float
      pe1_L_uw_release           float
      pe1_L_uw_speed             float
      pe1_mode                   integer
      pe1_storage_fill_today     float
      pe1_storage_fill_yesterday float
      power_L_batt_chg           float
      power_L_batt_enabled       float
      power_L_batt_in            float
      power_L_batt_out           float
      power_L_from_grid          float
      power_L_offset             float
      power_L_output_mode        integer
      power_L_p1                 float
      power_L_p2                 float
      power_L_p3                 float
      power_L_power2car          float
      power_L_pv_1               float
      power_L_pv_2               float
      power_L_pv_total           float
      power_L_pwr_out            float
      power_L_pwr_out_per        float
      power_L_range              float
      power_L_state              integer
      power_L_to_grid            float
      power_L_today_batt_in      float
      power_L_today_batt_out     float
      power_L_today_in           float
      power_L_today_out          float
      power_L_today_total        float
      power_L_total              float
      power_L_total_car          float
      power_L_total_in           float
      power_L_total_out          float
      power_L_total_pv           float
      power_L_total_tyristor     float
      power_L_usage              float
      power_L_yesterday          float
      power_L_yesterday_batt_in  float
      power_L_yesterday_batt_out float
      power_L_yesterday_car      float
      power_L_yesterday_in       float
      power_L_yesterday_out      float
      power_L_yesterday_pv       float
      power_L_yesterday_tyristor float
      power_offtemp              float
      pu1_L_pump                 float
      pu1_L_pump_release         float
      pu1_L_state                integer
      pu1_L_statetext            string
      pu1_L_tpm_act              float
      pu1_L_tpm_set              float
      pu1_L_tpo_act              float
      pu1_L_tpo_set              float
      pu1_ext_mintemp_off        float
      pu1_ext_mintemp_on         float
      pu1_mintemp_off            float
      pu1_mintemp_on             float
      sk1_L_koll_temp            float
      sk1_L_pump                 float
      sk1_L_spu                  float
      sk1_L_state                integer
      sk1_L_statetext            string
      sk1_cooling                float
      sk1_mode                   integer
      sk1_name                   string
      sk1_spu_max                float
      sk2_L_koll_temp            float
      sk2_L_pump                 float
      sk2_L_spu                  float
      sk2_L_state                integer
      sk2_L_statetext            string
      sk2_cooling                float
      sk2_mode                   integer
      sk2_name                   string
      sk2_spu_max                float
      stirling_L_current         float
      stirling_L_error           float
      stirling_L_flow            float
      stirling_L_frequency       float
      stirling_L_phase           float
      stirling_L_power           float
      stirling_L_power_today     float
      stirling_L_power_totals    float
      stirling_L_power_yesterday float
      stirling_L_runtime         float
      stirling_L_safety_shutdown float
      stirling_L_source          float
      stirling_L_st_req          float
      stirling_L_start           float
      stirling_L_state           integer
      stirling_L_temp_1          float
      stirling_L_temp_2          float
      stirling_L_temp_amb        float
      stirling_L_temp_diff       float
      stirling_L_temp_flow       float
      stirling_L_temp_ret        float
      stirling_L_voltage         float
      system_L_ambient           float
      system_L_errors            float
      system_L_existing_boiler   float
      system_L_usb_stick         float
      weather_L_clouds           float
      weather_L_endtime          float
      weather_L_forecast_clouds  float
      weather_L_forecast_temp    float
      weather_L_forecast_today   float
      weather_L_location         string
      weather_L_source           string
      weather_L_starttime        float
      weather_L_temp             float
      weather_cloud_limit        float
      weather_hysteresys         float
      weather_lead               float
      weather_oekomode           integer
      weather_offtemp            float
      weather_refresh            float
      ww1_L_offtemp_act          float
      ww1_L_ontemp_act           float
      ww1_L_pump                 float
      ww1_L_state                integer
      ww1_L_statetext            string
      ww1_L_temp_set             float
      ww1_heat_once              float
      ww1_mode_auto              integer
      ww1_mode_dhw               integer
      ww1_name                   string
      ww1_oekomode               integer
      ww1_sensor_off             float
      ww1_sensor_on              float
      ww1_smartstart             float
      ww1_temp_max_set           float
      ww1_temp_min_set           float
      ww1_time_prg               integer
      ww1_use_boiler_heat        float
      

      Die Custom queries beim ioBroker.influxdb habe ich gefunden, verstehe es aber nicht, async etc.
      Bitte um Schubser, ich stehe gerade völlig auf dem Schlauch.

      Vielen Dank

      PS: Hier im Forum gelesen.

      mickym 1 Reply Last reply Reply Quote 0
      • mickym
        mickym Most Active @redjudge last edited by

        @redjudge Für Möglichkeit 1 könnte ich Dir sehr schnell einen NodeRed Flow zur Verfügung stellen.

        redjudge 1 Reply Last reply Reply Quote 0
        • redjudge
          redjudge @mickym last edited by

          @mickym
          Müsste ich noch etwas neues lernen.
          Funktioniert das dann auch, wenn die Heizung mal wieder eine JSON Abfrage verweigert?
          Die Datenpunkte kann ich ja selbst in Influx “sichern / schreiben”.

          Bin aber für jede Hilfe sehr dankbar, auch wenn ich Version 3 favorisieren würde.

          Schönen Samstag

          mickym L 2 Replies Last reply Reply Quote 0
          • mickym
            mickym Most Active @redjudge last edited by

            @redjudge na gut, dann solltest Du Dich vielleicht erst mal um die Lösung 3 kümmern, wenn du diese favorisierst. Da kann ich Dir leider nicht helfen und um die Lösung 1 kümmern wir uns erst, wenn das nicht klappt.

            1 Reply Last reply Reply Quote 0
            • L
              looxer01 @redjudge last edited by looxer01

              @redjudge
              Hi,
              Ich habe ebenfalls eine Oekofen seit 2013. Seither frage ich jede Sekunde Daten über Modbus ab.
              Das funktioniert über mehr als 4 upgrades der Touch Bedienung. Die ist jetzt auf Stand V.4.00b.
              Die Adressen der Holdingregister, die du für Modbus brauchst haben sich nie geändert.
              Das wäre also option 4. Kann dir auch mal die Einstellungen senden wenn es in Frage kommt.

              Da ich mal vor hatte den Adapter zu nutzen habe ich den ebenfalls installiert. Die Anzahl der gelieferten Datenpunkte ist bedeutend höher.
              Da habe ich ein Polinterval von 30 sekunden eingestellt Das reicht mir allerdings nicht für die Berechnung des Pelletsverbrauchs.
              Also habe ich beides im Einsatz.

              Das du Daten nur in sehr langen Intervallen abrufen kannst scheint mir nicht normal. Natürlich kenne ich die neuen Anlagen nicht aber so prinzipiell würde es mich wundern, dass es bei einer so alten Anlage wie meiner ohne Probleme funktioniert und bei einer neueren mit verbesserten Prozessoren nicht. Kontakt mit Oekofen hilft vielleicht. Ich hatte damals auch mit der Entwicklung dort gesprochen.

              vG Looxer

              redjudge 1 Reply Last reply Reply Quote 0
              • redjudge
                redjudge @looxer01 last edited by redjudge

                Guten Morgen oder Hallo,

                vielen Dank für den Hinweis. Hatte ich auch schon gesehen, hieß aber immer JSON soll Modbus bei Oekofen ablösen.

                ModBus register @ oekofen.com

                Versuche das nachher mal, Link zur Registerversion 2.08., was neueres habe ich auf die Schnelle nicht gefunden.
                Dokumentiere hier auch auf jeden Fall weiter, jeder andere der es eventuell sucht wird sich freuen.

                EDIT: Stirling geht nicht mit Modbus Register 2.08, hat jemand was neueres?

                1 Reply Last reply Reply Quote 0
                • redjudge
                  redjudge last edited by redjudge

                  So, immerhin hab ich jetzt mal eine Antwort aus der Datenbank:

                  
                  var end = new Date().getTime();
                  var ergebnis ='';
                  sendTo('influxdb.1', 'query', 'SELECT * FROM "oekofen" LIMIT 1', function (result) {
                      if (result.error) {
                          console.error(result.error);
                      } else {
                          // show result
                           console.log('Rows: ' + JSON.stringify(result.result[0]));
                      }
                  });
                  
                  setTimeout(function(){ res = JSON.stringify(ergebnis); },5000);
                  return 0;
                  
                  

                  Ergebnis:

                  Rows: "bereich":"circ1","circ1_L_pummp":0,"circ1_L_release_temp":55.1,"circ1_L_ret_temp":28.6,"circ1_mode":1,"circ1_name":"Zirkulation","circ1_pump_release":450,"circ1_return_set":270,"circ1_time_prg":0,"forecast_L_w_0":null,"forecast_L_w_1":null,"forecast_L_w_10":null,"forecast_L_w_11":null,"forecast_L_w_12":null,"forecast_L_w_13":null,"forecast_L_w_14":null,"forecast_L_w_15":null,"forecast_L_w_16":null,"forecast_L_w_17":null,"forecast_L_w_18":null,"forecast_L_w_19":null,"forecast_L_w_2":null,"forecast_L_w_20":null,"forecast_L_w_21":null,"forecast_L_w_22":null,"forecast_L_w_23":null,"forecast_L_w_24":null,"forecast_L_w_3":null,"forecast_L_w_4":null,"forecast_L_w_5":null,"forecast_L_w_6":null,"forecast_L_w_7":null,"forecast_L_w_8":null,"forecast_L_w_9":null,"hk1_L_comfort":null,"hk1_L_flowtemp_act":null,"hk1_L_flowtemp_set":null,"hk1_L_pump":null,"hk1_L_roomtemp_act":null,"hk1_L_roomtemp_set":null,"hk1_L_state":null,"hk1_L_statetext":null,"hk1_autocomfort":null,"hk1_autocomfort_sunrise":null,"hk1_autocomfort_sunset":null,"hk1_mode_auto":null,"hk1_name":null,"hk1_oekomode":null,"hk1_remote_override":null,"hk1_temp_heat":null,"hk1_temp_setback":null,"hk1_temp_vacation":null,"hk1_time_prg":null,"hk2_L_comfort":null,"hk2_L_flowtemp_act":null, und so weiter
                  

                  Leider sind nicht alle Werte befüllt und ich habe noch keinen Datenpunkt geschrieben.
                  Auf was habe ich mich da eingelassen.
                  Mail an Oekofen habe ich geschrieben, mal schauen was die zu den JSON-Abfragen sagen.

                  1 Reply Last reply Reply Quote 0
                  • redjudge
                    redjudge last edited by

                    Guten Abend,

                    nach Kontakt mit Oekofen:
                    Den Fehler Connection refused kennt/kann die Heizung nicht, nur wait 2500ms between request. Also kann man alle 2,5 sec abfragen, braucht ja aber keiner.
                    Muss mein Netzwerk prüfen ob es daher kommt.

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post

                    Support us

                    ioBroker
                    Community Adapters
                    Donate

                    826
                    Online

                    32.0k
                    Users

                    80.5k
                    Topics

                    1.3m
                    Posts

                    3
                    8
                    498
                    Loading More Posts
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes
                    Reply
                    • Reply as topic
                    Log in to reply
                    Community
                    Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
                    The ioBroker Community 2014-2023
                    logo