Newbie question: writing a value to a BACnet AV

Hi all,

A real newbie here! I'm looking to take a temperature value from OpenWeather and write it to a BACnet analog value.

I've done alright so far, installing node-red-contrib-bacnet and OpenWeather. Using a BACnet Write node I can manually change the present value of the AV in my Delta eBMGR controller, and I've worked out how to retrieve the temperature reading from OW.

What I can't figure out right now is how to transfer that value into the BACnet Write node so it can be written to the AV automatically at intervals.

I'd greatly appreciate any help from anybody who can bear in kind that I'm very new to this, and my JS knowledge is very rudimentary.


Post what you have so far, might be easier to help tie it all together. Sounds like you’re 90% of the way there. Could be as easy as putting a change node between the weather output and bacnet write.

Hi Billy, thanks for responding so quickly. Since I posted last night I've made a tiny bit of progress. Here's what I've got so far:

The value I want to pass to the BACnet AV is the highlighted "tempc". I've copied the path from the little icon on the right, and I've pasted it into the value field of the BACnet Write:

This does seem to be working to some extent, but the end result is a dud value in the AV when viewed at the BMS (nan°C). The AV only seems to want to accept a "Real" value (App-Tag = 4), but it seems to me that I'm getting very close here - perhaps only a formatting issue away from success?

Because I'm a new member I'm only allowed 2 pics per post so here's my third, the end result viewed from the BMS.

Break it down. What does the BACnet write value "want" to see? Use an input node and take the weather node out of picture for now. If you set "value' to just the payload and input a number as the payload, does it write that number?

Hi Billy,

I've rejigged it with an inject mode containing a number value.

In the first instance, if I disregard the number value in the inject node and simply enter fixed value in the Value field, the BACnet-Write node works perfectly. My BACnet AV changes to (in this case) a present value of 18.

However if I change the BACnet-Write node Value field to payload, and inject a number value as the payload (as you directed above), the AV point ends up with a value of "nan". This tells me that I'm setting up the connection between the inject node and the Value field incorrectly.


I think it has to be msg.payload.

Then msg.payload.tempc or whatever object value you are grabbing.

Didn’t catch that on the first go.

Hi Billy,

The clue was in this thread I found a little while ago, in which the OP was having the same trouble as me:

The node help wasn't much help, but iiLaw's answer made a few pennies drop. I took his function node and butchered it a little:


And now I have the Open Weather temperature writing correctly to the AV. Phew!

Hey Billy, if you see this I'd just like to thank you for your help getting me started. I've now got the BACnet write thing down pat.

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