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.). 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?