# Modbus tcp IP HOST from msg

**URL:** <https://discourse.nodered.org/t/modbus-tcp-ip-host-from-msg/53436>\
**Category:** General\
**Created:** [9 November 2021 08:23 UTC](https://discourse.nodered.org/t/modbus-tcp-ip-host-from-msg/53436 "2021-11-09T08:23:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ketpa](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ketpa/32/42496_2.png) [@ketpa](https://discourse.nodered.org/u/ketpa)\
**Post date:** [9 November 2021 08:23 UTC](https://discourse.nodered.org/t/modbus-tcp-ip-host-from-msg/53436/1 "2021-11-09T08:23:08Z")

</div>

How to configure IP HOST from msg

 ![obraz](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/4/e475987c17ccd57101d3041afa94c07eeaa08e51.png)

---

<div class="post-metadata">

**Author:** ![UnborN](https://avatars.discourse-cdn.com/v4/letter/u/4491bb/32.png) [@UnborN](https://discourse.nodered.org/u/UnborN)\
**Post date:** [9 November 2021 13:27 UTC](https://discourse.nodered.org/t/modbus-tcp-ip-host-from-msg/53436/2 "2021-11-09T13:27:44Z")

</div>

short answer. The Modbus nodes dont support that.

There is a recent discussion [here](https://discourse.nodered.org/t/ip-address-as-a-variable/53225/3) regarding using environment variables but thats not truly dynamic configuration since (from what i understand) `env` variables update on system restart?

you could open a feature request on the developer's [Github page](https://github.com/BiancoRoyal/node-red-contrib-modbus)

may i ask why you want to do this and how many modbus devices do you have?  
the best solution now is to create multiple modbus-client nodes and Flex-getters

the only use i cant think of is trying to dynamically loop through an array of ips and connect to a list of modbus devices.

---

<div class="post-metadata">

**Author:** ![ketpa](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ketpa/32/42496_2.png) [@ketpa](https://discourse.nodered.org/u/ketpa)\
**Post date:** [10 November 2021 12:57 UTC](https://discourse.nodered.org/t/modbus-tcp-ip-host-from-msg/53436/3 "2021-11-10T12:57:21Z")

</div>

I have 35 sensors with IP address and I want to change ip address without use node-red, only html table.  
html table -\> mysql -\> node-red modbus -\> mysql -\> html charts.

---

<div class="post-metadata">

**Author:** ![UnborN](https://avatars.discourse-cdn.com/v4/letter/u/4491bb/32.png) [@UnborN](https://discourse.nodered.org/u/UnborN)\
**Post date:** [18 November 2021 18:38 UTC](https://discourse.nodered.org/t/modbus-tcp-ip-host-from-msg/53436/4 "2021-11-18T18:38:32Z")

</div>

Try this if it helps

> [@IP Address as a variable](https://discourse.nodered.org/t/ip-address-as-a-variable/53225/7):
>
> Maybe this is possible to change the modbus config settings with a node in the collection called Modbus Flex Connector I havent used it in a real world example but i did some tests with a modbus software simulator and seems to work. Here is the flow that sets, as an example, a different port for that modbus config. Flow: [{"id":"c312db7a02c1f4dd","type":"modbus-flex-sequencer","z":"5847b7aa62131d37","name":"","sequences":[{"name":"1","unitid":"1","fc":"FC1","address":"1","quantity":"1"}],…

---

<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:** [17 January 2022 18:38 UTC](https://discourse.nodered.org/t/modbus-tcp-ip-host-from-msg/53436/5 "2022-01-17T18:38:47Z")

</div>

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