@martin-kudláček said in Clumsy, complicated...:
therefor the websocket URL could be hardcoded into the unipi-input
Hardcoded ws URL??? You do not have to hardcode the ws URL if you want to build a standalone input or output node. Just have a look at Nick's node-red-contrib-unipi-evok. Or node-red-contrib-loxone. They both use websocket and the ws URL is not hardcoded. The ws URL is specified by the user in the so called configuration node.
You can configure Evok to read 3rd party devices via ModbusRTU. It would be complicated to express this type of data via dedicated input nodes.
OK, I got your point. But again, you can configure the device (whether it is a Unipi/Neuron/Axon or some 3rd party modbus) in the configuration node. No need to do that in the input / output node.
Or, another common solution. Again, see node-red-contrib-unipi-evok for inspiration. There are actualy 4 nodes in the node-red-contrib-unipi-evok package. Input node, output node, configuration node and "unipi-api" node which (I assume) serves as a simple filter (I do not know the detaills, I have never used it). So you can always build input and output nodes for those who do not use 3rd party devices and a "filter node" for those few users who want see the full communication.
Also, if you really need a filter node, one "bidirectional" node should do the job. You do not need two nodes. Just have a look at the built-in "json" mode. Converts between a JSON string and its JavaScript object representation, in either direction. I do not know how it works but it is somehow able to recognize what is being fed into the node.
Can you post your flow which causes the SyntaxError?
Sorry, I can not, because
The transition to our nodes is complicated and once the Nick's package is removed, it's hard to get it back.
I am ready to help you, but I do not want to uninstall Nick's package.