Logic Machine Forum
BACNET Object Table - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Gateway (https://forum.logicmachine.net/forumdisplay.php?fid=10)
+--- Thread: BACNET Object Table (/showthread.php?tid=4681)



BACNET Object Table - kike - 27.03.2023

Hi everyone!

I'm using the bacnet library to get all object under a bacnet device:

require('bacnet')
device, objects = bacnet.scandevice(1)


for _, object in ipairs(objects) do
 

 
log(object)

end

Everything is ok. This returns a table with all the info I need. The name, the type, and the present-value.

But when I try to decode the table:

object.name ===> works!!
object.type ===> works!!
object. present-value  ===> fail !!
 
I do not know how to set the "-" in preset-value becouse returns fail due to only takes the first part.

How can I set the request to access that info?


Thanks!!

Kike


RE: BACNET Object Table - admin - 27.03.2023

Use object['present-value']


RE: BACNET Object Table - kike - 27.03.2023

(27.03.2023, 10:14)admin Wrote: Use object['present-value']

thanks! works fine!