here is one flow of an automated dehumidifier.
[{"id":"7d7cb63f8c0a21c6","type":"tab","label":"Flow 1","disabled":false,"info":"","env":[]},{"id":"ec15b7d158cc3a11","type":"inject","z":"7d7cb63f8c0a21c6","name":"Entfeuchter check","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"30","crontab":"","once":false,"onceDelay":0.1,"topic":"smartswitch/Entfeuchter/power/get","payload":"","payloadType":"str","x":150,"y":120,"wires":[["c515f144a8b599f9"]]},{"id":"c515f144a8b599f9","type":"function","z":"7d7cb63f8c0a21c6","name":"MQTTtoHTTP-Entfeuchter","func":"var EntfeuchterWatertankFull = global.get('EntfeuchterWatertankFull') || 0\n\nif (msg.topic == 'smartswitch/Entfeuchter/power/set' && EntfeuchterWatertankFull != 1) {\n if (msg.payload == '0'){\n global.set('Entfeuchter', 0);\n msg.url = 'http://192.168.10.242/control?cmd=event,poweroff';\n } else if (msg.payload == '1'){\n global.set('Entfeuchter', 1);\n msg.url = 'http://192.168.10.242/control?cmd=event,poweron';\n } else if (msg.payload == '2') {\n global.set('Entfeuchter', 2);\n msg.url = 'http://192.168.10.242/control?cmd=event,poweroff';\n } else if (msg.payload == '3') {\n global.set('Entfeuchter', 3);\n msg.url = 'http://192.168.10.242/control?cmd=event,poweron';\n } else {\n return null;\n }\n} else if (msg.topic == 'smartswitch/Entfeuchter/power/get') {\n msg.url = 'http://192.168.10.242/json?view=sensorupdate&tasknr=4'\n} else if (msg.topic == 'smartswitch/Entfeuchter/setreachable') {\n msg.url = 'http://192.168.10.242/control?cmd=event,setreachable'\n} else {\n return null;\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":520,"y":40,"wires":[["29705d1aa1f432a2"]]},{"id":"29705d1aa1f432a2","type":"http request","z":"7d7cb63f8c0a21c6","name":"EntfeuchterSwitch","method":"GET","ret":"obj","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","authType":"","senderr":false,"credentials":{},"x":490,"y":80,"wires":[["f6c769b1b9828175"]]},{"id":"f6c769b1b9828175","type":"function","z":"7d7cb63f8c0a21c6","name":"SetEntfeuchterState","func":"var Entfeuchter = global.get('Entfeuchter') || 0;\n\nif (msg.topic == \"smartswitch/Entfeuchter/power/set\" && msg.payload == \"OK\" && msg.statusCode == 200){\n // switch change state to on or off? check again ...\n node.warn(\"check new state line 7\")\n check1 = {}\n check1.topic = 'smartswitch/Entfeuchter/power/get';\n check1.payload = '';\n return [check1, null]\n //node.send(check1);\n /*if (Entfeuchter == 0){\n global.set('Entfeuchter', 1);\n } else if (Entfeuchter == 2){\n global.set('Entfeuchter', 3);\n }*/\n/*} else if (msg.topic == \"smartswitch/Entfeuchter/power/set\" && msg.payload == \"OK\" && msg.statusCode == 200){\n // switch change state to off\n node.warn(\"check new state line 19\")\n check2 = {}\n check2.topic = 'smartswitch/Entfeuchter/power/get';\n check2.payload = '';\n return [check2, null]\n //node.send(check2);\n if (Entfeuchter == 1){\n global.set('Entfeuchter', 0);\n } else if (Entfeuchter == 3){\n global.set('Entfeuchter', 2);\n }*/ \n} else if (msg.topic == \"smartswitch/Entfeuchter/power/get\" && msg.payload.TaskValues[0].Value == 1) {\n // status request shows switch is on\n if (Entfeuchter != 1 && Entfeuchter != 3) {\n global.set('Entfeuchter', 1);\n /*rectify1 = {}\n rectify1.topic = 'smartswitch/Entfeuchter/power/set';\n rectify1.payload = '1';\n node.send(rectify1);*/\n //node.warn(\"line 39.\");\n }\n setreachable = {}\n setreachable.topic = 'smartswitch/Entfeuchter/setreachable';\n setreachable.payload = ''\n node.send(setreachable);\n} else if (msg.topic == \"smartswitch/Entfeuchter/power/get\" && msg.payload.TaskValues[0].Value == 0) {\n // status request shows switch is off\n if (Entfeuchter != 0 && Entfeuchter != 2) {\n global.set('Entfeuchter', 0);\n /*rectify2 = {}\n rectify2.topic = 'smartswitch/Entfeuchter/power/set';\n rectify2.payload = '0';\n node.send(rectify2);*/\n //node.warn(\"line 49.\");\n }\n setreachable = {}\n setreachable.topic = 'smartswitch/Entfeuchter/setreachable';\n setreachable.payload = ''\n node.send(setreachable);\n} else {\n // status request shows unchanged, only announce current runningtime\n}\n\nEntfeuchter = global.get('Entfeuchter') || 0;\n\nvar updatephp = {\n \"method\" : \"GET\",\n\t\"url\" : \"http://192.168.0.250/apcucollector.php?smartswitch=Entfeuchter&power=\" + Entfeuchter\n};\n\nreturn [null, updatephp]","outputs":2,"noerr":0,"initialize":"","finalize":"","libs":[],"x":500,"y":120,"wires":[[],[]]},{"id":"55b6eb296b54f8ba","type":"inject","z":"7d7cb63f8c0a21c6","name":"Auto aus","props":[{"p":"payload","v":"0","vt":"str"},{"p":"topic","v":"smartswitch/Entfeuchter/power/set","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"smartswitch/Entfeuchter/power/set","payload":"0","payloadType":"str","x":120,"y":80,"wires":[["c515f144a8b599f9"]]},{"id":"8ce3aaaf5d33ff09","type":"inject","z":"7d7cb63f8c0a21c6","name":"Auto ein","props":[{"p":"payload","v":"1","vt":"str"},{"p":"topic","v":"smartswitch/Entfeuchter/power/set","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"smartswitch/Entfeuchter/power/set","payload":"1","payloadType":"str","x":120,"y":40,"wires":[["c515f144a8b599f9"]]},{"id":"84f0bb2ae0fbbdd2","type":"inject","z":"7d7cb63f8c0a21c6","name":"Man ein","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"smartswitch/Entfeuchter/power/set","payload":"3","payloadType":"str","x":270,"y":40,"wires":[["c515f144a8b599f9"]]},{"id":"bc4e910fdcf6a235","type":"inject","z":"7d7cb63f8c0a21c6","name":"Man aus","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"smartswitch/Entfeuchter/power/set","payload":"2","payloadType":"str","x":280,"y":80,"wires":[["c515f144a8b599f9"]]}]
the reply of e.g. http://192.168.10.242/json?view=sensorupdate&tasknr=4 is:
{
"TaskValues": [
{"ValueNumber":1,
"Name":"State",
"NrDecimals":0,
"Value":1
},
{"ValueNumber":2,
"Name":"Unused",
"NrDecimals":0,
"Value":0
},
{"ValueNumber":3,
"Name":"UpdTS",
"NrDecimals":0,
"Value":33873
}],
"TTL":1000,
"TaskEnabled":"true",
"TaskNumber":4
}
or e.g. another valid json-response from another espeasy device (http://192.168.10.243/control?cmd=status,GPIO,2) is:
{
"log": "",
"plugin": 1,
"pin": 2,
"mode": "output",
"state": 1
}
while the reply of all commands starting with "control?cmd=event,..." is only plain "OK" without any json (btw. I also opened a feature request to espeasy to have this fixed: possibility to reply JSON for rule events · Issue #4019 · letscontrolit/ESPEasy · GitHub )
on espeasy I created rules which are quite powerful. So on the espeasy device I measure runtime, etc. which is pushed periodically to my php scripts, which then offers the data combined to a php webpage where I can interact via http directly with the ESP devices.
node red has mostly "only" logic for 10-secondly ask PV inverter (by http) with smartmeter (same by http) for too much sunpower which needs to be distributed over different units in the house (all of them are also http). before getting into node-red I had this all completely in python-scripts, which were much more complicated and unhandy for debugging.
e.g. with the http://192.168.10.242/control?cmd=event,setreachable command I tell every 30 seconds the affected espeasy device that it still has network connectivity. as soon as the esp-device does not get these requests it does power off as at this stage I maybe do not want to consume electricity power as the sun is shaded.
for each of the http://192.168.10.242/control?cmd=event,setreachable calls I get the json parse error.
also the custom event,poweron or event,poweroff are spitting the json parse error. 
so, it sounds like it is more or less placing a function between the HTTP request node and the follow-up function?
Thanks.