All things groov RIO
I need to know if is a good practice to work all the flows in the Node red instance installed in the edge( Groov Rio) and use MQTT to move the data( publish) to a linux machine where is an instance of Node-red, InfluxDB and Grafana that would be in localhost. I am thinking in the moment to scale to connect like 30 production equipments of the plant.
Hard to say straight out the gate, so lets go back and forth a little to get a better understanding of your needs…
If the RIO is not doing much in the way of machine control, then perhaps there is no need to be running Node-RED on the edge, just use the native groov Manage Data Services to move the I/O data to your Linux box via MQTT or Sparkplug.
You would need to install Mosquitto (A simple apt-get install mosquitto) on that Linux box, but since you have a few apps already on there, it should not be an issue.
If your control needs are simple, then you could even send your edge write commands back via MQTT (remember, the tag path is slightly different) and that way the edge RIOs would be super fast and lightly loaded.
If you can share what sort of layout/network/machine control needs you have, we can brainstorm some other options or firm up the options you do have.
the flow is just a cycle counter, hours of operation and some temperature values ( this last one not shown in the flow), the attached flow is the pilot project in one machine, my idea is to buy a linux machine to installed Node red, influxDB and Grafana to show this measurements in a dashboard, the project is just extracting data from the production equipment and no control is included.
Regarding what you mentioned I understand that to run everything in the linux machine and just use node red in the edge to move the data from the digital and analog inputs and use the process nodes for example the hourglass and the counter in Node red running in linux machine and then use this instance as a bridge to send the data to influxDB.
In the flow is shown the MSSQL node but in the rollout I will not be using anymore this node because I will use InfluxDB. Hopefully I made myself clear since my English is not so good.
If I was only pushing data into InfluxDB and nothing else needs access to the data outside of InfluxDB, then I wouldn’t complicate things with MQTT. I would have each RIO Node-Red flow send the data direct to your InfluxDB server.
No mosquitto, no MQTT, and no Node-RED on the server - just InfluxDB, Grafana, and a reverse proxy with Caddy on the server with the RIO Node-Red flow sending data with the InfluxDB client Http API.
Ok I understand Philip, I will read more about Caddy on the server since is new for me, sounds great
thank you Beno and philip for your suggestions deeply apreciated
Caddy is so you can have a quick to setup secure connection to your server. Does built-in Lets Encrypt TLS certificate procurement too. Good if your server is on the internet somewhere.
I would also give my vote to Philip’s suggested approach. In fact, that is pretty close to what we do (except we eventually installed Mosquitto so we could use MQTT in addition to storing the data in Influx).
Also @renedavid6: I am not sure how far you have gone into the Influx forest, but about 3-4 years ago they made a pivot from InfluxQL (which is very SQL like) to Flux (which is not really like anything I have used). Much of the Q&A on forums (in the past, but even today) involves InfluxQL, but I presume that will eventually be discontinued. So just keep this in mind when you plan your Influx database. We started with InfluxQL and migrated to Flux at the end of 2021 and it’s been mostly smooth sailing.