Using environment variables for connection parameter in modbus client configuration
See original GitHub issueI’m submitting a … (check one with “x”)
Feature
- (x) feature request
What is the motivation / use case for changing the behavior?
I created a subflow that represents a single modbus device. In my main flow, I want to use multiple instances of this modbus device, each of the device having another IP address. Currently, I cannot use a subflow for this because the IP address is fixed inside the subflow itself and cannot be configured, e.g. using an environment variable.
Current behavior
The IP address of the the modbus client inside a subflow is fixed and cannot be edited (e.g. using an environment variable).
Expected behavior
The connection parameter (IP address, port) of the the modbus client inside a subflow should be editable, e.g. using environment variables.
Minimal reproduction of the problem with instructions
- Create a subflow including a Modbus Flex Getter
- Configure the modbus client for the Modbus Flex Getter
- The IP address and port cannot be configured using environment variables
Your Environment
Please tell us about your environment:
- (x) I am using just the Node-RED package and got modbus-serial package installed with it
- ( ) I have installed modbus-serial package global from source (using git clone)
- ( ) I have installed modbus-serial as a global package (using npm i -g)
Yes, modbus-serial is the name but it does all, TCP and Serial. The node-modbus package is just for the Modbus Server node.
-
Device :
- ( ) macOS: v
- ( ) Linux: v
- ( ) Windows: v
- (x) Raspbian: Buster
- ( ) Other:
- Name:
- Version:
-
Description of the connecting Modbus system:
- Name :
- Version:
- Vendor :
- Link : https://
-
node-red-contrib-modbus version: v5.13.3
- Node: (min. 10.x)
node --version
= v14
Issue Analytics
- State:
- Created 3 years ago
- Comments:22 (5 by maintainers)
Top GitHub Comments
Thanks to all for the great discussion! Maybe that issue could be closed now?
definitely many thanks to @biancode as also to the community