This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

API with Mitsubishi MELCloud for heatingpumps
#6
(12.08.2019, 11:54)thomasoppida Wrote: Nice! Thank you very much :-)
Hello,

this topic is a bit older but I hope it can be active again and maybe someone can help ...

I am using ioBroker and Melcloud. There is an adapter for homebridge which I am using actually. But I think that it could be done with objects and status. I am serching for a solution to make states which can be read from a json like I do it already for my homepilot or the controme heating system. But I have no idea because I am new to this ...

Maybe here is someone knowing the iobroker and knows maybe how to handle the script in this topic correctly. Or maybe it is not possible ...

I think the probelm is to get the JSON - For controme I have this javascript - but I also have already the json api available, which I do not have for melcloud -Example für the kitchen and the sensors:

Code:
const request = require('request');
const link_kueche = 'http://192.168.1.12/get/json/v1/1/temps/1/';

// Datenpunkte erzeugen
//Küche
createState('Controme.kueche.frt_temp', 0, {type: "number", unit: '°C'});
createState('Controme.kueche.rl_temp', 0, {type: "number", unit: '°C'});
createState('Controme.kueche.frt_akt', 0, {type: "string", unit: ''});
createState('Controme.kueche.rl_akt', 0, {type: "string", unit: ''});
createState('Controme.kueche.solltemperatur', 0, {type: "number", unit: '°C'});

function controme_kueche() {
    request(link_kueche, function(error,response, body) {
        if(error) log('Fehler request: ' + error, 'error');
       
        else if(body.indexOf('html') == -1) {
            log(body);
            var sensoren = JSON.parse(body)[0].sensoren;
            var solltemp = JSON.parse(body)[0];
            
            var rl_temp = sensoren[0].wert;
            setState('Controme.kueche.rl_temp', Math.round(10*rl_temp)/10, true);
            var frt_temp = sensoren[1].wert.Temperatur;
            setState('Controme.kueche.frt_temp', Math.round(10*frt_temp)/10, true);
            var rl_akt = sensoren[0].letzte_uebertragung;
            setState('Controme.kueche.rl_akt', rl_akt, true);
            var frt_akt = sensoren[1].letzte_uebertragung;
            setState('Controme.kueche.frt_akt', frt_akt, true);
            var soll = solltemp.solltemperatur;
            setState('Controme.kueche.solltemperatur', Math.round(10*soll)/10, true);
                 }   
    });
}

function alledaten() {
    controme_kueche();
    controme_schlafzimmer();
    controme_wohnzimmer();
    controme_abstellkammer();
    controme_badezimmer();
    controme_flur();
    controme_arbeitszimmer();
    controme_esszimmer();
    controme_hkv();
    controme_vsensor1();
}
schedule('*/1 * * * *', alledaten); // alle 15 Minuten

So the question is - is someone using iobroker and melcloud and has done something like that or has anybody any idea how to do it ? I would like to learn out of this but I have no idea and I am a bloody newbe.

Any ideas ... Thanks so far ...

Best regards,
Marc
Reply


Messages In This Thread
RE: API with Mitsubishi MELCloud for heatingpumps - by meicker - 04.02.2020, 21:15

Forum Jump: