# Creating a node with a drop down menu

**URL:** https://discourse.nodered.org/t/creating-a-node-with-a-drop-down-menu/55844
**Category:** Developing Nodes
**Created:** [29 December 2021 15:03 UTC](https://discourse.nodered.org/t/creating-a-node-with-a-drop-down-menu/55844 "2021-12-29T15:03:16Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![bbartling](https://avatars.discourse-cdn.com/v4/letter/b/bcef8e/32.png) [@bbartling](https://discourse.nodered.org/u/bbartling)
#### Post date: [29 December 2021 15:03 UTC](https://discourse.nodered.org/t/creating-a-node-with-a-drop-down-menu/55844/1 "2021-12-29T15:03:16Z")

</div>

Would anyone have any advice for how to start researching on how to create a Node that someone could install and pull out of the pallet?

I understand the basics at a high level of installing a package locally with an `npm install` with a `package.json` file. But that's about it, like I think there is an html file that needs to be included too?

Is there any boiler plate stuff someone could use for this process? What I am envisioning hopefully this doesn't sound silly but like a Node or widget I could pull out of the pallet that has a drop down menu with selectable features.

To make a long story short to get data from BACnet building automation systems, the Python BACnet stacks are real good/supported/mature so I created a [web app that can run along side of Node Red.](https://github.com/bbartling/bacnet-restapi)

Now I am experimenting with just using `python-shell` where I can [pretty much do the same thing](https://gist.github.com/bbartling/fa6581329f58dee2a179f42b1a5c11f3) without having to use an entire web app & rest API.

The learning curve for learning node is steep, but hoping to learn how to make a Node or some sort of widget that can be eventually published to npm with a drop down menu the community can use for BACnet where under the hood Python BACnet stacks are being used.

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [29 December 2021 15:15 UTC](https://discourse.nodered.org/t/creating-a-node-with-a-drop-down-menu/55844/2 "2021-12-29T15:15:37Z")

</div>

Developing a node for install via NPM is not terribly difficult and there are lots of them on github to look at and follow.

Personally, I use VSCode for my development environment and the best place to start is the docs: [Creating your first node : Node-RED](https://nodered.org/docs/creating-nodes/first-node)

When you have something working, you would publish your node to npm using `npm publish` then lastly you would submit it for inclusion on the [flows site](https://flows.nodered.org/add)

---

<div class="post-metadata">

### Author: ![bbartling](https://avatars.discourse-cdn.com/v4/letter/b/bcef8e/32.png) [@bbartling](https://discourse.nodered.org/u/bbartling)
#### Post date: [29 December 2021 15:29 UTC](https://discourse.nodered.org/t/creating-a-node-with-a-drop-down-menu/55844/3 "2021-12-29T15:29:03Z")

</div>

Cool thanks, how does one define a node that has a drop down menu for a range of selectable features? [Is this defined in the HTML file](https://nodered.org/docs/creating-nodes/first-node#lower-casehtml)? Would you know of an example to look at?

For what I am envisioning at least for BACnet 3 choices:

- A dropdown for a BACnet `read` or `write` or `release`

- An input box for a BACnet device address

- A dropdown menu for an object type `analogInput` or `analogValue` or `binaryOutput` or `binaryValue`

- An input box for point address

This is the basics of what is filtered down into the Python BACnet stack to perform a request on the BACnet network.

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [29 December 2021 15:35 UTC](https://discourse.nodered.org/t/creating-a-node-with-a-drop-down-menu/55844/4 "2021-12-29T15:35:18Z")

</div>

These are all very basic HTML type things (drop down / input / etc) - read up on HTML and follow the guide i linked to.

The best advice I can give you is look at other nodes and when you find something similar then go to its source code.

This source [node-red-contrib-omron-fins](https://github.com/Steve-Mcl/node-red-contrib-omron-fins) has may of these features e.g...  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/f/9fd5c23690d3db8e5b6143f081753d4f845e2eff.png)

---

<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: [13 January 2022 15:34 UTC](https://discourse.nodered.org/t/creating-a-node-with-a-drop-down-menu/55844/6 "2022-01-13T15:34:28Z")

</div>

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