Last active
November 19, 2023 11:13
-
-
Save Lineflyer/f2553ef3005f61956d2ac26def727cca to your computer and use it in GitHub Desktop.
NodeRed HiSense API
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"id": "10f3a88c8dbdee8a", | |
"type": "http request", | |
"z": "66a999a67a9a1aec", | |
"name": "Get list of appliances", | |
"method": "GET", | |
"ret": "obj", | |
"paytoqs": "ignore", | |
"url": "https://api.connectlife.io/api/v1/appliance", | |
"tls": "", | |
"persist": false, | |
"proxy": "", | |
"insecureHTTPParser": false, | |
"authType": "bearer", | |
"senderr": false, | |
"headers": [ | |
{ | |
"keyType": "other", | |
"keyValue": "accept", | |
"valueType": "other", | |
"valueValue": " application/json" | |
} | |
], | |
"x": 480, | |
"y": 220, | |
"wires": [ | |
[ | |
"4de7f1e9d681f27d" | |
] | |
] | |
}, | |
{ | |
"id": "4de7f1e9d681f27d", | |
"type": "debug", | |
"z": "66a999a67a9a1aec", | |
"name": "debug 74", | |
"active": true, | |
"tosidebar": true, | |
"console": false, | |
"tostatus": false, | |
"complete": "false", | |
"statusVal": "", | |
"statusType": "auto", | |
"x": 740, | |
"y": 220, | |
"wires": [] | |
}, | |
{ | |
"id": "cdfe730c01c63ad2", | |
"type": "inject", | |
"z": "66a999a67a9a1aec", | |
"name": "", | |
"props": [ | |
{ | |
"p": "payload" | |
}, | |
{ | |
"p": "topic", | |
"vt": "str" | |
} | |
], | |
"repeat": "", | |
"crontab": "", | |
"once": false, | |
"onceDelay": 0.1, | |
"topic": "", | |
"payload": "", | |
"payloadType": "date", | |
"x": 260, | |
"y": 220, | |
"wires": [ | |
[ | |
"10f3a88c8dbdee8a" | |
] | |
] | |
}, | |
{ | |
"id": "f3d86d57cb780303", | |
"type": "http request", | |
"z": "66a999a67a9a1aec", | |
"name": "Get properties of appliance(s)", | |
"method": "GET", | |
"ret": "obj", | |
"paytoqs": "ignore", | |
"url": "https://api.connectlife.io/api/v1/appliance/<your_appliance_ID_here>", | |
"tls": "", | |
"persist": false, | |
"proxy": "", | |
"insecureHTTPParser": false, | |
"authType": "bearer", | |
"senderr": false, | |
"headers": [ | |
{ | |
"keyType": "other", | |
"keyValue": "accept", | |
"valueType": "other", | |
"valueValue": " application/json" | |
} | |
], | |
"x": 570, | |
"y": 380, | |
"wires": [ | |
[ | |
"9976b6b88a08b71c" | |
] | |
] | |
}, | |
{ | |
"id": "85467a7e54bcb132", | |
"type": "inject", | |
"z": "66a999a67a9a1aec", | |
"name": "Jede Minute", | |
"props": [ | |
{ | |
"p": "payload" | |
}, | |
{ | |
"p": "topic", | |
"vt": "str" | |
} | |
], | |
"repeat": "60", | |
"crontab": "", | |
"once": false, | |
"onceDelay": 0.1, | |
"topic": "", | |
"payload": "", | |
"payloadType": "date", | |
"x": 280, | |
"y": 380, | |
"wires": [ | |
[ | |
"f3d86d57cb780303" | |
] | |
] | |
}, | |
{ | |
"id": "9976b6b88a08b71c", | |
"type": "debug", | |
"z": "66a999a67a9a1aec", | |
"name": "debug 75", | |
"active": true, | |
"tosidebar": true, | |
"console": false, | |
"tostatus": false, | |
"complete": "false", | |
"statusVal": "", | |
"statusType": "auto", | |
"x": 880, | |
"y": 380, | |
"wires": [] | |
}, | |
{ | |
"id": "50069460381d50bd", | |
"type": "http request", | |
"z": "66a999a67a9a1aec", | |
"name": "Send properties to appliance", | |
"method": "POST", | |
"ret": "obj", | |
"paytoqs": "body", | |
"url": "https://api.connectlife.io/api/v1/appliance", | |
"tls": "", | |
"persist": false, | |
"proxy": "", | |
"insecureHTTPParser": false, | |
"authType": "bearer", | |
"senderr": false, | |
"headers": [ | |
{ | |
"keyType": "other", | |
"keyValue": "accept", | |
"valueType": "other", | |
"valueValue": " application/json" | |
}, | |
{ | |
"keyType": "other", | |
"keyValue": "Content-Type", | |
"valueType": "other", | |
"valueValue": "application/json" | |
} | |
], | |
"x": 600, | |
"y": 520, | |
"wires": [ | |
[ | |
"783c632442d61319" | |
] | |
] | |
}, | |
{ | |
"id": "783c632442d61319", | |
"type": "debug", | |
"z": "66a999a67a9a1aec", | |
"name": "debug 76", | |
"active": true, | |
"tosidebar": true, | |
"console": false, | |
"tostatus": false, | |
"complete": "false", | |
"statusVal": "", | |
"statusType": "auto", | |
"x": 880, | |
"y": 520, | |
"wires": [] | |
}, | |
{ | |
"id": "8586078c30dd459c", | |
"type": "function", | |
"z": "66a999a67a9a1aec", | |
"name": "Set Temperature", | |
"func": "msg.payload = [\n {\n \"id\": \"<your_appliance_id_here\",\n \"properties\": {\n \"SetTemperature\": \"22\"\n }\n }\n]\nreturn msg;", | |
"outputs": 1, | |
"noerr": 0, | |
"initialize": "", | |
"finalize": "", | |
"libs": [], | |
"x": 260, | |
"y": 520, | |
"wires": [ | |
[ | |
"50069460381d50bd" | |
] | |
] | |
}, | |
{ | |
"id": "e6e0120df26cd375", | |
"type": "comment", | |
"z": "66a999a67a9a1aec", | |
"name": "ConnectLife API (HiSense)", | |
"info": "", | |
"x": 290, | |
"y": 100, | |
"wires": [] | |
}, | |
{ | |
"id": "a96e122d7ccf5122", | |
"type": "comment", | |
"z": "66a999a67a9a1aec", | |
"name": "Get list of appliances. Enter your bearer token HTTP node.", | |
"info": "", | |
"x": 390, | |
"y": 180, | |
"wires": [] | |
}, | |
{ | |
"id": "4d18d432be62512f", | |
"type": "comment", | |
"z": "66a999a67a9a1aec", | |
"name": "Get current values. Enter bearer token in HTTP node and append URL with your appliance ID (multiple IDs seperated by ;)", | |
"info": "", | |
"x": 590, | |
"y": 320, | |
"wires": [] | |
}, | |
{ | |
"id": "596ef8c7a2f5c171", | |
"type": "comment", | |
"z": "66a999a67a9a1aec", | |
"name": "Example of setting a property (here: temperature). Enter bearer token in HTTP node and fill in appliance ID in function", | |
"info": "", | |
"x": 570, | |
"y": 480, | |
"wires": [] | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment