# Creating config nodes from other nodes

**URL:** <https://discourse.nodered.org/t/creating-config-nodes-from-other-nodes/76867>\
**Category:** General\
**Created:** [23 March 2023 14:01 UTC](https://discourse.nodered.org/t/creating-config-nodes-from-other-nodes/76867 "2023-03-23T14:01:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kristvanbesien](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kristvanbesien/32/66697_2.png) [@kristvanbesien](https://discourse.nodered.org/u/kristvanbesien)\
**Post date:** [23 March 2023 14:01 UTC](https://discourse.nodered.org/t/creating-config-nodes-from-other-nodes/76867/1 "2023-03-23T14:01:02Z")

</div>

Hello all,

I have been playing around with node-red for some time and created some flows to automate some stuff in our home.  
As a next step I want to try my hand ad creating a module.

What I would like to do is create a module that provides a node that does the following:

Listens to MDNS (analog to the discovery node) and:

- Create configuration nodes based on what it discovers.

Background: I have a few switches that announce their IP, MAC and name via mdns. I need the MAC as that is the basis for the events they publish in the mqtt server. But I want to have configuration nodes for each of those that use the name and store the mac and IP. And I would like these to be generated automatically..

Is there a proper way of doing this?

---

<div class="post-metadata">

**Author:** ![ralphwetzel](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ralphwetzel/32/53713_2.png) [@ralphwetzel](https://discourse.nodered.org/u/ralphwetzel)\
**Post date:** [23 March 2023 15:47 UTC](https://discourse.nodered.org/t/creating-config-nodes-from-other-nodes/76867/2 "2023-03-23T15:47:31Z")

</div>

Hi @kristvanbesien

> [@kristvanbesien](#):
>
> Is there a proper way of doing this?

Technically this is doable. Once you've created a node, you may create config nodes as well...  
Logically I'm yet not convinced this is necessary:

- When you deploy, NR claims any config node that is not in use and asks you to clean / delete these nodes. Thus there's (almost) no value in creating them upfront...
- You can (or perhaps even: you should) of course collect the MDNS info and then offer this data via a property page to the user configuring you custom node. Once the user selected his preference, you may instantiate a config node that hold this data. For the user of your custom node, this whole process is almost transparent - thus it makes not (much) difference.

Hope this helps...

---

<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 May 2023 15:47 UTC](https://discourse.nodered.org/t/creating-config-nodes-from-other-nodes/76867/3 "2023-05-22T15:47:46Z")

</div>

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