Alors tu peux utiliser un flow NodeRed avec les 2 nœuds ci-dessous. 1 pour lire, et l’autre pour modifier les réglages:
Il faut aller dans la palette et importer le paquet nommé **node-red-contrib-melcloud**
. Le descriptif est là
Donc concrètement tu entres tes crédentiels Melcloud et il va aller lire les infos comme ton application.
Après il te renvoie +/- 200 informations. Faut fouiner pour trouver celle qui t’intéresse.
Je viens de faire un test, ça fonctionne parfaitement.
Ensuite il te suffit de prendre les nœuds Nodered compagnon pour HA pour faire remonter les données dans HA comme entités, capteurs, senseurs etc… ou l’inverse, agir sur les PAC depuis HA
Voici à quoi cela ressemble:
et le code NR qui va avec:
[{"id":"5f93859fd0cb3ed1","type":"tab","label":"Flow 2","disabled":false,"info":"","env":[]},{"id":"d603d88d6bb358b0","type":"group","z":"5f93859fd0cb3ed1","name":"Récupère les valeurs depuis Melcloud","style":{"stroke":"#ffC000","label":true,"color":"#000000"},"nodes":["7cbcd195ac7376f7","d3d5c9749ab47bc5","aeb36060f0102821","ac234c78c316a741","13da89288849eb10"],"x":34,"y":39,"w":732,"h":122},{"id":"62134b338ebf711f","type":"group","z":"5f93859fd0cb3ed1","name":"Modifie une PAC","style":{"stroke":"#0070c0","label":true,"color":"#000000"},"nodes":["94a45a443d8e7d20","097f9f72f304ea80","6843422311e13903"],"x":24,"y":219,"w":572,"h":82},{"id":"94a45a443d8e7d20","type":"melcloud-device","z":"5f93859fd0cb3ed1","g":"62134b338ebf711f","server":"edca0d843887b6d5","buildingid":"","deviceid":"","mode":"","power":"","settemperature":"","setfanspeed":"","x":310,"y":260,"wires":[["097f9f72f304ea80"]]},{"id":"7cbcd195ac7376f7","type":"melcloud-connect","z":"5f93859fd0cb3ed1","g":"d603d88d6bb358b0","server":"edca0d843887b6d5","command":"getListDevices","x":310,"y":120,"wires":[["ac234c78c316a741","13da89288849eb10"]]},{"id":"097f9f72f304ea80","type":"debug","z":"5f93859fd0cb3ed1","g":"62134b338ebf711f","name":"Device","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":500,"y":260,"wires":[]},{"id":"6843422311e13903","type":"inject","z":"5f93859fd0cb3ed1","g":"62134b338ebf711f","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":130,"y":260,"wires":[["94a45a443d8e7d20"]]},{"id":"d3d5c9749ab47bc5","type":"inject","z":"5f93859fd0cb3ed1","g":"d603d88d6bb358b0","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":140,"y":120,"wires":[["7cbcd195ac7376f7"]]},{"id":"aeb36060f0102821","type":"debug","z":"5f93859fd0cb3ed1","g":"d603d88d6bb358b0","name":"Connect","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":660,"y":120,"wires":[]},{"id":"ac234c78c316a741","type":"debug","z":"5f93859fd0cb3ed1","g":"d603d88d6bb358b0","name":"CurrentEnergyConsumed","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload[0].Structure.Floors[0].Devices[1].Device.CurrentEnergyConsumed","targetType":"msg","statusVal":"","statusType":"auto","x":550,"y":80,"wires":[]},{"id":"13da89288849eb10","type":"delay","z":"5f93859fd0cb3ed1","g":"d603d88d6bb358b0","name":"","pauseType":"delay","timeout":"100","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":510,"y":120,"wires":[["aeb36060f0102821"]]},{"id":"edca0d843887b6d5","type":"melcloud-credential","email":"toto@hotmail.com","password":"motdepasse"}]