I will process the feedback data from TCP request to MQTT. I send command via terminal and TCP request result as in picture, but in switch "matches regex" no result.
I will take feedback data from TCP Request to send to MQTT (switch on/off)
switch On
zone/878
Level:100
SwitchedLevel:On
switch Off
zone/878
Level:0
SwitchedLevel:Off
thak's
[{"id":"fddf94689565f33f","type":"inject","z":"65926043be73d021","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":80,"y":120,"wires":[["ce972602ec7da656"]]},{"id":"ce972602ec7da656","type":"change","z":"65926043be73d021","name":"On","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\"CommuniqueType\":\"CreateRequest\",\"Header\":{\"Url\":\"/zone/878/commandprocessor\"},\"Body\":{\"Command\":{\"CommandType\":\"GoToSwitchedLevel\",\"SwitchedLevelParameters\":{\"SwitchedLevel\":\"On\"}}}}","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":250,"y":120,"wires":[["e1c9e1c102213bb0"]]},{"id":"e1c9e1c102213bb0","type":"function","z":"65926043be73d021","name":"","func":"msg.payload += \"\\n\"\nreturn msg","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":420,"y":160,"wires":[["5cb5b26f993b7537"]]},{"id":"5e34b1c978df002f","type":"change","z":"65926043be73d021","name":"Off","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\"CommuniqueType\":\"CreateRequest\",\"Header\":{\"Url\":\"/zone/878/commandprocessor\"},\"Body\":{\"Command\":{\"CommandType\":\"GoToSwitchedLevel\",\"SwitchedLevelParameters\":{\"SwitchedLevel\":\"Off\"}}}}","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":250,"y":220,"wires":[["e1c9e1c102213bb0"]]},{"id":"5cb5b26f993b7537","type":"tcp request","z":"65926043be73d021","name":"","server":"192.168.16.205","port":"8081","out":"sit","ret":"string","splitc":" ","newline":"","tls":"1cacd90b0ba75079","x":630,"y":160,"wires":[["980de67adccde8b3","f78ef60c4369186d"]]},{"id":"89ee9b844b1ff6ce","type":"inject","z":"65926043be73d021","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":80,"y":220,"wires":[["5e34b1c978df002f"]]},{"id":"980de67adccde8b3","type":"debug","z":"65926043be73d021","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":750,"y":80,"wires":[]},{"id":"f78ef60c4369186d","type":"switch","z":"65926043be73d021","name":"","property":"payload","propertyType":"msg","rules":[{"t":"regex","v":"{\"CommuniqueType\":\"ReadResponse\",\"Header\":{\"MessageBodyType\":\"MultipleZoneStatus\",\"StatusCode\":\"200 OK\",\"Url\":\"/zone/status\"},\"Body\":{\"ZoneStatuses\":[{\"href\":\"/zone/878/status\",\"Level\":100,\"SwitchedLevel\":\"On\",\"Zone\":{\"href\":\"/zone/878\"},\"StatusAccuracy\":\"Good\"}]}}","vt":"str","case":true},{"t":"regex","v":"{\"CommuniqueType\":\"ReadResponse\",\"Header\":{\"MessageBodyType\":\"MultipleZoneStatus\",\"StatusCode\":\"200 OK\",\"Url\":\"/zone/status\"},\"Body\":{\"ZoneStatuses\":[{\"href\":\"/zone/878/status\",\"Level\":0,\"SwitchedLevel\":\"Off\",\"Zone\":{\"href\":\"/zone/878\"},\"StatusAccuracy\":\"Good\"}]}}","vt":"str","case":true}],"checkall":"true","repair":false,"outputs":2,"x":830,"y":160,"wires":[["4ad07fac030fad21"],["9b86f82a73b2af92"]]},{"id":"4ad07fac030fad21","type":"template","z":"65926043be73d021","name":"On","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{{{\"CommuniqueType\":\"ReadResponse\",\"Header\":{\"MessageBodyType\":\"MultipleZoneStatus\",\"StatusCode\":\"200 OK\",\"Url\":\"/zone/status\"},\"Body\":{\"ZoneStatuses\":[{\"href\":\"/zone/878/status\",\"Level\":100,\"SwitchedLevel\":\"On\",\"Zone\":{\"href\":\"/zone/878\"},\"StatusAccuracy\":\"Good\"}]}}}} on","output":"str","x":950,"y":120,"wires":[["f75ec532509f601f","d1e9b00051945028"]]},{"id":"9b86f82a73b2af92","type":"template","z":"65926043be73d021","name":"Off","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{{{\"CommuniqueType\":\"ReadResponse\",\"Header\":{\"MessageBodyType\":\"MultipleZoneStatus\",\"StatusCode\":\"200 OK\",\"Url\":\"/zone/status\"},\"Body\":{\"ZoneStatuses\":[{\"href\":\"/zone/878/status\",\"Level\":0,\"SwitchedLevel\":\"Off\",\"Zone\":{\"href\":\"/zone/878\"},\"StatusAccuracy\":\"Good\"}]}}}} off","output":"str","x":950,"y":200,"wires":[["f75ec532509f601f","d1e9b00051945028"]]},{"id":"f75ec532509f601f","type":"debug","z":"65926043be73d021","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1170,"y":120,"wires":[]},{"id":"d1e9b00051945028","type":"mqtt out","z":"65926043be73d021","name":"State","topic":"switch/state","qos":"","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"6876d831.1398f8","x":1150,"y":180,"wires":[]},{"id":"1cacd90b0ba75079","type":"tls-config","name":"","cert":"","key":"","ca":"","certname":"","keyname":"","caname":"","servername":"","verifyservercert":false,"alpnprotocol":""},{"id":"6876d831.1398f8","type":"mqtt-broker","name":"","broker":"192.168.16.20","port":"1883","clientid":"","autoConnect":true,"usetls":false,"protocolVersion":"4","keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willPayload":"","willMsg":{},"sessionExpiry":""}]