Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Tester
    4. Test Adapter Daikin-Cloud 0.4.0

    NEWS

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    Test Adapter Daikin-Cloud 0.4.0

    This topic has been deleted. Only users with topic management privileges can see it.
    • Armilar
      Armilar Most Active Forum Testing @Lemmi last edited by Armilar

      @lemmi

      Ist so 'ne Zeitsache aktuell 😉

      Also es gibt zwei Skripte, die wir mit Bereitstellung der RAW-Daten zusammengestrickt haben. Nach den Posts hier wären aber beide anscheinend nicht vollständig.

      Das erste wäre ein Blockly, dass bei meiner Altherma wunderbar funktioniert. Es verarbeitet allerdings keine "cooling"-Energy-Daten, sondern nur "heating" und müsste diesbezgl. auf "cooling", sofern genutzt erweitert werden.

      Also wenn ihr das zunächst schon nutzen wollt, dann nur die Onnecta-UUID im Script austauschen und Skript einschalten. Danach habet ihr einen Ordner in 0_userdata mit den Energiedaten.

      aa8613fc-9a43-4433-a31f-2622b2c24467-image.png

      https://raw.githubusercontent.com/Armilar/ioBroker-Scripte/refs/heads/main/Blockly/Daikin Altherma ioBroker


      Das zweite Skript ist hier: (von Volker88)

      https://gist.github.com/Volker88/59a14f8d614db33f163452fb56469e01

      Ist aus meiner Sicht eher für Klimaanlagen geeignet, da es nicht in die einzelnen Komponenten einer Wärmepumpe, z.B. climateControlMainZone, domesticHotWaterTank, etc. aufteilt, berücksichtigt allerdings "cooling"


      Eigentlich müssten die Logiken zusammengefasst werden, um es allgemeingültig für den Adapter zu haben... 😊

      L K 2 Replies Last reply Reply Quote 0
      • L
        Lemmi @Armilar last edited by

        @armilar
        Erstmal vielen Dank für die Einstellung der Skripte. Mal sehen ob Appollon das irgendwie verwerten kann und was allgemeines daraus zaubert. Ansonsten werde ich ( leider kein Crack was Spripte angeht ) mich daran versuchen und schauen ob ich da was für mich hinbekomme.

        Armilar 1 Reply Last reply Reply Quote 0
        • Armilar
          Armilar Most Active Forum Testing @Lemmi last edited by Armilar

          @lemmi

          bei den Daten von @Kredar dürfte das Blockly mit dem Tausch der UUID bereits funktionieren. Die "cooling" Daten stehen eh soweit ich das sehe auf "0"

          Bei deinem DP-Auszug fehlen die Infos um das beurteilen zu können...

          Würde das heutzutage aber eh etwas eleganter lösen... Wenn ein wenig mehr Zeit, dann sehe ich mir das nochmal an...

          L 1 Reply Last reply Reply Quote 0
          • L
            Lemmi @Armilar last edited by

            @Armilar
            Die DP aus meiner Antwort an @Kredar sind nur ein Screenshot aus den DP von Kredar um Ihm zu zeigen, das die Werte vorhanden sind aber nur nicht so richtig brauchbar.

            Armilar 1 Reply Last reply Reply Quote 0
            • K
              Kredar @Armilar last edited by Kredar

              @armilar

              Danke für das Blocky. Habe es gleich mal getestet aber es legt bei mir unter 0_userdata keine Datenbank an wie bei dir auf dem ersten Screenshot.

              Habe meine UUID eingetragen bei dem Blocky unter Oneta_UUID (die lange Zeichenkette beim Cloud-Adapter ohne daikin-cloud.0. davor.

              Wenn ich das Blocky startet kommt keine Fehlermeldung aber auch kein Eintrag bei 0_Userdata.

              Muss ich da noch mehr anpassen auf meine Wärmepumpe? Bei den Javascript-Einträgen (die vier Lila Zeilen ganz oben) habe ich nichts geändert.

              Edit: Jetzt sind die Zeilen da, dauerte bei mir 20min. 🙂 Danke mal schauen was da so kommt ;). Und es kommen Daten wie bei deinem Screenshot :D. Vielen Dank für das Blocky das langt mir, Kühlen tue ich eh mit der Wärmepumpe nicht dafür habe ich die Klimaaanlage (auch von Daikin 😉 ).

              mfg

              1 Reply Last reply Reply Quote 1
              • Armilar
                Armilar Most Active Forum Testing @Lemmi last edited by Armilar

                @lemmi

                Hallo zusammen,

                habe mal ein wenig Zeit gefunden, um das Skript auf alle Device-Typen und Adapterinstanzen anzupassen.

                TypeScript anlegen. Inhalt reinwerfen. Sollte nichts angepasst werden müssen. Skript starten...

                Die Daten für jedes Daikin-Device in der Onnecta-App (Klima, Wärmepumpe, heating, cooling, Total, etc.) werden unter 0_userdata.0.daikin-cloud.... angelegt.

                @apollon77 - evtl. kann man das in den Adapter schreddern...

                /* TypeScript (TS) @Armilar
                 *
                 * This Script will read the consumption Data from Daikin-Cloud adapter and transform the raw data into individual data points similar to how it's shown in the Daikin Onecta App.
                 * It will also sum up the historic consumption from the current and previous year and update the total consumption meter going forward.
                 * 
                 * The data is created in the following path analogous to the daikin cloud data
                 * 0_userdata.0.daikin-cloud.0...
                 * 
                 * Createtd: 14.11.2024
                 */
                
                // Log-Mode
                const logMode: any = 'info'; // 'info' or 'debug'
                // Path in 0_userdata
                const mainPath: string = '0_userdata.0.';
                // Onnecta hours (if d-raw)
                const hourly: Array<string>  = ["00:00 - 02:00", "02:00 - 04:00", "04:00 - 06:00", "06:00 - 08:00", "08:00 - 10:00", "10:00 - 12:00", "12:00 - 14:00", "14:00 - 16:00", "16:00 - 18:00", "18:00 - 20:00", "20:00 - 22:00", "22:00 - 24:00"];
                // Onnecta weekdays (if w-raw)
                const daily: Array<string>   = ["01_Monday", "02_Tuesday", "03_Wednesday", "04_Thursday", "05_Friday", "06_Saturday", "07_Sunday"];
                // Onnecta months  (if m-raw)
                const monthly: Array<string> = ["01_Januray", "02_February", "03_March", "04_April", "05_May", "06_June", "07_July", "08_August", "09_September", "10_October", "11_November", "12_December"];
                
                let devices: string[] = getDeviceNames("daikin-cloud.");
                
                function setOrCreateState(id: string, value: any, forceCreation: boolean = true, common: Partial<iobJS.StateCommon> = {}, callback?: iobJS.SetStateCallback): void {
                    if (!existsState(id)) {
                        createState(id, value, forceCreation, common, callback);
                    } else {
                        setState(id, value, true);
                    }
                }
                
                // Get Daikin Device Names
                function getDeviceNames(vAdapterInstance: string): string[] {
                    let devices = [];
                    $(vAdapterInstance + '*raw').each(function (id) {
                        if (devices.indexOf(id) == -1) {
                            devices.push(id);
                        }
                    });
                    return devices;
                }
                
                async function writeConsumtionData(path: string, rawType: string, rawData: number[]): Promise<void> {
                    log(rawType + ' - ' + rawData, logMode);
                    let total: number = 0;
                    switch (rawType) {
                	case "d-raw":
                            for (let j = 0; j < 12; j++) {
                                let dpName = "Yesterday." + hourly[j];
                                setOrCreateState(mainPath + path + dpName, rawData[j], true, {type: 'number', name: hourly[j], role: 'value.power', unit: 'kWh'});
                                log(mainPath + path + dpName + ': ' + rawData[j], logMode);
                                total = total + rawData[j];
                            }
                            setOrCreateState(mainPath + path + 'Total.Yesterday', total, true, {type: 'number', name: 'Yesterday', role: 'value.power',unit: 'kWh'});
                            total = 0;
                            for (let j = 12; j < 24; j++) {
                                let dpName = "Today." + hourly[j-12];
                                setOrCreateState(mainPath + path + dpName, rawData[j], true, {type: 'number', name: hourly[j-12], role: 'value.power', unit: 'kWh'});
                                log(mainPath + path + dpName + ': ' + rawData[j], logMode);
                                total = total + rawData[j];
                            }
                            setOrCreateState(mainPath + path + 'Total.Today', total, true, {type: 'number', name: 'Today', role: 'value.power',unit: 'kWh'});
                            break;
                	case "w-raw":
                            for (let j = 0; j < 7; j++) {
                                let dpName = "LastWeek." + daily[j];
                                setOrCreateState(mainPath + path + dpName, rawData[j], true, {type: 'number', name: daily[j], role: 'value.power', unit: 'kWh'});
                                log(mainPath + path + dpName + ': ' + rawData[j], logMode);
                                total = total + rawData[j];
                            }
                            setOrCreateState(mainPath + path + 'Total.LastWeek', total, true, {type: 'number', name: 'LastWeek', role: 'value.power',unit: 'kWh'});
                            total = 0;
                            for (let j = 7; j < 14; j++) {
                                let dpName = "ThisWeek." + daily[j-7];
                                setOrCreateState(mainPath + path + dpName, rawData[j], true, {type: 'number', name: daily[j-7], role: 'value.power', unit: 'kWh'});
                                log(mainPath + path + dpName + ': ' + rawData[j], logMode);
                                total = total + rawData[j];
                            }
                            setOrCreateState(mainPath + path + 'Total.ThisWeek', total, true, {type: 'number', name: 'ThisWeek', role: 'value.power',unit: 'kWh'});
                            break;
                	case "m-raw":
                            for (let j = 0; j < 12; j++) {
                                let dpName = "LastYear." + monthly[j];
                                setOrCreateState(mainPath + path + dpName, rawData[j], true, {type: 'number', name: monthly[j], role: 'value.power', unit: 'kWh'});
                                log(mainPath + path + dpName + ': ' + rawData[j], logMode);
                                total = total + rawData[j];
                            }
                            setOrCreateState(mainPath + path + 'Total.LastYear', total, true, {type: 'number', name: 'LastYear', role: 'value.power',unit: 'kWh'});
                            total = 0;
                            for (let j = 12; j < 24; j++) {
                                let dpName = "ThisYear." + monthly[j-12];
                                setOrCreateState(mainPath + path + dpName, rawData[j], true, {type: 'number', name: monthly[j-12], role: 'value.power', unit: 'kWh'});
                                log(mainPath + path + dpName + ': ' + rawData[j], logMode);
                                total = total + rawData[j];
                            }
                            setOrCreateState(mainPath + path + 'Total.ThisYear', total, true, {type: 'number', name: 'ThisYear', role: 'value.power',unit: 'kWh'});
                            break;
                    }
                }
                
                async function readConsumtionData(): Promise<void> {
                    for (let i = 0; i < devices.length; i++) {
                        //get d-raw; w-raw; m-raw
                        let dev: any = devices[i].split('.');
                        let state = getState(devices[i]).val;
                        state = state.slice(1,-1);
                        state = state.replaceAll('null', '0');
                        await writeConsumtionData(devices[i].slice(0,-5), dev[dev.length -1], Array.from(state.split(','), Number));
                    }
                }
                readConsumtionData();
                
                on({ id: [].concat(Array.prototype.slice.apply($('daikin-cloud.*.lastUpdateReceived'))), change: 'any' }, async (obj) => {
                    await readConsumtionData();
                });
                
                K L T 3 Replies Last reply Reply Quote 2
                • K
                  Kredar @Armilar last edited by Kredar

                  @armilar sagte in Test Adapter Daikin-Cloud 0.4.0:

                  /* TypeScript (TS) @Armilar
                  *

                  • This Script will read the consumption Data from Daikin-Cloud adapter and transform the raw data into individual data points similar to how it's shown in the Daikin Onecta App.
                  • It will also sum up the historic consumption from the current and previous year and update the total consumption meter going forward.
                  • The data is created in the following path analogous to the daikin cloud data
                  • 0_userdata.0.daikin-cloud.0...
                  • Createtd: 14.11.2024
                    */

                  // Log-Mode
                  const logMode: any = 'info'; // 'info' or 'debug'
                  // Path in 0_userdata
                  const mainPath: string = '0_userdata.0.';
                  // Onnecta hours (if d-raw)
                  const hourly: Array<string> = ["00:00 - 02:00", "02:00 - 04:00", "04:00 - 06:00", "06:00 - 08:00", "08:00 - 10:00", "10:00 - 12:00", "12:00 - 14:00", "14:00 - 16:00", "16:00 - 18:00", "18:00 - 20:00", "20:00 - 22:00", "22:00 - 24:00"];
                  // Onnecta weekdays (if w-raw)
                  const daily: Array<string> = ["01_Monday", "02_Tuesday", "03_Wednesday", "04_Thursday", "05_Friday", "06_Saturday", "07_Sunday"];
                  // Onnecta months (if m-raw)
                  const monthly: Array<string> = ["01_Januray", "02_February", "03_March", "04_April", "05_May", "06_June", "07_July", "08_August", "09_September", "10_October", "11_November", "12_December"];

                  let devices: string[] = getDeviceNames("daikin-cloud.");

                  function setOrCreateState(id: string, value: any, forceCreation: boolean = true, common: Partial<iobJS.StateCommon> = {}, callback?: iobJS.SetStateCallback): void {
                  if (!existsState(id)) {
                  createState(id, value, forceCreation, common, callback);
                  } else {
                  setState(id, value, true);
                  }
                  }

                  // Get Daikin Device Names
                  function getDeviceNames(vAdapterInstance: string): string[] {
                  let devices = [];
                  $(vAdapterInstance + '*raw').each(function (id) {
                  if (devices.indexOf(id) == -1) {
                  devices.push(id);
                  }
                  });
                  return devices;
                  }

                  async function writeConsumtionData(path: string, rawType: string, rawData: number[]): Promise<void> {
                  log(rawType + ' - ' + rawData, logMode);
                  let total: number = 0;
                  switch (rawType) {
                  case "d-raw":
                  for (let j = 0; j < 12; j++) {
                  let dpName = "Yesterday." + hourly[j];
                  setOrCreateState(mainPath + path + dpName, rawData[j], true, {type: 'number', name: hourly[j], role: 'value.power', unit: 'kWh'});
                  log(mainPath + path + dpName + ': ' + rawData[j], logMode);
                  total = total + rawData[j];
                  }
                  setOrCreateState(mainPath + path + 'Total.Yesterday', total, true, {type: 'number', name: 'Yesterday', role: 'value.power',unit: 'kWh'});
                  total = 0;
                  for (let j = 12; j < 24; j++) {
                  let dpName = "Today." + hourly[j-12];
                  setOrCreateState(mainPath + path + dpName, rawData[j], true, {type: 'number', name: hourly[j-12], role: 'value.power', unit: 'kWh'});
                  log(mainPath + path + dpName + ': ' + rawData[j], logMode);
                  total = total + rawData[j];
                  }
                  setOrCreateState(mainPath + path + 'Total.Today', total, true, {type: 'number', name: 'Today', role: 'value.power',unit: 'kWh'});
                  break;
                  case "w-raw":
                  for (let j = 0; j < 7; j++) {
                  let dpName = "LastWeek." + daily[j];
                  setOrCreateState(mainPath + path + dpName, rawData[j], true, {type: 'number', name: daily[j], role: 'value.power', unit: 'kWh'});
                  log(mainPath + path + dpName + ': ' + rawData[j], logMode);
                  total = total + rawData[j];
                  }
                  setOrCreateState(mainPath + path + 'Total.LastWeek', total, true, {type: 'number', name: 'LastWeek', role: 'value.power',unit: 'kWh'});
                  total = 0;
                  for (let j = 7; j < 14; j++) {
                  let dpName = "ThisWeek." + daily[j-7];
                  setOrCreateState(mainPath + path + dpName, rawData[j], true, {type: 'number', name: daily[j-7], role: 'value.power', unit: 'kWh'});
                  log(mainPath + path + dpName + ': ' + rawData[j], logMode);
                  total = total + rawData[j];
                  }
                  setOrCreateState(mainPath + path + 'Total.ThisWeek', total, true, {type: 'number', name: 'ThisWeek', role: 'value.power',unit: 'kWh'});
                  break;
                  case "m-raw":
                  for (let j = 0; j < 12; j++) {
                  let dpName = "LastYear." + monthly[j];
                  setOrCreateState(mainPath + path + dpName, rawData[j], true, {type: 'number', name: monthly[j], role: 'value.power', unit: 'kWh'});
                  log(mainPath + path + dpName + ': ' + rawData[j], logMode);
                  total = total + rawData[j];
                  }
                  setOrCreateState(mainPath + path + 'Total.LastYear', total, true, {type: 'number', name: 'LastYear', role: 'value.power',unit: 'kWh'});
                  total = 0;
                  for (let j = 12; j < 24; j++) {
                  let dpName = "ThisYear." + monthly[j-12];
                  setOrCreateState(mainPath + path + dpName, rawData[j], true, {type: 'number', name: monthly[j-12], role: 'value.power', unit: 'kWh'});
                  log(mainPath + path + dpName + ': ' + rawData[j], logMode);
                  total = total + rawData[j];
                  }
                  setOrCreateState(mainPath + path + 'Total.ThisYear', total, true, {type: 'number', name: 'ThisYear', role: 'value.power',unit: 'kWh'});
                  break;
                  }
                  }

                  async function readConsumtionData(): Promise<void> {
                  for (let i = 0; i < devices.length; i++) {
                  //get d-raw; w-raw; m-raw
                  let dev: any = devices[i].split('.');
                  let state = getState(devices[i]).val;
                  state = state.slice(1,-1);
                  state = state.replaceAll('null', '0');
                  await writeConsumtionData(devices[i].slice(0,-5), dev[dev.length -1], Array.from(state.split(','), Number));
                  }
                  }
                  readConsumtionData();

                  on({ id: [].concat(Array.prototype.slice.apply($('daikin-cloud.*.lastUpdateReceived'))), change: 'any' }, async (obj) => {
                  await readConsumtionData();
                  });

                  Super da ist ja auch meine Klimaanlage von Daikin drinnen 🙂 Läuft 1a. Danke für das überarbeite Script. Merci

                  L 1 Reply Last reply Reply Quote 0
                  • L
                    Lemmi @Armilar last edited by

                    @armilar Welchen Teil des Skriptes muss ich denn kopieren und einfügen? Irgendwie haut das bei mir nicht hin. Das Blockly funzt.
                    Vielen Dank1

                    1 Reply Last reply Reply Quote 0
                    • L
                      Lemmi @Kredar last edited by Lemmi

                      @kredar
                      Problem gelöst!!! Ich bin auch ein kleines dummerchen. Habe die ganze Zeit versucht unter Javaskript das Ding ans laufen zu bringen. Kann ja auch nicht klappen denn es steht doch deutlich geschrieben "TypeScript (TS)" anlegen. Das richtige Skript angelegt und alles reingeschmissen. Siehe da, es funzt.
                      Vielen Dank an @kredar

                      K 1 Reply Last reply Reply Quote 0
                      • K
                        Kredar @Lemmi last edited by

                        @lemmi

                        steht ja auch da, TS Script 🙂

                        Super wenn es nun geht 😉

                        1 Reply Last reply Reply Quote 0
                        • H
                          Hofmann IOBRF @apollon77 last edited by Hofmann IOBRF

                          @apollon77 Die Verbindung zur Cloud hat nun einige Zeit gut funktioniert.
                          Heute Morgen hatte ich einen "Error on update (1): expected 200 OK, got: 500 Internal Server Error" Fehler.
                          Danach ging gar nichts mehr.
                          Die Daikin Status Seite meldet keinen Fehler.
                          Also habe ich die App gelöscht und neu angelegt.
                          Ohne Erfolg.
                          Nach dem Zugriff bestätigen bekomme ich die Fehlermeldung "Error on OAuth process: OPError: invalid_grant (invalid authorization code)"

                          Hat noch wer aktuell Probleme damit?

                          Jetzt meldet auch die Daikin Status Seite meldet Fehler!

                          Geht jetzt wieder!
                          Die Cloud ist halt einfach nicht sehr stabil!

                          nik82 1 Reply Last reply Reply Quote 0
                          • nik82
                            nik82 Most Active @Hofmann IOBRF last edited by

                            @hofmann-iobrf
                            Kam bei mir auch, ich musste nur wieder authentifizieren:

                            1b0fed87-2559-4519-973b-ee32f9518ed9-image.png

                            Und jetzt gehts wieder...

                            G 1 Reply Last reply Reply Quote 0
                            • G
                              Gismoh @nik82 last edited by

                              @nik82
                              War bei mir ebenso, auch der App Zugriff war gestört.
                              War bei Daikin auch bekannt, und hatten dran gearbeitet.

                              Mit der neuen Authentifizierung über den Adapter funktioniert nun es auch wieder im IOBroker.

                              1 Reply Last reply Reply Quote 0
                              • H
                                Hofmann IOBRF last edited by

                                Es gibt in der App ein Update für die Benutzerschnittstelle. Hat das schon jemand gemacht? Kommt der Adapter danach damit klar?
                                Aktuell läuft es sehr gut mit dem Adapter, deswegen frage ich mal.

                                abce9a54-4e1d-41cc-88f1-444fcc90ec53-image.png

                                H 1 Reply Last reply Reply Quote 0
                                • H
                                  Hofmann IOBRF @Hofmann IOBRF last edited by

                                  @hofmann-iobrf ist hier noch jemand?

                                  Armilar 1 Reply Last reply Reply Quote 0
                                  • Armilar
                                    Armilar Most Active Forum Testing @Hofmann IOBRF last edited by

                                    @hofmann-iobrf

                                    ja, der Adapter reicht nur die Daten durch... Du kannst das Update machen

                                    H 1 Reply Last reply Reply Quote 1
                                    • H
                                      Hofmann IOBRF @Armilar last edited by

                                      @armilar Ja, hat geklappt. Funktioniert alles. Nur die Energiedaten kommen jetzt noch unregelmäßiger. Tlw. 2h später.

                                      apollon77 1 Reply Last reply Reply Quote 0
                                      • apollon77
                                        apollon77 @Hofmann IOBRF last edited by

                                        @hofmann-iobrf Das wäre eine Frage an Daikin, da kann der Adapter leider nichts tun.

                                        1 Reply Last reply Reply Quote 0
                                        • M
                                          mhuber last edited by

                                          Hi,

                                          ich habe ein neues Innengerät bekommen, hab bis jetzt immer den anderen Adapter (lokale Kommunikation) verwendet, das geht beim neuen Innengerät nicht mehr. Habe nun den Cloud Adapter Version 0.4.11 installiert.
                                          Connect usw. funktioniert, Devices werden offline angezeigt aber das dürfte normal sein wie ich hier gelesen habe.
                                          Ich kann aber kein Gerät ein oder ausschalten, woran kann das liegen? Das wäre ja "onOffMode" oder? Habe auch ein paar Minuten gewartet, es tut sich nichts.
                                          Kann mir jemand helfen! Danke!

                                          F 1 Reply Last reply Reply Quote 0
                                          • F
                                            FritzTheCat @mhuber last edited by

                                            @mhuber Hallo, ja "onOffMode" ist der richtige Schalter, aber da muss man normalerweise nicht warten. Bei mir ist die Verzögerung ganz gleich wie bei der normalen Fernbedienung direkt oder ca. 1 Sekunde.

                                            Das Gerät wird allerdings auch nicht offline angezeigt:

                                            2d415c55-5a60-4b10-b3f4-6514ac69a3b2-grafik.png

                                            129875bf-d833-432d-b610-a84c0fe64ede-grafik.png

                                            Vielleicht findest Du eine Fehlermelung im Log?

                                            ad84a45a-0114-4170-bb8e-83a18ad6bf14-grafik.png

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            972
                                            Online

                                            31.7k
                                            Users

                                            79.6k
                                            Topics

                                            1.3m
                                            Posts

                                            37
                                            230
                                            22474
                                            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