# Unstable bacnet connection

**URL:** <https://discourse.nodered.org/t/unstable-bacnet-connection/93961>\
**Category:** General\
**Created:** [17 December 2024 13:51 UTC](https://discourse.nodered.org/t/unstable-bacnet-connection/93961 "2024-12-17T13:51:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ThingsTinkerer](https://avatars.discourse-cdn.com/v4/letter/t/91b2a8/32.png) [@ThingsTinkerer](https://discourse.nodered.org/u/ThingsTinkerer)\
**Post date:** [17 December 2024 13:51 UTC](https://discourse.nodered.org/t/unstable-bacnet-connection/93961/1 "2024-12-17T13:51:18Z")

</div>

I don't have a lot experience with bacnet, so bear with me. I've tried using several bacnet palettes in NR, but ended up with a separate bacnet-stack library and particularly readprop ([GitHub - bacnet-stack/bacnet-stack: BACnet Protocol Stack library provides a BACnet application layer, network layer and media access (MAC) layer communications services.](https://github.com/bacnet-stack/bacnet-stack)). This is run in NR with exec cmd node. For some devices, this fails about 50% of the times! And it's only scheduled to request some values once every 5 minutes. The way it fails is that it returns empty payload, but return code is still 0 (ok) and nothing on stderr or other error messages.

To investigate further, 2 example commands were extracted and ran into separate shell scripts:

- /usr/local/bacnet-stack/programs/bacnet-read 55 analog-input 0 85 2\>&1
- /usr/local/bacnet-stack/programs/bacnet-read 111 analog-input 187 85 2\>&1

This never fails when executed manually! But when scheduled on crontab to run every 30 sec, it fails regularly (similar to as it fails in NR). Furthermore, these 2 commands going to different devices seems to fail always on the same times! Bacnet is weird haha. But after a while, they fail individually, so not the error is not always synced.

Tried ping regularly as well, but ping is always ok.

Problem:

- Bacnet (readprop) fails regularly with empty output/payload (no error messages).

Findings:

- Unable to recreate when running cmd manually (always returns value)
- Can recreate with crontab, but when running separate requests to 2 different devices, they often failed at the same time!
- Ping is always ok.

Anyone have experience with bacnet and encountered similar problems?

---

<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 March 2025 13:52 UTC](https://discourse.nodered.org/t/unstable-bacnet-connection/93961/2 "2025-03-17T13:52:14Z")

</div>

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