# BACnet MSTP read request

**URL:** <https://discourse.nodered.org/t/bacnet-mstp-read-request/37199>\
**Category:** Industrial\
**Created:** [8 December 2020 19:54 UTC](https://discourse.nodered.org/t/bacnet-mstp-read-request/37199 "2020-12-08T19:54:55Z")\
**Posts on this page:** 15\
**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:** [8 December 2020 19:54 UTC](https://discourse.nodered.org/t/bacnet-mstp-read-request/37199/1 "2020-12-08T19:54:56Z")

</div>

Hello,

Brand new to node red, looks cool 🙂

Could someone give me a tip on how to make a BACnet read request of a BACnet MSTP controller temp sensor?

BACnet device 201201 on MSTP network 12345 controller hardware address 2.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/1/11071d1db75ff33ddec306b374a5ee085691d8db.png)

Ultimately I am hoping to understand the work flow on how to make continuous BACnet read requests @ 60 second intervals to the temp sensor. (maybe eventually save the data to SQL)

I did this command highlighted yellow to install `contrib-bacnet`

But how do I pull these blue colored blocks from the pallete?

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/b/3bc4b76ad243c1b33f6ac1cfe9e8b94f310a39b9.png)

Thanks!

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [8 December 2020 20:30 UTC](https://discourse.nodered.org/t/bacnet-mstp-read-request/37199/2 "2020-12-08T20:30:25Z")

</div>

Welcome to the forum @bbartling.

I suggest you start by watching the [Node red Essentials](https://www.youtube.com/playlist?list=PLyNBB9VCLmo1hyO-4fIZ08gqFcXBkHy-6) videos. An hour or so watching those will give you a great introduction into what node-red is all about.

---

<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:** [9 December 2020 16:56 UTC](https://discourse.nodered.org/t/bacnet-mstp-read-request/37199/3 "2020-12-09T16:56:03Z")

</div>

So I am trying to configure how to read an MSTP device with no luck AND no documentation that I can see.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/8/28a13d35600310280c630319f0543a6af8bc0eeb.png)

Trying to configure how to read analog input 2 present value

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/f/efdb3d104e77c7748059225fb6d69ba4b732fadf.png)

---

<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:** [9 December 2020 16:56 UTC](https://discourse.nodered.org/t/bacnet-mstp-read-request/37199/4 "2020-12-09T16:56:39Z")

</div>

Of device 201201 BACnet instance ID  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/4/14162f0761d984eed3d8bb42e232b71eee13b136.png)

How would I configure to perform a BACnet read through an MSTP router?

---

<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:** [9 December 2020 16:58 UTC](https://discourse.nodered.org/t/bacnet-mstp-read-request/37199/5 "2020-12-09T16:58:58Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/b/6b8851a586610067dc59357281d927c3a4f72369.png)

---

<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:** [9 December 2020 16:59 UTC](https://discourse.nodered.org/t/bacnet-mstp-read-request/37199/6 "2020-12-09T16:59:33Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/1/d15f65377bb1a3f1c47dc1ccf31ed3e6077321ee.png)

---

<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:** [9 December 2020 17:00 UTC](https://discourse.nodered.org/t/bacnet-mstp-read-request/37199/7 "2020-12-09T17:00:35Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/b/0bc04b56859b5e0912d3714e5f50b332ccd13357.png)

---

<div class="post-metadata">

**Author:** ![Ekristoffe](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ekristoffe/32/11863_2.png) [@Ekristoffe](https://discourse.nodered.org/u/Ekristoffe)\
**Post date:** [10 December 2020 02:23 UTC](https://discourse.nodered.org/t/bacnet-mstp-read-request/37199/8 "2020-12-10T02:23:34Z")

</div>

hello, where is node-red and where is BACnet Discovery Tool ?  
Same machine ?

---

<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:** [10 December 2020 12:59 UTC](https://discourse.nodered.org/t/bacnet-mstp-read-request/37199/9 "2020-12-10T12:59:26Z")

</div>

Yes same machine but when I run the BACnet discovery tool I have to kill the node-red.

The author of the node-red-bacnet-contrib finally got back to me saying that at the time MSTP isnt supported which is a bummer.

I would highly recommend going this route, its a wrapper code around Python bacpypes super easy to use and the author is real friendly on helping you get started.

> **[Welcome to BACØ - BACnet Test Tool — BAC0 documentation](https://bac0.readthedocs.io/en/latest/)**

---

<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:** [12 December 2020 13:34 UTC](https://discourse.nodered.org/t/bacnet-mstp-read-request/37199/10 "2020-12-12T13:34:11Z")

</div>

Ok so now that I know the node BACnet stack cannot be used for MSTP BACnet networks (2-wire communication) I am experimenting with the Python BAC0 stack which is pretty cool btw, executing the Python script from node-red flow works. But how do I get the data back into Node Red work flow? [I have a stackoverflow post on this](https://stackoverflow.com/questions/65265442/node-red-execute-python-script-to-retrieve-data), any advice? Also worth mentioning when I installed node-red it automatically installed Python 3.9 and I had to install the BAC0 bacnet package `pip install BAC0` in order to get it to work successfully thru node-red...

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [12 December 2020 16:06 UTC](https://discourse.nodered.org/t/bacnet-mstp-read-request/37199/11 "2020-12-12T16:06:48Z")

</div>

We don’t install python so something else put that there. But no matter. Fir single calls out you can use the exec node and get a response. For long running processes the look at the node-red-node-daemon node that will start an app. Wait for responses but can also be sent new commands etc.

---

<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:** [12 December 2020 16:57 UTC](https://discourse.nodered.org/t/bacnet-mstp-read-request/37199/12 "2020-12-12T16:57:28Z")

</div>

Hi would there be any chance you could send a link for a single cell example that I could follow? Super beginner here 🙂

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [12 December 2020 16:59 UTC](https://discourse.nodered.org/t/bacnet-mstp-read-request/37199/13 "2020-12-12T16:59:45Z")

</div>

Sorry I know nothing about haven’t or the program you are using to drive it. It will be simpler to try and then show and ask when you get stuck

---

<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:** [18 December 2020 14:59 UTC](https://discourse.nodered.org/t/bacnet-mstp-read-request/37199/14 "2020-12-18T14:59:19Z")

</div>

For what it is worth getting around the node-bacstack not supporting BACnet MSTP devices. I created a Python rest api app. [See link for Git Gist](https://gist.github.com/bbartling/816a0ab970c35c6a4a16f9afc4843d38). Basically the idea (that I have to learn next) on the node red side would be to make http requests to the Python bacnet app to get the bacnet data into node red.

bacnet\_api\_app.py (Python Flask http app) would run along side node-red hoping to do testing soon 🙂

---

<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:** [16 February 2021 14:59 UTC](https://discourse.nodered.org/t/bacnet-mstp-read-request/37199/15 "2021-02-16T14:59:20Z")

</div>

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