Sowas zum Beispiel, gerade mal zusammengebaut:
Hier wir UNREACH
im Flow zwischengespeichert, da der Wert ja nur selten übertragen wird. Könnte man genauso in eine Datenbank (o.ä.) packen.
Beim Request wird dann der flow-Array ausgelesen, in JSON konvertiert und ausgegeben.
[{"id":"eec78e7.e4a717","type":"variable-in","namespace":"variable","z":"f82cf230.23b0d","variabletype":"device","family":"0","peerid":"4","channel":"0","variable":"UNREACH","refractoryperiod":"200","outputonstartup":true,"loopprevention":false,"looppreventiongroup":"","name":"","x":210,"y":120,"wires":[[{"id":"6ebdaa1.7a79754","port":0}]]},{"id":"6ebdaa1.7a79754","type":"function","namespace":"function","z":"f82cf230.23b0d","name":"write to unreachData","func":"$unreachData = getFlowData('unreach');\nif(!is_array($unreachData)){\n $unreachData = [];\n}\n\n$peerId = $message['peerId'];\n$unreachData[$peerId] = $message['payload'];\nsetFlowData('unreach', $unreachData);\n//$message = ['payload' => $unreachData];\n\nreturn null;","inputs":1,"outputs":1,"noerr":0,"x":405,"y":120,"wires":[[]]},{"id":"be3cfbba.c853c8","type":"http-in","namespace":"http","z":"f82cf230.23b0d","name":"","server":"969c04f6.a894a8","url":"/unreach.json","method":"get","upload":false,"swaggerDoc":"","x":120,"y":280,"wires":[[{"id":"6b47a798.ba6528","port":0}]]},{"id":"6b47a798.ba6528","type":"function","namespace":"function","z":"f82cf230.23b0d","name":"get unreachData","func":"$unreachData = getFlowData('unreach');\nif(!is_array($unreachData)){\n $unreachData = [];\n}\n\n$message['payload'] = $unreachData;\nreturn $message;","inputs":1,"outputs":1,"noerr":0,"x":285,"y":280,"wires":[[{"id":"dbf998dc.c79318","port":0}]]},{"id":"dbf998dc.c79318","type":"json","namespace":"parsers","z":"f82cf230.23b0d","name":"","x":440,"y":280,"wires":[[{"id":"916c5caa.f0308","port":0}]]},{"id":"916c5caa.f0308","type":"http-response","namespace":"http","z":"f82cf230.23b0d","name":"","server":"969c04f6.a894a8","statusCode":"","headers":{"Content-Type":"application/json"},"x":570,"y":280,"wires":[]},{"id":"71189892.cb5cb8","type":"variable-in","namespace":"variable","z":"f82cf230.23b0d","variabletype":"device","family":"0","peerid":"14","channel":"0","variable":"UNREACH","refractoryperiod":"200","outputonstartup":true,"loopprevention":false,"looppreventiongroup":"","name":"","x":205,"y":170,"wires":[[{"id":"6ebdaa1.7a79754","port":0}]]},{"id":"969c04f6.a894a8","type":"http-server","namespace":"http","z":"","listenaddress":"::","port":"8080","usetls":false}]
Lässt sich dann über http://<homegear-ip>:8080/unreach.json
aufrufen, je nachdem was du im http-input-node eingestellt hast.
Sowas macht eventbasiert über mqtt aber eventuell mehr Sinn.