# External flows.json generation

**URL:** <https://discourse.nodered.org/t/external-flows-json-generation/28484>\
**Category:** General\
**Created:** [17 June 2020 15:16 UTC](https://discourse.nodered.org/t/external-flows-json-generation/28484 "2020-06-17T15:16:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![wolfred](https://avatars.discourse-cdn.com/v4/letter/w/838e76/32.png) [@wolfred](https://discourse.nodered.org/u/wolfred)\
**Post date:** [17 June 2020 15:16 UTC](https://discourse.nodered.org/t/external-flows-json-generation/28484/1 "2020-06-17T15:16:06Z")

</div>

We use Node-RED for connecting industrial machines via Modbus and OPC/UA to a MQTT broker. There are different connection parameters and data processing requirements (transformation, filtering,...) for each machine. Currently. when onboarding a new machine, we need to expand the Node-Red flow manually (adding nodes, parametrizing nodes,...).

Our idea is to generate a `flows.json` outside of Node-RED and then deploy a new Node-RED, e.g. by a sepaerate instance in a Docker container.

This kind of flow generation by software has some benefits:

- the flow can be regression tested
- parametrizing nodes can be done externally
- flows can be generated from mapping schemes (e.g. OPC//UA, Modbus-Registers, JSON-Swagger, ...)
- a "Node-RED flow description language" could be formally verified

Here are some usage scenarios for such a software. Output is always a `flow.json`:

1. OPC/UA configuration, mapping rules and sending MQTTs
2. collecting data from 50 sensor and delivering data to REST APIs
3. receiving MQTT, mapping with predefined (\>100) rules and sending MQTT
4. translating a programming language subset to a `flows.json`
5. building a domain scpecific language for industrial IoT applications

Has anyone done some research in this field? Any comments on this?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [16 August 2020 15:16 UTC](https://discourse.nodered.org/t/external-flows-json-generation/28484/2 "2020-08-16T15:16:23Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
