Skip to content
  • Home
  • Recent
  • Tags
  • 0 Unread 0
  • Categories
  • Unreplied
  • Popular
  • GitHub
  • Docu
  • Hilfe
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
ioBroker Logo

Community Forum

donate donate
  1. ioBroker Community Home
  2. Deutsch
  3. Praktische Anwendungen (Showcase)
  4. [Javascript] Midas (Aquatemp) Poolheizung

NEWS

  • UPDATE 31.10.: Amazon Alexa - ioBroker Skill läuft aus ?
    apollon77A
    apollon77
    48
    3
    8.8k

  • Monatsrückblick – September 2025
    BluefoxB
    Bluefox
    13
    1
    2.2k

  • Neues Video "KI im Smart Home" - ioBroker plus n8n
    BluefoxB
    Bluefox
    16
    1
    3.3k

[Javascript] Midas (Aquatemp) Poolheizung

Scheduled Pinned Locked Moved Praktische Anwendungen (Showcase)
359 Posts 25 Posters 78.2k Views 25 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S sunnylaila

    @znyde said in [Javascript] Midas (Aquatemp) Poolheizung:

    @sunnylaila

    Bei mir ist das Modul an eine Promo Next 5 angeschlossen, das Mapping mit den Temperaturen habe ich geändert... übrigens kannst Du das in deiner App abfragen Burgermenü oben rechts -> Parametereinstellungen -> Kennwort: 022 (so war es bei mir)

    // Midas Poolheizung
    // v0.0.5
    // Changelog:
    // 0.0.5: weitere Abfragewerte hinzugefügt (Kompressor- und Ansaugtemperatur)
    // 0.0.4: Tokenverfall jetzt 60min nach Skriptstart und nicht zu jeder vollen Stunde (Dank an dering)
    // 0.0.3: Datenpunkte beim Start automatisch anlegen (Dank an Andy200877)
    // 0.0.2: Token bei jedem Set-Vorgang prüfen und ggf. neu anfordern (Dank an dering)
     
    const username = "xxx@xxxx.com";
    const password = "xxxxxx";
    const interval = 30;
     
     
    const cloudURL = "https://cloud.linked-go.com/cloudservice/api";
     
    const dpRoot = "0_userdata.0.Poolheizung";
     
    var token = "";
    var tokenRefreshTimer;
    var device = "";
    var reachable = false;
     
    function clearValues() {
        saveValue("error", true, "boolean");
        saveValue("consumption", 0, "number");
        saveValue("state", false, "boolean");
    }
     
    function saveValue(key, value, sType) {
        var dp = dpRoot + "." + key;
     
        if ( !existsState(dp )) {
            createState(dp,value,{name: key,  type: 'number', role: 'value'}, function () {}); 
        } else {
            setState(dp,value,true);
        }
    }
     
    function findCodeVal(result, code) {
        //log(code);
        for(var i=0; i<result.length; i++) {
            //log(result[i].code);
            
            if(result[i].code.indexOf(code) >= 0) {
                return result[i].value;
            }
        }
        return "";
    }
     
    function createobjects() {
        log ("erstelle Objekte");
        createState(dpRoot + '.ambient', {read: true, write: false,  type: "number", unit:"°C", name: "Umgebungstemperatur"});
        createState(dpRoot + '.connection', {read: true, write: false,  type: "boolean", role: "state", name: "Verbindung", def: "false"});
        createState(dpRoot + '.consumption', {read: true, write: false,  type: "number", unit:"W", name: "Stromverbrauch", def: 0});
        createState(dpRoot + '.error', {read: true, write: false,  type: "boolean", role: "state", name: "Fehler", def: "false"});
        createState(dpRoot + '.errorCode', {read: true, write: false,  type: "string", name: "Fehlercode", def: ""});
        createState(dpRoot + '.errorLevel', {read: true, write: false,  type: "number", name: "Fehlerlevel"});
        createState(dpRoot + '.errorMessage', {read: true, write: false,  type: "string", name: "Fehlermeldung", def: ""});
        createState(dpRoot + '.mode', {read: true, write: true,  type: "string", states: "-1:off;0:cool;1:heat;2:auto", name: "Modus", def: ""});
        createState(dpRoot + '.silent', {read: true, write: true,  type: "boolean", role: "state", name: "Silent", def: "false"});
        createState(dpRoot + '.state', {read: true, write: false,  type: "boolean", role: "state", name: "Status", def: "false"});
        createState(dpRoot + '.tempIn', {read: true, write: false,  type: "number", unit:"°C", name: "Eingangstemperatur"});
        createState(dpRoot + '.tempOut', {read: true, write: false,  type: "number", unit:"°C", name: "Ausgangstemperatur"});
        createState(dpRoot + '.tempSet', {read: true, write: true,  type: "number", unit:"°C", name: "Solltemperatur"});
        createState(dpRoot + '.suctionTemp', {read: true, write: false,  type: "number", unit:"°C", name: "Luftansaugtemperatur"});
        createState(dpRoot + '.coilTemp', {read: true, write: false,  type: "number", unit:"°C", name: "Kompressortemperatur"});
        
        createState(dpRoot + '.rawJSON', {read: true, write: false,  type: "array", name: "komplette Rückgabe"});
    }
     
    function updateToken() {
     
        if(token=="") {
            log("Token Neuanforderung");
            var request = require('request');
      
            var options = {
                url: cloudURL + '/app/user/login.json',
                method: 'POST',
                json: { "user_name": username, "password": password, "type": "2" },
                rejectUnauthorized: false
            };
            
            request(options,function (error, response, body){
             console.log(error);
                console.log(JSON.stringify(response));
                if(parseInt(body.error_code)==0) {
                    
                    token = body.object_result["x-token"];
                    log("Login ok! Token " + token);
                    updateDeviceID();
                } else {
                    // Login-Fehler
                    log("Login-Fehler in updateToken(): " + response.body, "warn");
                    token = "";
                }
                
            });
        } else {
            updateDeviceID();
        }
     
        
     
        
     
    }
     
    function updateDeviceID() {
        
        if(token!="") {
            var optionsDev = {
                url: cloudURL + '/app/device/deviceList.json',
                headers: { "x-token": token},
                body: {product_ids: ["1442284873216843776"]},
               
                method: 'POST',
                json: true,
                
                rejectUnauthorized: false          
            };
     
            var request = require('request');
     
            request(optionsDev,function (error, response, body1){
      //  console.log(parseInt(body1.error_code));
      //         console.log(JSON.stringify(response));
       //         log(JSON.stringify(body1.object_result));
     
                if(parseInt(body1.error_code)==0) {
                    
                    //token = body.object_result["x-token"];
                    log("Login ok! Token " + token);
                    
                   device = body1.object_result[0].device_code;
                   // device=1;
                    console.log(device);
                    reachable = (body1.object_result[0].device_status=="ONLINE");
                    if(reachable) {
                        saveValue("connection", true, "boolean");
                        if(device!="") updateDeviceStatus(device);
                    } else {
                        // offline
                        device = "";
                        saveValue("connection", false, "boolean");
                    }
                    
                } else {
                    // Login-Fehler
                    //log("Fehler in updateDeviceID(): " + response.body);
                    token = "";
                    device = "";
                    reachable = false;
                    saveValue("connection", false, "boolean");
                }
                
            });
        }
        
    
    }
     
    
    function updateDeviceStatus(devicecode) {
        if(token!="") {
            
            var optionsDev = {
                url: cloudURL + '/app/device/getDeviceStatus.json',
                headers: { "x-token": token },
                json: { "device_code": devicecode },
                method: 'POST',
                 rejectUnauthorized: false
                
            };
     
            var request = require('request');
     
            request(optionsDev,function (error, response, body){
        
                //log(JSON.stringify(response));
                //log(JSON.stringify(body.object_result));
     
                if(parseInt(body.error_code)==0) {
     
                    if(body.object_result["is_fault"]==true) {
                        // TODO: Fehlerbeschreibung abrufen
                         //clearValues();
                        saveValue("error", true, "boolean");
                        updateDeviceDetails(devicecode);
                        updateDeviceErrorMsg(devicecode);
                    } else {
                        // kein Fehler
                        saveValue("error", false, "boolean");
                        saveValue("errorMessage", "", "string");
                        saveValue("errorCode", "", "string");
                        saveValue("errorLevel", 0, "number");
                        updateDeviceDetails(devicecode);
                    }
                    
                    //token = body.object_result["x-token"];
                    //log("Login ok! Token " + token);
                    
                } else {
                    // Login-Fehler
                    log("Fehler in updateDeviceStatus(): " + response.body);
                    token = "";
                    device = "";
                }
                
            });
        }
    }
     
    function updateDeviceErrorMsg(devicecode) {
        if(token!="") {
            
            var optionsDev = {
                url: cloudURL + '/app/device/getFaultDataByDeviceCode.json',
                headers: { "x-token": token },
                json: { "device_code": devicecode },
                method: 'POST',
                 rejectUnauthorized: false
                //headers: {"content-type": "application/json"},
                //charset: 'utf8',
                //json: true
                
            };
     
            var request = require('request');
     
            request(optionsDev,function (error, response, body){
        
                //log(JSON.stringify(response));
                //log(JSON.stringify(body.object_result));
     
                if(parseInt(body.error_code)==0) {
     
                    
                    saveValue("error", true, "boolean");
                    saveValue("errorMessage", body.object_result[0].description, "string");
                    saveValue("errorCode", body.object_result[0].fault_code, "string");
                    saveValue("errorLevel", body.object_result[0].error_level, "string");
                    
                } else {
                    // Login-Fehler
                    log("Fehler in updateDeviceErrorMsg(): " + response.body);
                    token = "";
                    device = "";
                }
                
            });
        }
    }
     
    function updateDeviceDetails(devicecode) {
        if(token!="") {
            
            var optionsDev = {
                url: cloudURL + '/app/device/getDataByCode.json',
                headers: { "x-token": token },
              //  json: { "device_code": devicecode },
              // R02=Heatin-Set Point,T2=inlet Water Temp, T3=Outlet Water Temp,T5=Ambient-Temp,
              json: { "device_code": devicecode, "protocal_codes":["R02","T1","T2","T3","T5","P01","P02","Power","Mode"] },
               
               // json: { "device_code": devicecode, "protocal_codes":["Power","Mode","Manual-mute","T01","T02","2074","2075","2076","2077","H03","Set-Temp","R08","R09","R10","R11","R01","R02","R03","T03","1158","1159","F17","H02","T04","T05","T07","T14","T17"] },
                // "protocal_codes":["Power","Mode","Manual-mute","T01","T02","2074","2075","2076","2077","H03","Set_Temp","R08","R09","R10","R11","R01","R02","R03","T03","1158","1159","F17","H02","T04","T05"]
                method: 'POST',
                rejectUnauthorized: false
                
            };
     
            var request = require('request');
     
            request(optionsDev,function (error, response, body){
      console.log("update detail" + JSON.stringify(response));
     
                if(parseInt(body.error_code)==0) {
     
                    saveValue("rawJSON", body.object_result, "string");
                    
                    if(findCodeVal(body.object_result, "Power")=="1") {
                        // Stromverbrauch T07 x T14 in Watt
                        saveValue("consumption", parseFloat(findCodeVal(body.object_result, "T07")) * parseFloat(findCodeVal(body.object_result, "T14")), "number");
     
                        // Lüfter-Drehzahl T17
                        saveValue("rotor", parseInt(findCodeVal(body.object_result, "T17")), "number");
                        // Luftansaug-Temperatur T01
                        saveValue("suctionTemp", parseFloat(findCodeVal(body.object_result, "T1")), "number");
                        // Inlet-Temperatur T02
                        saveValue("tempIn", parseFloat(findCodeVal(body.object_result, "T2")), "number");
                        // outlet-Temperatur T03
                        saveValue("tempOut", parseFloat(findCodeVal(body.object_result, "T3")), "number");
                        // Coil-Temperatur T04
                        saveValue("coilTemp", parseFloat(findCodeVal(body.object_result, "T04")), "number");
                    } else {
                        saveValue("consumption", 0, "number");
                        saveValue("rotor", 0, "number");
                    }
     
     
     
                    // Ziel-Temperatur Set_Temp
                    saveValue("tempSet", parseFloat(findCodeVal(body.object_result, "Set_Temp")), "number");
     
                    // Umgebungs-Temperatur T05
                    saveValue("ambient", parseFloat(findCodeVal(body.object_result, "T5")), "number");
     
                    // Flüstermodus Manual-mute
                    if(findCodeVal(body.object_result, "Manual-mute")=="1") {
                        saveValue("silent", true, "boolean");
                    } else {
                        saveValue("silent", false, "boolean");
                    }
     
                    // Zustand Power
                    if(findCodeVal(body.object_result, "Power")=="1") {
                        saveValue("state", true, "boolean");
                        saveValue("mode", findCodeVal(body.object_result,"Mode"), "string");
                    } else {
                        saveValue("state", false, "boolean");
                        saveValue("mode", "-1", "string");
                    }
                    
     
     
                    //log(findCodeVal(body.object_result, "T07"));
                    
                } else {
                    // Login-Fehler
                    log("Fehler in updateDeviceDetails(): " + response.body);
                    token = "";
                    device = "";
                }
                
            });
        }
    }
     
    function updateDevicePower(devicecode, power) {
        var powerOpt;
        var powerMode = 2;
     
        if(power==-1) {
            // aus
            powerOpt = 0;
            powerMode = -1;
        } else if(power==0) {
            // an und kühlen
            powerOpt = 1;
            powerMode = 0;
        } else if(power==1) {
            // an und heizen
            powerOpt = 1;
            powerMode = 1;
        } else if(power==2) {
            // an und auto
            powerOpt = 1;
            powerMode = 2;
        } else {
            log("ungülter Zustand!");
            return;
        }
     
        if(token!="") {
            
            var optionsDev = {
                url: cloudURL + '/app/device/control.json',
                headers: { "x-token": token },
                json: {"param":[{ "device_code": devicecode, "protocol_code": "Power","value": powerOpt }]},
                method: 'POST',
                rejectUnauthorized: false
            };
     
            var request = require('request');
     
            request(optionsDev,function (error, response, body){
                //log(devicecode);
                //log(JSON.stringify(response));
                //log(JSON.stringify(body.object_result));
     
                if(parseInt(body.error_code)==0) {
                    saveValue("mode", power, "string");
                    if(power>=0) updateDeviceMode(device, power);
                    
                } else {
                    log("Zustandsänderung fehlgeschlagen!");
                }
                
            });
        }
    }
     
    function updateDeviceMode(devicecode, mode) {
        
     
        if(token!="") {
            
            var optionsDev = {
                url: cloudURL + '/app/device/control.json',
                headers: { "x-token": token },
                json: {"param":[{ "device_code": devicecode, "protocol_code": "mode","value": mode }]},
                method: 'POST',
                rejectUnauthorized: false
                //headers: {"content-type": "application/json"},
                //charset: 'utf8',
                //json: true
                
            };
     
            var request = require('request');
     
            request(optionsDev,function (error, response, body){
                //log(devicecode);
                //log(JSON.stringify(response));
                //log(JSON.stringify(body.object_result));
     
                if(parseInt(body.error_code)==0) {
                    saveValue("mode", mode, "string");
                    
                    
                } else {
                    log("Zustandsänderung fehlgeschlagen!");
                }
                
            });
        }
    }
     
    function updateDeviceSilent(devicecode, silent) {
        
        var silentMode;
     
        if(silent) {
            silentMode = "1";
        } else {
            silentMode = "0";
        }
     
        if(token!="") {
            
            var optionsDev = {
                url: cloudURL + '/app/device/control.json',
                headers: { "x-token": token },
                json: {"param":[{ "device_code": devicecode, "protocol_code": "Manual-mute","value": silentMode }]},
                method: 'POST',
                rejectUnauthorized: false
                //headers: {"content-type": "application/json"},
                //charset: 'utf8',
                //json: true
                
            };
     
            var request = require('request');
     
            request(optionsDev,function (error, response, body){
                //log(devicecode);
                //log(JSON.stringify(response));
                //log(JSON.stringify(body.object_result));
     
                if(parseInt(body.error_code)==0) {
                    saveValue("silent", silent, "boolean");
                    
                    
                } else {
                    log("Zustandsänderung fehlgeschlagen!");
                }
                
            });
        }
    }
     
    function updateDeviceSetTemp(devicecode, temperature) {
     
        var sTemperature = temperature.toString().replace(",", ".");
        var sMode = getState(dpRoot + ".mode").val;
        if(sMode=="-1") {
            //log("Gerät einschalten um Temperatur zu ändern!", 'warn');
            return;
        } else if(sMode=="0") {
            sMode = "R01"; // Kühlen
        } else if(sMode=="1") {
            sMode = "R02"; // Heizen
        } else if(sMode=="2") {
            sMode = "R03"; // Auto
        }
     
        
     
     
        if(token!="") {
            
            var optionsDev = {
                url: cloudURL + '/app/device/control.json',
                headers: { "x-token": token },
                json: {"param":[{ "device_code": devicecode, "protocol_code": "R01","value": sTemperature },{ "device_code": devicecode, "protocol_code": "R02","value": sTemperature },{ "device_code": devicecode, "protocol_code": "R03","value": sTemperature },{ "device_code": devicecode, "protocol_code": "Set_Temp","value": sTemperature }]},
                method: 'POST',
                rejectUnauthorized: false
                //headers: {"content-type": "application/json"},
                //charset: 'utf8',
                //json: true
                
            };
     
            var request = require('request');
     
            request(optionsDev,function (error, response, body){
                //log(devicecode);
                //log(JSON.stringify(response));
                //log(JSON.stringify(body.object_result));
     
                if(parseInt(body.error_code)==0) {
                    saveValue("tempSet", temperature, "number");
                    
                    
                } else {
                    log("Zustandsänderung fehlgeschlagen!");
                    log(JSON.stringify(response));
                }
                
            });
        }
    }
     
    // Beginn des Skripts
     
    createobjects(); // DPs anlegen
     
    updateToken(); // Zugriffstoken erfragen und aktuelle Werte lesen
     
    schedule('*/' + interval + ' * * * * *', function () {
        // regelmäßig Token und Zustand abfragen
        updateToken();
     
        // gewünschte Änderungen ausführen
        if(!getState(dpRoot + ".mode").ack) {
            updateDevicePower(device, getState(dpRoot + ".mode").val);
        }
        if(!getState(dpRoot + ".silent").ack) {
            updateDevicePower(device, getState(dpRoot + ".silent").val);
        }
    });
     
    tokenRefreshTimer = setInterval(async function () {
        // Token verfällt nach 60min
        token = "";
        //log("Token nach Intervall verworfen.")
        updateToken();
    }, 3600000);
     
    on({id: dpRoot + ".mode", change: "ne", ack: false}, async function (obj) {
        updateToken();
        updateDevicePower(device, getState(dpRoot + ".mode").val);
    });
     
    on({id: dpRoot + ".silent", change: "ne", ack: false}, async function (obj) {
        updateToken();
        updateDeviceSilent(device, getState(dpRoot + ".silent").val);
    });
     
    on({id: dpRoot + ".tempSet", change: "ne", ack: false}, async function (obj) {
        updateToken();
        updateDeviceSetTemp(device, getState(dpRoot + ".tempSet").val);
    });
     
    

    und einmal hier das komplette Javascript
    was dann funktioniert hat

    Michael RolingM Online
    Michael RolingM Online
    Michael Roling
    Developer
    wrote on last edited by
    #283

    @sunnylaila Ich habe das jetzt für 2 Funktionen eingebaut, wahrscheinlich muss das für alle anderen Funktionen auch noch implementiert werden. Wenn das dann alles funktioniert wird man dieses speziell im Adapter unchecken müssen das man die ssl zertifikat meldungen ignorieren möchte, was ein Sicherheitsrisiko ist. Aber erstmal testen ob es wie gesagt jetzt anders wird.

    S 1 Reply Last reply
    0
    • Michael RolingM Michael Roling

      @sunnylaila Ich habe das jetzt für 2 Funktionen eingebaut, wahrscheinlich muss das für alle anderen Funktionen auch noch implementiert werden. Wenn das dann alles funktioniert wird man dieses speziell im Adapter unchecken müssen das man die ssl zertifikat meldungen ignorieren möchte, was ein Sicherheitsrisiko ist. Aber erstmal testen ob es wie gesagt jetzt anders wird.

      S Offline
      S Offline
      sunnylaila
      wrote on last edited by
      #284

      @michael-roling

      habe es gerade neu installiert aber leider noch kein erfolg siehe log

      
      midas-aquatemp.0
      2024-07-17 18:38:47.258	error	Response: {"sessionid":null,"error_code":"0","error_msg":"Success","error_msg_code":"","totalSize":null,"totalPage":null,"nextPage":null,"objectResult":[],"isReusltSuc":true}
      
      midas-aquatemp.0
      2024-07-17 18:38:47.258	error	Error in updateDeviceID(): No device code found
      
      midas-aquatemp.0
      2024-07-17 18:38:47.092	info	Login ok! Token: TVhfM4yFTdnqTRMIchl7Rt+ILOZsLixeSOXBNvoowdNppxVNabU6Mj1mYkyWloTMXPFacEkw0HogOrNnmbsXTw==
      
      midas-aquatemp.0
      2024-07-17 18:38:46.550	info	Request token
      
      midas-aquatemp.0
      2024-07-17 18:38:46.546	info	Objects created
      
      midas-aquatemp.0
      2024-07-17 18:38:46.539	info	Create object: midas-aquatemp.0.rawJSON
      
      midas-aquatemp.0
      2024-07-17 18:38:46.521	info	Create object: midas-aquatemp.0.DeviceCode
      
      midas-aquatemp.0
      2024-07-17 18:38:46.514	info	Create object: midas-aquatemp.0.ProductCode
      
      midas-aquatemp.0
      2024-07-17 18:38:46.506	info	Create object: midas-aquatemp.0.exhaust
      
      midas-aquatemp.0
      2024-07-17 18:38:46.501	info	Create object: midas-aquatemp.0.coilTemp
      
      midas-aquatemp.0
      2024-07-17 18:38:46.497	info	Create object: midas-aquatemp.0.suctionTemp
      
      midas-aquatemp.0
      2024-07-17 18:38:46.493	info	Create object: midas-aquatemp.0.tempSet
      
      midas-aquatemp.0
      2024-07-17 18:38:46.488	info	Create object: midas-aquatemp.0.tempOut
      
      midas-aquatemp.0
      2024-07-17 18:38:46.483	info	Create object: midas-aquatemp.0.tempIn
      
      midas-aquatemp.0
      2024-07-17 18:38:46.478	info	Create object: midas-aquatemp.0.state
      
      midas-aquatemp.0
      2024-07-17 18:38:46.473	info	Create object: midas-aquatemp.0.silent
      
      midas-aquatemp.0
      2024-07-17 18:38:46.468	info	Create object: midas-aquatemp.0.rotor
      
      midas-aquatemp.0
      2024-07-17 18:38:46.463	info	Create object: midas-aquatemp.0.mode
      
      midas-aquatemp.0
      2024-07-17 18:38:46.459	info	Create object: midas-aquatemp.0.errorMessage
      
      midas-aquatemp.0
      2024-07-17 18:38:46.454	info	Create object: midas-aquatemp.0.errorLevel
      
      midas-aquatemp.0
      2024-07-17 18:38:46.447	info	Create object: midas-aquatemp.0.errorCode
      
      midas-aquatemp.0
      2024-07-17 18:38:46.438	info	Create object: midas-aquatemp.0.error
      
      midas-aquatemp.0
      2024-07-17 18:38:46.423	info	Create object: midas-aquatemp.0.consumption
      
      midas-aquatemp.0
      2024-07-17 18:38:46.415	info	Create object: midas-aquatemp.0.info.connection
      
      midas-aquatemp.0
      2024-07-17 18:38:46.358	info	Create object: midas-aquatemp.0.ambient
      
      midas-aquatemp.0
      2024-07-17 18:38:46.312	info	starting. Version 0.0.1 (non-npm: MiRo1310/ioBroker.midas-aquatemp#fe2980f6c63f14269805862155e182f5f2bed22b) in /opt/iobroker/node_modules/iobroker.midas-aquatemp, node: v20.15.1, js-controller: 5.0.19
      
      Michael RolingM O 2 Replies Last reply
      0
      • S sunnylaila

        @michael-roling

        habe es gerade neu installiert aber leider noch kein erfolg siehe log

        
        midas-aquatemp.0
        2024-07-17 18:38:47.258	error	Response: {"sessionid":null,"error_code":"0","error_msg":"Success","error_msg_code":"","totalSize":null,"totalPage":null,"nextPage":null,"objectResult":[],"isReusltSuc":true}
        
        midas-aquatemp.0
        2024-07-17 18:38:47.258	error	Error in updateDeviceID(): No device code found
        
        midas-aquatemp.0
        2024-07-17 18:38:47.092	info	Login ok! Token: TVhfM4yFTdnqTRMIchl7Rt+ILOZsLixeSOXBNvoowdNppxVNabU6Mj1mYkyWloTMXPFacEkw0HogOrNnmbsXTw==
        
        midas-aquatemp.0
        2024-07-17 18:38:46.550	info	Request token
        
        midas-aquatemp.0
        2024-07-17 18:38:46.546	info	Objects created
        
        midas-aquatemp.0
        2024-07-17 18:38:46.539	info	Create object: midas-aquatemp.0.rawJSON
        
        midas-aquatemp.0
        2024-07-17 18:38:46.521	info	Create object: midas-aquatemp.0.DeviceCode
        
        midas-aquatemp.0
        2024-07-17 18:38:46.514	info	Create object: midas-aquatemp.0.ProductCode
        
        midas-aquatemp.0
        2024-07-17 18:38:46.506	info	Create object: midas-aquatemp.0.exhaust
        
        midas-aquatemp.0
        2024-07-17 18:38:46.501	info	Create object: midas-aquatemp.0.coilTemp
        
        midas-aquatemp.0
        2024-07-17 18:38:46.497	info	Create object: midas-aquatemp.0.suctionTemp
        
        midas-aquatemp.0
        2024-07-17 18:38:46.493	info	Create object: midas-aquatemp.0.tempSet
        
        midas-aquatemp.0
        2024-07-17 18:38:46.488	info	Create object: midas-aquatemp.0.tempOut
        
        midas-aquatemp.0
        2024-07-17 18:38:46.483	info	Create object: midas-aquatemp.0.tempIn
        
        midas-aquatemp.0
        2024-07-17 18:38:46.478	info	Create object: midas-aquatemp.0.state
        
        midas-aquatemp.0
        2024-07-17 18:38:46.473	info	Create object: midas-aquatemp.0.silent
        
        midas-aquatemp.0
        2024-07-17 18:38:46.468	info	Create object: midas-aquatemp.0.rotor
        
        midas-aquatemp.0
        2024-07-17 18:38:46.463	info	Create object: midas-aquatemp.0.mode
        
        midas-aquatemp.0
        2024-07-17 18:38:46.459	info	Create object: midas-aquatemp.0.errorMessage
        
        midas-aquatemp.0
        2024-07-17 18:38:46.454	info	Create object: midas-aquatemp.0.errorLevel
        
        midas-aquatemp.0
        2024-07-17 18:38:46.447	info	Create object: midas-aquatemp.0.errorCode
        
        midas-aquatemp.0
        2024-07-17 18:38:46.438	info	Create object: midas-aquatemp.0.error
        
        midas-aquatemp.0
        2024-07-17 18:38:46.423	info	Create object: midas-aquatemp.0.consumption
        
        midas-aquatemp.0
        2024-07-17 18:38:46.415	info	Create object: midas-aquatemp.0.info.connection
        
        midas-aquatemp.0
        2024-07-17 18:38:46.358	info	Create object: midas-aquatemp.0.ambient
        
        midas-aquatemp.0
        2024-07-17 18:38:46.312	info	starting. Version 0.0.1 (non-npm: MiRo1310/ioBroker.midas-aquatemp#fe2980f6c63f14269805862155e182f5f2bed22b) in /opt/iobroker/node_modules/iobroker.midas-aquatemp, node: v20.15.1, js-controller: 5.0.19
        
        Michael RolingM Online
        Michael RolingM Online
        Michael Roling
        Developer
        wrote on last edited by
        #285

        @sunnylaila sorry. Ich muss dann noch mal schauen.

        1 Reply Last reply
        0
        • S sunnylaila

          @michael-roling

          habe es gerade neu installiert aber leider noch kein erfolg siehe log

          
          midas-aquatemp.0
          2024-07-17 18:38:47.258	error	Response: {"sessionid":null,"error_code":"0","error_msg":"Success","error_msg_code":"","totalSize":null,"totalPage":null,"nextPage":null,"objectResult":[],"isReusltSuc":true}
          
          midas-aquatemp.0
          2024-07-17 18:38:47.258	error	Error in updateDeviceID(): No device code found
          
          midas-aquatemp.0
          2024-07-17 18:38:47.092	info	Login ok! Token: TVhfM4yFTdnqTRMIchl7Rt+ILOZsLixeSOXBNvoowdNppxVNabU6Mj1mYkyWloTMXPFacEkw0HogOrNnmbsXTw==
          
          midas-aquatemp.0
          2024-07-17 18:38:46.550	info	Request token
          
          midas-aquatemp.0
          2024-07-17 18:38:46.546	info	Objects created
          
          midas-aquatemp.0
          2024-07-17 18:38:46.539	info	Create object: midas-aquatemp.0.rawJSON
          
          midas-aquatemp.0
          2024-07-17 18:38:46.521	info	Create object: midas-aquatemp.0.DeviceCode
          
          midas-aquatemp.0
          2024-07-17 18:38:46.514	info	Create object: midas-aquatemp.0.ProductCode
          
          midas-aquatemp.0
          2024-07-17 18:38:46.506	info	Create object: midas-aquatemp.0.exhaust
          
          midas-aquatemp.0
          2024-07-17 18:38:46.501	info	Create object: midas-aquatemp.0.coilTemp
          
          midas-aquatemp.0
          2024-07-17 18:38:46.497	info	Create object: midas-aquatemp.0.suctionTemp
          
          midas-aquatemp.0
          2024-07-17 18:38:46.493	info	Create object: midas-aquatemp.0.tempSet
          
          midas-aquatemp.0
          2024-07-17 18:38:46.488	info	Create object: midas-aquatemp.0.tempOut
          
          midas-aquatemp.0
          2024-07-17 18:38:46.483	info	Create object: midas-aquatemp.0.tempIn
          
          midas-aquatemp.0
          2024-07-17 18:38:46.478	info	Create object: midas-aquatemp.0.state
          
          midas-aquatemp.0
          2024-07-17 18:38:46.473	info	Create object: midas-aquatemp.0.silent
          
          midas-aquatemp.0
          2024-07-17 18:38:46.468	info	Create object: midas-aquatemp.0.rotor
          
          midas-aquatemp.0
          2024-07-17 18:38:46.463	info	Create object: midas-aquatemp.0.mode
          
          midas-aquatemp.0
          2024-07-17 18:38:46.459	info	Create object: midas-aquatemp.0.errorMessage
          
          midas-aquatemp.0
          2024-07-17 18:38:46.454	info	Create object: midas-aquatemp.0.errorLevel
          
          midas-aquatemp.0
          2024-07-17 18:38:46.447	info	Create object: midas-aquatemp.0.errorCode
          
          midas-aquatemp.0
          2024-07-17 18:38:46.438	info	Create object: midas-aquatemp.0.error
          
          midas-aquatemp.0
          2024-07-17 18:38:46.423	info	Create object: midas-aquatemp.0.consumption
          
          midas-aquatemp.0
          2024-07-17 18:38:46.415	info	Create object: midas-aquatemp.0.info.connection
          
          midas-aquatemp.0
          2024-07-17 18:38:46.358	info	Create object: midas-aquatemp.0.ambient
          
          midas-aquatemp.0
          2024-07-17 18:38:46.312	info	starting. Version 0.0.1 (non-npm: MiRo1310/ioBroker.midas-aquatemp#fe2980f6c63f14269805862155e182f5f2bed22b) in /opt/iobroker/node_modules/iobroker.midas-aquatemp, node: v20.15.1, js-controller: 5.0.19
          
          O Online
          O Online
          oxident
          wrote on last edited by
          #286

          @sunnylaila Das ist echt tricky ... hat aber mit den SSL-Sachen nix zu tun. Ich schaue parallel auch nochmal!

          Michael RolingM 2 Replies Last reply
          0
          • O oxident

            @sunnylaila Das ist echt tricky ... hat aber mit den SSL-Sachen nix zu tun. Ich schaue parallel auch nochmal!

            Michael RolingM Online
            Michael RolingM Online
            Michael Roling
            Developer
            wrote on last edited by Michael Roling
            #287

            @oxident Hast du schon was in Erfahrung bringen können? Mir scheint es so als ob er das Device nicht erkennt, und daher kann der ganze Code nicht laufen. Der Error der kommt, ist von mir so eingebaut. Das Login klappt ja, nur halt bekommt er keine weiteren Daten.

            Dann ist die Frage von wo kommt der ProduktId? In meiner App steht eine ganz andere Id als wie im Adapter ausgelesen.

            Ich nehme das mit dem ssl zertifikat erstmal wieder raus, denn das ist ja sonst eine mögliche Sicherheitslücke.

            Kann das was mit dem Api-Level zu tun haben?
            @sunnylaila Hast du das mal versucht ob es mit einem anderen geht?

            S 1 Reply Last reply
            0
            • Michael RolingM Michael Roling

              @oxident Hast du schon was in Erfahrung bringen können? Mir scheint es so als ob er das Device nicht erkennt, und daher kann der ganze Code nicht laufen. Der Error der kommt, ist von mir so eingebaut. Das Login klappt ja, nur halt bekommt er keine weiteren Daten.

              Dann ist die Frage von wo kommt der ProduktId? In meiner App steht eine ganz andere Id als wie im Adapter ausgelesen.

              Ich nehme das mit dem ssl zertifikat erstmal wieder raus, denn das ist ja sonst eine mögliche Sicherheitslücke.

              Kann das was mit dem Api-Level zu tun haben?
              @sunnylaila Hast du das mal versucht ob es mit einem anderen geht?

              S Offline
              S Offline
              sunnylaila
              wrote on last edited by
              #288

              @michael-roling
              Was meinst du mit einem anderen?
              Kann ich eventuell euch aus der App etwas auslesen in den Parameter Einstellung ?

              Michael RolingM 1 Reply Last reply
              0
              • S sunnylaila

                @michael-roling
                Was meinst du mit einem anderen?
                Kann ich eventuell euch aus der App etwas auslesen in den Parameter Einstellung ?

                Michael RolingM Online
                Michael RolingM Online
                Michael Roling
                Developer
                wrote on last edited by
                #289

                @sunnylaila ich meinte anderen api Level in den settings

                S 1 Reply Last reply
                0
                • Z znyde

                  sorry für den Spam,

                  hier eine Lösung die bei mir geholfen hat

                  einfach diese Abfrage hinzufügen:

                  body: {product_ids: ["1442284873216843776"]},
                  
                  function updateDeviceID() {
                      
                      if(token!="") {
                          var optionsDev = {
                              url: cloudURL + '/app/device/deviceList.json',
                              headers: { "x-token": token},
                              body: {product_ids: ["1442284873216843776"]},
                             
                              method: 'POST',
                              json: true,
                              
                              rejectUnauthorized: false          
                          };
                  
                  S Offline
                  S Offline
                  sunnylaila
                  wrote on last edited by
                  #290

                  @znyde said in [Javascript] Midas (Aquatemp) Poolheizung:

                  sorry für den Spam,

                  hier eine Lösung die bei mir geholfen hat

                  einfach diese Abfrage hinzufügen:

                  body: {product_ids: ["1442284873216843776"]},
                  
                  function updateDeviceID() {
                      
                      if(token!="") {
                          var optionsDev = {
                              url: cloudURL + '/app/device/deviceList.json',
                              headers: { "x-token": token},
                              body: {product_ids: ["1442284873216843776"]},
                             
                              method: 'POST',
                              json: true,
                              
                              rejectUnauthorized: false          
                          };
                  

                  hier hat zynde noch etwas im Javascript hinzugefügt für die product id
                  " body: {product_ids: ["1442284873216843776"]}, "

                  vielleicht hilft das ja etwas

                  1 Reply Last reply
                  0
                  • Michael RolingM Michael Roling

                    @sunnylaila ich meinte anderen api Level in den settings

                    S Offline
                    S Offline
                    sunnylaila
                    wrote on last edited by
                    #291

                    @michael-roling

                    api level hatte ich alle drei ausprobiert hat aber nichts geändert

                    Michael RolingM 2 Replies Last reply
                    0
                    • S sunnylaila

                      @michael-roling

                      api level hatte ich alle drei ausprobiert hat aber nichts geändert

                      Michael RolingM Online
                      Michael RolingM Online
                      Michael Roling
                      Developer
                      wrote on last edited by
                      #292

                      @sunnylaila die productId ist bereits enthalten

                      1 Reply Last reply
                      0
                      • O oxident

                        @sunnylaila Das ist echt tricky ... hat aber mit den SSL-Sachen nix zu tun. Ich schaue parallel auch nochmal!

                        Michael RolingM Online
                        Michael RolingM Online
                        Michael Roling
                        Developer
                        wrote on last edited by
                        #293

                        @oxident Sag mal hatte das einen Grund warum man die Werte nur ändern darf wenn die Wärmepumpe an ist? Ich habe das mal raus genommen, es sei denn du hast da noch einen Einwand zu.

                        O 1 Reply Last reply
                        0
                        • S sunnylaila

                          @michael-roling

                          api level hatte ich alle drei ausprobiert hat aber nichts geändert

                          Michael RolingM Online
                          Michael RolingM Online
                          Michael Roling
                          Developer
                          wrote on last edited by
                          #294

                          @sunnylaila Ich habe noch mal ein paar kleine Änderungen vor genommen. Also noch einmal bitte testen

                          1 Reply Last reply
                          0
                          • Michael RolingM Michael Roling

                            @oxident Sag mal hatte das einen Grund warum man die Werte nur ändern darf wenn die Wärmepumpe an ist? Ich habe das mal raus genommen, es sei denn du hast da noch einen Einwand zu.

                            O Online
                            O Online
                            oxident
                            wrote on last edited by
                            #295

                            @michael-roling Also früher hat der Server sämtliche Änderungen (bis auf on/off) mit einem Fehler quittiert wenn die WP aus war. Ist das jetzt nicht mehr so?

                            Also bei @sunnylaila stehe ich auch gerade auf dem Schlauch. Eine Paketmitschnitt aus der App wäre cool, aber das ist ja sicherlich nicht ganz so leicht...
                            Eventuell könnte es an der ProductID liegen. Die habe ich vom Github-Projekt übernommen.

                            Michael RolingM 1 Reply Last reply
                            0
                            • O oxident

                              @michael-roling Also früher hat der Server sämtliche Änderungen (bis auf on/off) mit einem Fehler quittiert wenn die WP aus war. Ist das jetzt nicht mehr so?

                              Also bei @sunnylaila stehe ich auch gerade auf dem Schlauch. Eine Paketmitschnitt aus der App wäre cool, aber das ist ja sicherlich nicht ganz so leicht...
                              Eventuell könnte es an der ProductID liegen. Die habe ich vom Github-Projekt übernommen.

                              Michael RolingM Online
                              Michael RolingM Online
                              Michael Roling
                              Developer
                              wrote on last edited by
                              #296

                              @oxident ja das geht jetzt.

                              S 1 Reply Last reply
                              1
                              • Michael RolingM Michael Roling

                                @oxident ja das geht jetzt.

                                S Offline
                                S Offline
                                sunnylaila
                                wrote on last edited by
                                #297

                                @michael-roling

                                habe es jetzt nochmal neu installiert mit dem selben Fehler

                                	2024-07-20 08:02:46.517	error	Response: {"sessionid":null,"error_code":"0","error_msg":"Success","error_msg_code":"","totalSize":null,"totalPage":null,"nextPage":null,"objectResult":[],"isReusltSuc":true}
                                
                                midas-aquatemp.0
                                2024-07-20 08:02:46.516	error	Error in updateDeviceID(): No device code found
                                

                                wobei mir jetzt gerade in der app die Poolheizung auch als Offline angezeigt wird.
                                Probiere heute Nachmittag nochmal wenn die Poolheizung wieder als Online angezeigt wird und guck dann mal in den Parametereinstellungen ob ich da etwas mit Product ID sehe.

                                Michael RolingM 1 Reply Last reply
                                0
                                • S sunnylaila

                                  @michael-roling

                                  habe es jetzt nochmal neu installiert mit dem selben Fehler

                                  	2024-07-20 08:02:46.517	error	Response: {"sessionid":null,"error_code":"0","error_msg":"Success","error_msg_code":"","totalSize":null,"totalPage":null,"nextPage":null,"objectResult":[],"isReusltSuc":true}
                                  
                                  midas-aquatemp.0
                                  2024-07-20 08:02:46.516	error	Error in updateDeviceID(): No device code found
                                  

                                  wobei mir jetzt gerade in der app die Poolheizung auch als Offline angezeigt wird.
                                  Probiere heute Nachmittag nochmal wenn die Poolheizung wieder als Online angezeigt wird und guck dann mal in den Parametereinstellungen ob ich da etwas mit Product ID sehe.

                                  Michael RolingM Online
                                  Michael RolingM Online
                                  Michael Roling
                                  Developer
                                  wrote on last edited by
                                  #298

                                  @sunnylaila unter diesem Benutzer ist auch definitiv eine pumpe registriert? Schau mal zusätzlich in der App was du für eine Product id hast

                                  S 1 Reply Last reply
                                  0
                                  • Michael RolingM Michael Roling

                                    @sunnylaila unter diesem Benutzer ist auch definitiv eine pumpe registriert? Schau mal zusätzlich in der App was du für eine Product id hast

                                    S Offline
                                    S Offline
                                    sunnylaila
                                    wrote on last edited by
                                    #299

                                    @michael-roling

                                    jetzt ist die Poolheizung in der App wieder online ist aber im log immer noch gleich
                                    habe in der App mal Screenshots gemacht vielleicht hilft das ja

                                    IMG_8835.png IMG_8836.png IMG_8837.png IMG_8838.png IMG_8839.png IMG_8840.png IMG_8841.png IMG_8842.png IMG_8843.png IMG_8844.png IMG_8845.png IMG_8846.png

                                    Michael RolingM 1 Reply Last reply
                                    0
                                    • S sunnylaila

                                      @michael-roling

                                      jetzt ist die Poolheizung in der App wieder online ist aber im log immer noch gleich
                                      habe in der App mal Screenshots gemacht vielleicht hilft das ja

                                      IMG_8835.png IMG_8836.png IMG_8837.png IMG_8838.png IMG_8839.png IMG_8840.png IMG_8841.png IMG_8842.png IMG_8843.png IMG_8844.png IMG_8845.png IMG_8846.png

                                      Michael RolingM Online
                                      Michael RolingM Online
                                      Michael Roling
                                      Developer
                                      wrote on last edited by
                                      #300

                                      @sunnylaila du hast aber 2 Accounts? Einen für die App und einen für den Adapter?
                                      Und was mir noch aufgefallen ist, die zieltemperatur ist viel zu niedrig 🤣🤣🤣🤣
                                      Ich habe für heute die auf 33 grad stehen. 😋

                                      S 1 Reply Last reply
                                      1
                                      • Michael RolingM Michael Roling

                                        @sunnylaila du hast aber 2 Accounts? Einen für die App und einen für den Adapter?
                                        Und was mir noch aufgefallen ist, die zieltemperatur ist viel zu niedrig 🤣🤣🤣🤣
                                        Ich habe für heute die auf 33 grad stehen. 😋

                                        S Offline
                                        S Offline
                                        sunnylaila
                                        wrote on last edited by
                                        #301

                                        @michael-roling
                                        hi, ja habe 2 Accounts, die Zieltemperatur von dir gefällt mir auch besser, aber meiner Regierung nicht :blush:

                                        Michael RolingM 1 Reply Last reply
                                        1
                                        • S sunnylaila

                                          @michael-roling
                                          hi, ja habe 2 Accounts, die Zieltemperatur von dir gefällt mir auch besser, aber meiner Regierung nicht :blush:

                                          Michael RolingM Online
                                          Michael RolingM Online
                                          Michael Roling
                                          Developer
                                          wrote on last edited by
                                          #302

                                          @sunnylaila und du benutzt auch wirklich nicht den gleichen Account trotz das du 2 hast.

                                          Mein Plan ist je nach Überschuss vom Strom die Temperatur zu steuern. Mindestens aber 30 grad.

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          Support us

                                          ioBroker
                                          Community Adapters
                                          Donate

                                          835

                                          Online

                                          32.4k

                                          Users

                                          81.5k

                                          Topics

                                          1.3m

                                          Posts
                                          Community
                                          Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
                                          ioBroker Community 2014-2025
                                          logo
                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Home
                                          • Recent
                                          • Tags
                                          • Unread 0
                                          • Categories
                                          • Unreplied
                                          • Popular
                                          • GitHub
                                          • Docu
                                          • Hilfe