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