I have different kind of sensors mapped with different tcp server. Currently I have configured all the tcp server and based on sensorId using switch block, I am communicating with TCP server.
How can I make it dynamic?
I want to push all the tcp server and sensor mapping details through mqtt and save it in nodered. then based on sensor id, get the tcp server details, make the connection dynamically. I may update the mapping details in future.
How do I maintain the sensor and tcp server mapping? I want to create a flow to push tcp and sensor mapping details from cloud through MQTT and save it somewhere in Nodered cache.
Once I get the sensor request, I can fetch tcp details for the cache for the mapped sensor and can make the request dynamically.
I hope Now I am clear about my requirements. Its more about creating a separate flow and how to create cache. In future I may update the cache.