Hi - I have an addition issue so rather than creating a new thread I thought I would raise it here.
I took the solution above and use the excellent NRCHKB Homekit Nodes to create thermostats visible in Homekit. I take the array address and convert it into the value for homekit but I cannot seem to get the value displayed correctly or I get the wrong value from an adjacent location in the array. I know the homekit side works correctly as I use the inject flows which work correctly so the issue seems to be with the change node.
Also the entire array is fed to the Homekit node which pops up on the debug screen suggesting I use the data for homekit values.
Flow is below:-
[{"id":"9e2c5b1645baf0f0","type":"http request","z":"47ba1a0f00220633","name":"","method":"GET","ret":"txt","paytoqs":"ignore","url":"http://192.168.1.230/quickview.htm","tls":"","persist":false,"proxy":"","authType":"basic","senderr":false,"x":610,"y":400,"wires":[["3f91382f.17e918"]]},{"id":"07b3ed46b4355073","type":"inject","z":"47ba1a0f00220633","d":true,"name":"Ten Second polling","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"30","crontab":"","once":true,"onceDelay":"1","topic":"","payload":"","payloadType":"date","x":400,"y":400,"wires":[["9e2c5b1645baf0f0"]]},{"id":"5ff97a88.a2b72c","type":"inject","z":"47ba1a0f00220633","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":400,"y":500,"wires":[["5c7fc6bb.dd1848"]]},{"id":"5c7fc6bb.dd1848","type":"template","z":"47ba1a0f00220633","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"<html>\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=us-ascii\">\n<meta http-equiv=\"Content-Language\" content=\"en-gb\">\n<meta http-equiv=\"Cache-Control\" content=\"no-cache, must-revalidate\"> \n<script src=\"hmck.js\" language=\"Javascript\"></script>\n</head>\n\n<body topmargin=0 leftmargin=0 rightmargin=0 bgcolor=#6E6FB0 style=\"overflow-x:hidden;overflow-y:auto\">\n<form name=\"hidFrm\">\n\t<input type=\"hidden\" name=\"hmcookies\" value=\"00000000\">\n<input type=\"hidden\" name=\"quickview\" value=\"201900191603211803211903211603\">\n\t<input type=\"hidden\" name=\"statname\" value=\"Office#Sitting room#Kitchen#Utility#Dining#West Bedroom#Kitchen#Utility#Dining#Room 10#Landing#West Bedroom#N/A#Ext Bedroom#Pink bedroom#Becca Bedroom #Becca Study#Room 18#Room 19#Room 20#Room 21#Room 22#Room 23#Room 24#Room 25#Room 26#Room 27#Room ...","output":"str","x":600,"y":500,"wires":[["3f91382f.17e918"]]},{"id":"3f91382f.17e918","type":"html","z":"47ba1a0f00220633","name":"","property":"payload","outproperty":"payload","tag":"input[name=quickview]","ret":"attr","as":"single","x":870,"y":400,"wires":[["d68e5b46.28ad3","141629de88486f01"]]},{"id":"d68e5b46.28ad3","type":"function","z":"47ba1a0f00220633","name":"","func":"msg.payload = msg.payload[0].value.match(/.{1,2}/g);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1100,"y":400,"wires":[["c87fe13cf22c30b3","d572efe0f6b1a88c","fde8072ecfaac2aa","19bb0b1b2d9692fd","9204d1d71e9e3aab","c7b0b3f8670f2237","2ac5c9d43a677131","0b825af80cbfa704","6c0457072aff829d","81b5e11a09f44052","3a4daf76245d6dcb","8a7428bad02bc17d"]]},{"id":"706b31661d218647","type":"inject","z":"47ba1a0f00220633","name":"CurrentHeatingCoolingState off","props":[{"p":"payload","v":"{\"CurrentHeatingCoolingState\":0}","vt":"json"},{"p":"topic","v":"","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"CurrentHeatingCoolingState\":0}","payloadType":"json","x":1050,"y":1140,"wires":[["f2db15d046e513cd"]]},{"id":"477f61a7667d05e1","type":"inject","z":"47ba1a0f00220633","name":"CurrentTemperature 10","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"CurrentTemperature\":10}","payloadType":"json","x":1020,"y":840,"wires":[["f2db15d046e513cd"]]},{"id":"f71fa27ce8a18093","type":"inject","z":"47ba1a0f00220633","name":"TargetTemperature 10","props":[{"p":"payload","v":"{\"TargetTemperature\":10}","vt":"json"},{"p":"topic","v":"","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"TargetTemperature\":10}","payloadType":"json","x":1020,"y":980,"wires":[["f2db15d046e513cd"]]},{"id":"33d9bdbb991c7b09","type":"inject","z":"47ba1a0f00220633","name":"CurrentHeatingCoolingState heat","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"CurrentHeatingCoolingState\":1}","payloadType":"json","x":1050,"y":1100,"wires":[["f2db15d046e513cd"]]},{"id":"f3edfe24fd4648d5","type":"inject","z":"47ba1a0f00220633","name":"CurrentTemperature 20","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"CurrentTemperature\":20}","payloadType":"json","x":1020,"y":880,"wires":[["f2db15d046e513cd"]]},{"id":"6b2687d8a54607ee","type":"inject","z":"47ba1a0f00220633","name":"CurrentTemperature 30","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"CurrentTemperature\":30}","payloadType":"json","x":1020,"y":920,"wires":[["f2db15d046e513cd"]]},{"id":"efe725a144d22e45","type":"inject","z":"47ba1a0f00220633","name":"TargetTemperature 30","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"TargetTemperature\":30}","payloadType":"json","x":1020,"y":1060,"wires":[["f2db15d046e513cd"]]},{"id":"f2db15d046e513cd","type":"homekit-service","z":"47ba1a0f00220633","d":true,"isParent":true,"hostType":"0","bridge":"530ed3d.064b6ac","accessoryId":"","parentService":"","name":"Office","serviceName":"Thermostat","topic":"","filter":false,"manufacturer":"Dick's Garage","model":"Default Model","serialNo":"Default Serial Number","firmwareRev":"","hardwareRev":"","softwareRev":"","cameraConfigVideoProcessor":"","cameraConfigSource":"","cameraConfigStillImageSource":"","cameraConfigMaxStreams":"","cameraConfigMaxWidth":"","cameraConfigMaxHeight":"","cameraConfigMaxFPS":"","cameraConfigMaxBitrate":"","cameraConfigVideoCodec":"","cameraConfigAudioCodec":"","cameraConfigAudio":false,"cameraConfigPacketSize":"","cameraConfigVerticalFlip":false,"cameraConfigHorizontalFlip":false,"cameraConfigMapVideo":"","cameraConfigMapAudio":"","cameraConfigVideoFilter":"","cameraConfigAdditionalCommandLine":"","cameraConfigDebug":false,"cameraConfigSnapshotOutput":"disabled","cameraConfigInterfaceName":"","characteristicProperties":"{\"TargetHeatingCoolingState\":{\"validValues\":[0,1]},\"CurrentHeatingCoolingState\":{\"validValues\":[0,1]}}","waitForSetupMsg":false,"outputs":2,"x":1470,"y":600,"wires":[[],[]]},{"id":"ccd6f3af24aee4f2","type":"inject","z":"47ba1a0f00220633","name":"TargetTemperature 20","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"TargetTemperature\":20}","payloadType":"json","x":1020,"y":1020,"wires":[["f2db15d046e513cd"]]},{"id":"c87fe13cf22c30b3","type":"change","z":"47ba1a0f00220633","name":"Set payload to HkMsg Temperature","rules":[{"t":"move","p":"payload[0]","pt":"msg","to":"payload.CurrentTemperature","tot":"msg"},{"t":"move","p":"payload[1]","pt":"msg","to":"payload.TargetTemperature","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1060,"y":600,"wires":[["f2db15d046e513cd","839f15baad774adf"]]},{"id":"d572efe0f6b1a88c","type":"switch","z":"47ba1a0f00220633","name":"Office status","property":"payload[2]","propertyType":"msg","rules":[{"t":"eq","v":"00","vt":"str"},{"t":"eq","v":"01","vt":"str"},{"t":"eq","v":"10","vt":"str"},{"t":"eq","v":"11","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":730,"y":620,"wires":[["498500952a6b4b30"],["cbcd317563b9ba05"],["f65df23476921b26"],["163e7372e450ba73"]]},{"id":"498500952a6b4b30","type":"change","z":"47ba1a0f00220633","name":"CH/HW off","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\"CurrentHeatingCoolingState\":0}","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":990,"y":660,"wires":[["f2db15d046e513cd"]]},{"id":"f65df23476921b26","type":"change","z":"47ba1a0f00220633","name":"CH on HW off","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\"CurrentHeatingCoolingState\":1}","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":1000,"y":740,"wires":[["f2db15d046e513cd"]]},{"id":"cbcd317563b9ba05","type":"change","z":"47ba1a0f00220633","name":"CH off HW on","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\"CurrentHeatingCoolingState\":0}","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":1000,"y":700,"wires":[["f2db15d046e513cd"]]},{"id":"163e7372e450ba73","type":"change","z":"47ba1a0f00220633","name":"CH on HW on","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\"CurrentHeatingCoolingState\":1}","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":1000,"y":780,"wires":[["f2db15d046e513cd"]]},{"id":"fde8072ecfaac2aa","type":"debug","z":"47ba1a0f00220633","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload[0]","targetType":"msg","statusVal":"","statusType":"auto","x":1840,"y":240,"wires":[]},{"id":"9204d1d71e9e3aab","type":"debug","z":"47ba1a0f00220633","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload[2]","targetType":"msg","statusVal":"","statusType":"auto","x":1840,"y":320,"wires":[]},{"id":"19bb0b1b2d9692fd","type":"debug","z":"47ba1a0f00220633","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload[1]","targetType":"msg","statusVal":"","statusType":"auto","x":1840,"y":280,"wires":[]},{"id":"0b825af80cbfa704","type":"debug","z":"47ba1a0f00220633","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload[5]","targetType":"msg","statusVal":"","statusType":"auto","x":1840,"y":440,"wires":[]},{"id":"81b5e11a09f44052","type":"debug","z":"47ba1a0f00220633","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload[7]","targetType":"msg","statusVal":"","statusType":"auto","x":1840,"y":520,"wires":[]},{"id":"6c0457072aff829d","type":"debug","z":"47ba1a0f00220633","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload[6]","targetType":"msg","statusVal":"","statusType":"auto","x":1840,"y":480,"wires":[]},{"id":"2ac5c9d43a677131","type":"debug","z":"47ba1a0f00220633","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload[4]","targetType":"msg","statusVal":"","statusType":"auto","x":1840,"y":400,"wires":[]},{"id":"c7b0b3f8670f2237","type":"debug","z":"47ba1a0f00220633","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload[3]","targetType":"msg","statusVal":"","statusType":"auto","x":1840,"y":360,"wires":[]},{"id":"94e842136cf1da15","type":"inject","z":"47ba1a0f00220633","name":"CurrentHeatingCoolingState off","props":[{"p":"payload","v":"{\"CurrentHeatingCoolingState\":0}","vt":"json"},{"p":"topic","v":"","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"CurrentHeatingCoolingState\":0}","payloadType":"json","x":1030,"y":1780,"wires":[["dd6dc0b0268b2883"]]},{"id":"59ab12093a52eb34","type":"inject","z":"47ba1a0f00220633","name":"CurrentTemperature 10","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"CurrentTemperature\":10}","payloadType":"json","x":1000,"y":1480,"wires":[["dd6dc0b0268b2883"]]},{"id":"daf393a52f2f6d42","type":"inject","z":"47ba1a0f00220633","name":"TargetTemperature 10","props":[{"p":"payload","v":"{\"TargetTemperature\":10}","vt":"json"},{"p":"topic","v":"","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"TargetTemperature\":10}","payloadType":"json","x":1000,"y":1620,"wires":[["dd6dc0b0268b2883"]]},{"id":"a321a694af8d4877","type":"inject","z":"47ba1a0f00220633","name":"CurrentHeatingCoolingState heat","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"CurrentHeatingCoolingState\":1}","payloadType":"json","x":1030,"y":1740,"wires":[["dd6dc0b0268b2883"]]},{"id":"22849530b6a71a2e","type":"inject","z":"47ba1a0f00220633","name":"CurrentTemperature 20","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"CurrentTemperature\":20}","payloadType":"json","x":1000,"y":1520,"wires":[["dd6dc0b0268b2883"]]},{"id":"feb007b1cbfb5355","type":"inject","z":"47ba1a0f00220633","name":"CurrentTemperature 30","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"CurrentTemperature\":30}","payloadType":"json","x":1000,"y":1560,"wires":[["dd6dc0b0268b2883"]]},{"id":"b5083faa2456726b","type":"inject","z":"47ba1a0f00220633","name":"TargetTemperature 30","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"TargetTemperature\":30}","payloadType":"json","x":1000,"y":1700,"wires":[["dd6dc0b0268b2883"]]},{"id":"dd6dc0b0268b2883","type":"homekit-service","z":"47ba1a0f00220633","d":true,"isParent":true,"hostType":"0","bridge":"530ed3d.064b6ac","accessoryId":"","parentService":"","name":"Lounge","serviceName":"Thermostat","topic":"","filter":false,"manufacturer":"Dick's Garage","model":"Default Model","serialNo":"Default Serial Number","firmwareRev":"","hardwareRev":"","softwareRev":"","cameraConfigVideoProcessor":"","cameraConfigSource":"","cameraConfigStillImageSource":"","cameraConfigMaxStreams":"","cameraConfigMaxWidth":"","cameraConfigMaxHeight":"","cameraConfigMaxFPS":"","cameraConfigMaxBitrate":"","cameraConfigVideoCodec":"","cameraConfigAudioCodec":"","cameraConfigAudio":false,"cameraConfigPacketSize":"","cameraConfigVerticalFlip":false,"cameraConfigHorizontalFlip":false,"cameraConfigMapVideo":"","cameraConfigMapAudio":"","cameraConfigVideoFilter":"","cameraConfigAdditionalCommandLine":"","cameraConfigDebug":false,"cameraConfigSnapshotOutput":"disabled","cameraConfigInterfaceName":"","characteristicProperties":"{\"TargetHeatingCoolingState\":{\"validValues\":[0,1]},\"CurrentHeatingCoolingState\":{\"validValues\":[0,1]}}","waitForSetupMsg":false,"outputs":2,"x":1460,"y":1240,"wires":[[],[]]},{"id":"a89e86a0b2ee3f2b","type":"inject","z":"47ba1a0f00220633","name":"TargetTemperature 20","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"TargetTemperature\":20}","payloadType":"json","x":1000,"y":1660,"wires":[["dd6dc0b0268b2883"]]},{"id":"8a7428bad02bc17d","type":"change","z":"47ba1a0f00220633","name":"Set playload to HkMsg Temperature","rules":[{"t":"move","p":"payload[3]","pt":"msg","to":"payload.CurrentTemperature","tot":"msg"},{"t":"move","p":"payload[4]","pt":"msg","to":"payload.TargetTemperature","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1050,"y":1240,"wires":[["dd6dc0b0268b2883"]]},{"id":"3a4daf76245d6dcb","type":"switch","z":"47ba1a0f00220633","name":"Lounge","property":"payload[5]","propertyType":"msg","rules":[{"t":"eq","v":"00","vt":"str"},{"t":"eq","v":"01","vt":"str"},{"t":"eq","v":"10","vt":"str"},{"t":"eq","v":"11","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":700,"y":1260,"wires":[["fec462f02be3504c"],["0337762b27744b24"],["e7819a604aefe17d"],["21ba47f1c080b63c"]]},{"id":"fec462f02be3504c","type":"change","z":"47ba1a0f00220633","name":"CH/HW off","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\"CurrentHeatingCoolingState\":0}","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":970,"y":1300,"wires":[["dd6dc0b0268b2883"]]},{"id":"e7819a604aefe17d","type":"change","z":"47ba1a0f00220633","name":"CH on HW off","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\"CurrentHeatingCoolingState\":1}","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":980,"y":1380,"wires":[["dd6dc0b0268b2883"]]},{"id":"0337762b27744b24","type":"change","z":"47ba1a0f00220633","name":"CH off HW on","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\"CurrentHeatingCoolingState\":0}","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":980,"y":1340,"wires":[["dd6dc0b0268b2883"]]},{"id":"21ba47f1c080b63c","type":"change","z":"47ba1a0f00220633","name":"CH on HW on","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\"CurrentHeatingCoolingState\":1}","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":980,"y":1420,"wires":[["dd6dc0b0268b2883"]]},{"id":"839f15baad774adf","type":"debug","z":"47ba1a0f00220633","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1490,"y":660,"wires":[]},{"id":"141629de88486f01","type":"debug","z":"47ba1a0f00220633","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1110,"y":300,"wires":[]},{"id":"530ed3d.064b6ac","type":"homekit-bridge","bridgeName":"Nodered","pinCode":"111-11-111","port":"","allowInsecureRequest":false,"manufacturer":"NRCHKB","model":"1.2.0","serialNo":"Default Serial Number","firmwareRev":"1.2.0","hardwareRev":"1.2.0","softwareRev":"1.2.0","customMdnsConfig":false,"mdnsMulticast":true,"mdnsInterface":"","mdnsPort":"","mdnsIp":"","mdnsTtl":"","mdnsLoopback":true,"mdnsReuseAddr":true,"allowMessagePassthrough":true}]
Any help is greatly appreciated.
Thanks