[{“id”:“3737d34f0ebbdcc0”,“type”:“tab”,“label”:“Flow 1”,“disabled”:false,“info”:"",“env”:[]},{“id”:“5375771a5e87ea38”,“type”:“http request”,“z”:“3737d34f0ebbdcc0”,“name”:“Get SessionId”,“method”:“GET”,“ret”:“obj”,“paytoqs”:“ignore”,“url”:“https://xxx.xxx.xxx.xxx/api/auth/login.json?user=xxxxxxx&pwd=yyyyyyy",“tls”:“90f9ea5422086ff9”,“persist”:true,“proxy”:"",“insecureHTTPParser”:false,“authType”:"",“senderr”:false,“headers”:[],“credentials”:{“user”:"",“password”:""},“x”:860,“y”:60,“wires”:[[“eabd13827185e683”]]},{“id”:“eabd13827185e683”,“type”:“function”,“z”:“3737d34f0ebbdcc0”,“name”:"http constitution”,“func”:“var newMsg = “https://xxx.xxx.xxx.xxx/api/menutree/write_datapoint.json?SessionId=”;\nmsg.path = newMsg + msg.payload.SessionId + “&Id=698&Type=Enumeration&Value=” + String(flow.get(“mode_salon”));\nreturn msg;”,“outputs”:1,“noerr”:0,“initialize”:"",“finalize”:"",“libs”:[],“x”:1080,“y”:60,“wires”:[[“a36772d46bbc47b8”]]},{“id”:“a36772d46bbc47b8”,“type”:“http request”,“z”:“3737d34f0ebbdcc0”,“name”:“Id 698 = on/off salon”,“method”:“GET”,“ret”:“obj”,“paytoqs”:“ignore”,“url”:"{{{path}}}",“tls”:“90f9ea5422086ff9”,“persist”:false,“proxy”:"",“insecureHTTPParser”:false,“authType”:"",“senderr”:false,“headers”:[],“credentials”:{“user”:"",“password”:""},“x”:1360,“y”:60,“wires”:[[]]},{“id”:“ba9ed1fcb5984f03”,“type”:“function”,“z”:“3737d34f0ebbdcc0”,“name”:“Save mode_salon”,“func”:“if (msg.payload === “off”) {\n msg.payload = 0;\n} else {\n msg.payload = 1;\n}\nflow.set(“mode_salon”, msg.payload)\nmsg.payload = flow.get(“mode_salon”)\nreturn msg;”,“outputs”:1,“noerr”:0,“initialize”:"",“finalize”:"",“libs”:[],“x”:870,“y”:120,“wires”:[[“cfb95afde96e9771”]]},{“id”:“14e7e456ed075147”,“type”:“rbe”,“z”:“3737d34f0ebbdcc0”,“name”:“block unless value changes”,“func”:“rbe”,“gap”:"",“start”:"",“inout”:“out”,“septopics”:false,“property”:“payload”,“topi”:“topic”,“x”:600,“y”:60,“wires”:[[“ba9ed1fcb5984f03”,“5375771a5e87ea38”]]},{“id”:“9051fae2f073fa0e”,“type”:“server-state-changed”,“z”:“3737d34f0ebbdcc0”,“name”:“listen for changes to state of climate.salon (off/heat)”,“server”:“a6d3a29f.c532”,“version”:4,“exposeToHomeAssistant”:false,“haConfig”:[{“property”:“name”,“value”:""},{“property”:“icon”,“value”:""}],“entityidfilter”:“climate.salon”,“entityidfiltertype”:“exact”,“outputinitially”:false,“state_type”:“str”,“haltifstate”:"",“halt_if_type”:“str”,“halt_if_compare”:“is”,“outputs”:1,“output_only_on_state_change”:true,“for”:“0”,“forType”:“num”,“forUnits”:“minutes”,“ignorePrevStateNull”:false,“ignorePrevStateUnknown”:false,“ignorePrevStateUnavailable”:false,“ignoreCurrentStateUnknown”:false,“ignoreCurrentStateUnavailable”:false,“outputProperties”:[{“property”:“payload”,“propertyType”:“msg”,“value”:"",“valueType”:“entityState”}],“x”:230,“y”:60,“wires”:[[“14e7e456ed075147”]]},{“id”:“a64ef79956c03183”,“type”:“http request”,“z”:“3737d34f0ebbdcc0”,“name”:“Get SessionId”,“method”:“GET”,“ret”:“obj”,“paytoqs”:“ignore”,“url”:“https://xxx.xxx.xxx.xxx/api/auth/login.json?user=xxxxxxxx&pwd=yyyyyy",“tls”:“90f9ea5422086ff9”,“persist”:true,“proxy”:"",“insecureHTTPParser”:false,“authType”:"",“senderr”:false,“headers”:[],“credentials”:{“user”:"",“password”:""},“x”:860,“y”:180,“wires”:[[“da61364b99bae622”]]},{“id”:“da61364b99bae622”,“type”:“function”,“z”:“3737d34f0ebbdcc0”,“name”:"http constitution”,“func”:“var newMsg = “https://xxx.xxx.xxx.xxx/api/menutree/write_datapoint.json?SessionId=”;\nmsg.path = newMsg + msg.payload.SessionId + “&Id=695&Type=Enumeration&Value=” + String(flow.get(“mode_etage”));\nreturn msg;”,“outputs”:1,“noerr”:0,“initialize”:"",“finalize”:"",“libs”:[],“x”:1080,“y”:180,“wires”:[[“787a410b4ea6bae3”]]},{“id”:“787a410b4ea6bae3”,“type”:“http request”,“z”:“3737d34f0ebbdcc0”,“name”:“Id 695 = on/off étage”,“method”:“GET”,“ret”:“obj”,“paytoqs”:“ignore”,“url”:"{{{path}}}",“tls”:“90f9ea5422086ff9”,“persist”:false,“proxy”:"",“insecureHTTPParser”:false,“authType”:"",“senderr”:false,“headers”:[],“x”:1360,“y”:180,“wires”:[[]]},{“id”:“2a9bf928b4de7845”,“type”:“function”,“z”:“3737d34f0ebbdcc0”,“name”:“Save mode_etage”,“func”:“if (msg.payload === “off”) {\n msg.payload = 0;\n} else {\n msg.payload = 1;\n}\nflow.set(“mode_etage”, msg.payload)\nmsg.payload = flow.get(“mode_etage”)\nreturn msg;”,“outputs”:1,“noerr”:0,“initialize”:"",“finalize”:"",“libs”:[],“x”:870,“y”:240,“wires”:[[“cb293fb75deeaa89”]]},{“id”:“0d66da851a044731”,“type”:“rbe”,“z”:“3737d34f0ebbdcc0”,“name”:“block unless value changes”,“func”:“rbe”,“gap”:"",“start”:"",“inout”:“out”,“septopics”:false,“property”:“payload”,“topi”:“topic”,“x”:600,“y”:180,“wires”:[[“2a9bf928b4de7845”,“a64ef79956c03183”]]},{“id”:“2f452c21e3162a09”,“type”:“server-state-changed”,“z”:“3737d34f0ebbdcc0”,“name”:“listen for changes to state of climate.etage (off/heat)”,“server”:“a6d3a29f.c532”,“version”:4,“exposeToHomeAssistant”:false,“haConfig”:[{“property”:“name”,“value”:""},{“property”:“icon”,“value”:""}],“entityidfilter”:“climate.etage”,“entityidfiltertype”:“exact”,“outputinitially”:false,“state_type”:“str”,“haltifstate”:"",“halt_if_type”:“str”,“halt_if_compare”:“is”,“outputs”:1,“output_only_on_state_change”:true,“for”:“0”,“forType”:“num”,“forUnits”:“minutes”,“ignorePrevStateNull”:false,“ignorePrevStateUnknown”:false,“ignorePrevStateUnavailable”:false,“ignoreCurrentStateUnknown”:false,“ignoreCurrentStateUnavailable”:false,“outputProperties”:[{“property”:“payload”,“propertyType”:“msg”,“value”:"",“valueType”:“entityState”}],“x”:230,“y”:180,“wires”:[[“0d66da851a044731”]]},{“id”:“0356919d3496d30d”,“type”:“telegram sender”,“z”:“3737d34f0ebbdcc0”,“name”:“Info mode salon changé”,“bot”:“2dee45ff92f31786”,“haserroroutput”:false,“outputs”:1,“x”:1370,“y”:120,“wires”:[[]]},{“id”:“cfb95afde96e9771”,“type”:“function”,“z”:“3737d34f0ebbdcc0”,“name”:“Prepare message content”,“func”:“if (msg.payload === 0) {\n msg.payload = “arrêt”;\n} else {\n msg.payload = “automatique”;\n}\nflow.set(“mode_salon_message”, msg.payload)\nmsg.payload = flow.get(“mode_salon_message”)\nmsg.payload = { “options”: { “parse_mode”: “Markdown” }, “type”: “message”, “chatId”: 999999999, “content”: “Le chauffage du salon est passé à " + flow.get(“mode_salon_message”)}\nreturn msg;”,“outputs”:1,“noerr”:0,“initialize”:”",“finalize”:"",“libs”:[],“x”:1110,“y”:120,“wires”:[[“0356919d3496d30d”]]},{“id”:“ccd8bd191a55b95d”,“type”:“telegram sender”,“z”:“3737d34f0ebbdcc0”,“name”:“Info mode étage changé”,“bot”:“2dee45ff92f31786”,“haserroroutput”:false,“outputs”:1,“x”:1370,“y”:240,“wires”:[[]]},{“id”:“cb293fb75deeaa89”,“type”:“function”,“z”:“3737d34f0ebbdcc0”,“name”:“Prepare message content”,“func”:“if (msg.payload === 0) {\n msg.payload = “arrêt”;\n} else {\n msg.payload = “automatique”;\n}\nflow.set(“mode_etage_message”, msg.payload)\nmsg.payload = flow.get(“mode_etage_message”)\nmsg.payload = { “options”: { “parse_mode”: “Markdown” }, “type”: “message”, “chatId”: 999999999, “content”: “Le chauffage de l’étage est passé en mode " + flow.get(“mode_etage_message”)}\nreturn msg;”,“outputs”:1,“noerr”:0,“initialize”:”",“finalize”:"",“libs”:[],“x”:1110,“y”:240,“wires”:[[“ccd8bd191a55b95d”]]},{“id”:“90f9ea5422086ff9”,“type”:“tls-config”,“name”:"",“cert”:"",“key”:"",“ca”:"",“certname”:"",“keyname”:"",“caname”:"",“servername”:"",“verifyservercert”:false,“alpnprotocol”:""},{“id”:“a6d3a29f.c532”,“type”:“server”,“name”:“Home Assistant”,“addon”:true,“rejectUnauthorizedCerts”:true,“ha_boolean”:"",“connectionDelay”:false,“cacheJson”:false,“heartbeat”:false,“heartbeatInterval”:"",“areaSelector”:“friendlyName”,“entitySelector”:“id”,“statusSeparator”:"/",“statusYear”:“numeric”,“statusMonth”:“2-digit”,“statusDay”:“2-digit”,“statusHourCycle”:“h23”,“statusTimeFormat”:“h:m:s”,“enableGlobalContextStore”:false},{“id”:“2dee45ff92f31786”,“type”:“telegram bot”,“botname”:“Domotic_Panissage_bot”,“usernames”:“user”,“chatids”:“999999999”,“baseapiurl”:"",“updatemode”:“polling”,“pollinterval”:“300”,“usesocks”:false,“sockshost”:"",“socksprotocol”:“socks5”,“socksport”:“6667”,“socksusername”:“anonymous”,“sockspassword”:"",“bothost”:"",“botpath”:"",“localbotport”:“8443”,“publicbotport”:“8443”,“privatekey”:"",“certificate”:"",“useselfsignedcertificate”:false,“sslterminated”:false,“verboselogging”:false,“credentials”:{}}]