# Define IP of a configuration node with a context variable

**URL:** <https://discourse.nodered.org/t/define-ip-of-a-configuration-node-with-a-context-variable/33225>\
**Category:** General\
**Created:** [23 September 2020 12:07 UTC](https://discourse.nodered.org/t/define-ip-of-a-configuration-node-with-a-context-variable/33225 "2020-09-23T12:07:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![densalzmann](https://avatars.discourse-cdn.com/v4/letter/d/85e7bf/32.png) [@densalzmann](https://discourse.nodered.org/u/densalzmann)\
**Post date:** [23 September 2020 12:07 UTC](https://discourse.nodered.org/t/define-ip-of-a-configuration-node-with-a-context-variable/33225/1 "2020-09-23T12:07:51Z")

</div>

Hi!

Are there some opportunities to define the IP address of a configuration node with a context variable? There are no errors when I'm trying it with flow.set(), flow.get(), but it doesn't work.

I use version 5.13.3 of node-red-contrib-modbus  
Node-RED version v1.1.3  
Docker v 2.3.0.4 using the WSL2 based engine

Thank You in advance!

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [23 September 2020 12:39 UTC](https://discourse.nodered.org/t/define-ip-of-a-configuration-node-with-a-context-variable/33225/2 "2020-09-23T12:39:59Z")

</div>

Hi @densalzmann

unless the modbus node uses an input like you see in the Inject node to select a context property, then it is unlikely to support it.

The alternative is whether the node allows you to provide the value via a message property - the sidebar help for the node should let you know what message properties you can use to config the node's behaviour.

---

<div class="post-metadata">

**Author:** ![densalzmann](https://avatars.discourse-cdn.com/v4/letter/d/85e7bf/32.png) [@densalzmann](https://discourse.nodered.org/u/densalzmann)\
**Post date:** [23 September 2020 13:10 UTC](https://discourse.nodered.org/t/define-ip-of-a-configuration-node-with-a-context-variable/33225/3 "2020-09-23T13:10:08Z")

</div>

Hi @knolleary

Sorry, do you meant to try to send the IP via a msg variable? I have also tried to send the IP via a msg.ip\_server from the inject node. But it stays the same: I don't recive any error message, but it doesn't work.  
The funny thing is that I tried to send the Port to the configuration node via a msg variable and it works, but gives me also an error: "Invalid properties - server". Could it depend on the data type, which the "host" or the "server" fields has to receive?

---

<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:** [22 November 2020 13:10 UTC](https://discourse.nodered.org/t/define-ip-of-a-configuration-node-with-a-context-variable/33225/4 "2020-11-22T13:10:35Z")

</div>

Closed on 22 November 2020 13:10 UTC

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