Your question is difficult for those who dont use HA (most here do not use HA, only Node-RED)
But perhaps a demo using core built-in Node-RED nodes will help you?
JSONata used:
{
"filename": "/media/frigate/" & computer_camera & "_" & $moment().format("YYYYMDD-HHmmss") & ".mp4",
"duration": duration
}
The demo flow (use CTRL-I
to import)
[{"id":"70be9c28a7f55a87","type":"inject","z":"73b44920080e0db3","name":"server3_camera5, 1234","props":[{"p":"payload"},{"p":"computer_camera","v":"server3_camera5","vt":"str"},{"p":"duration","v":"1234","vt":"num"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":1440,"y":80,"wires":[["154b1d6156823171"]]},{"id":"154b1d6156823171","type":"change","z":"73b44920080e0db3","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\t \"filename\": \"/media/frigate/\" & computer_camera & \"_\" & $moment().format(\"YYYYMDD-HHmmss\") & \".mp4\",\t \"duration\": duration\t}\t","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":1470,"y":140,"wires":[["384554834ef7097d"]]},{"id":"384554834ef7097d","type":"debug","z":"73b44920080e0db3","name":"debug 1","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":1500,"y":200,"wires":[]}]
I have no idea if this is what you want but at least, as a working demo, it might lead you down the right path.