Logic Machine Forum
BACnet - how it works on LM? - 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 - how it works on LM? (/showthread.php?tid=803)



BACnet - how it works on LM? - buuuudzik - 23.05.2017

Hello,

I have a project with 253 air conditioners which must be controlled by BACnet via manufacturer gateway, but I've checked a little about integration of BACnet on LM and I see some points that I must ask because this is my first project with BACnet.

I've read these examples:
http://openrb.com/logicmachine-as-bacnet-client/
http://openrb.com/example-knx-to-bacnet-gateway-with-lm2/

and I see that for control some BACnet device I must prepare event-based script. This is for writing some values to BACnet object.
But if it is about reading is there a possibility to auto-update KNX object when some BACnet object updates(not by reading whole objects table with some interval)?

What is it the "Object priority", should be as default 16?

In BACnet tab there is the button "Scan selected". Do I can do the same by script?

What are the limitations of BACnet on LM? And maybe what is the maximum number of objects which I can read without any problem with performance? I think for such system I will have more than 5000 objects. Is it possible to use LM5 with x3 processor or Spacelynk or I must use Load Balancer?

And also other question more to Erwin. Do I can embedded in Spacelynk visualisation the visualisation from LM Load Balancer and will I see this also when I will check visu via Schneider cloud app?

And also what is the limitations of users on Schneider cloud app?


RE: BACnet - how it works on LM? - buuuudzik - 24.05.2017

And also I have a question about BACnet profile. Below I am attaching only 1 page from BACnet objects of air conditioner. Am I right that on this page is 15 objects only for "Fan states"?


RE: BACnet - how it works on LM? - admin - 24.05.2017

Yes, everything has to be done via scripts. Full device scan is not supported in BACnet Lua library right now. All values should be requested via polling (Change-Of-Value is not supported).

Priority array allows several control points to set value based on their priority. The resulting value is the first one that is not NULL, with 16 being the lowest priority. If LM is a single control point then the priority does not matter.

5000 objects is a lot, I strongly suggest using Load Balancer for this project.

In the attached page you have one object of type "Multi-state input", which is basically a number mapped to a textual value (like Custom object values in LM).


RE: BACnet - how it works on LM? - buuuudzik - 24.05.2017

So on LM I will have something like this:
Type: multistate-input
ID: multistate-input 2
Name: AC_ IFanSpeed
Value: 1
Priority Array: Null,1 (for priority=2)
?


RE: BACnet - how it works on LM? - admin - 24.05.2017

Yes, something like that


RE: BACnet - how it works on LM? - leonidas - 13.06.2017

Hello, does LM5 Lite support BACnet?
In comparison table BACnet isn't mentioned on LM5 Lite
http://openrb.com/wp-content/uploads/2017/03/LM_comparison_table_17.03.2017.pdf


RE: BACnet - how it works on LM? - edgars - 13.06.2017

yes, LM5 Lite supports BACnet


RE: BACnet - how it works on LM? - zoltan - 21.07.2017

Buudzik,

I think that from this table you only need the PrVal identifier (called Current value here). It has values 0-3 which equals to Low-Middle-High-Stop - and it's read only.
The other identifiers are not necessary from this bacnet object. You should find another datapoint that can be used to control the device. Use Yabe to find the needed points.


RE: BACnet - how it works on LM? - apkotelnikov - 16.10.2017

I have an Bacnet IP enabled device but it use different then 47808 port (it use port 47809). I try to change port settings on LM Reactor V3 in system config and still can`t connect to my device. I can read|write objects on my device using an bacnet explorer. Also i check that my LM can speak with same device type (sauter modulo 545) with defaul port 47808. My LM can read from another device. 
How I can change bacnet port settings correctly?

Best regards,
Anton


RE: BACnet - how it works on LM? - Erwin van der Zwart - 16.10.2017

Hi,

Are you using the client or server on LM?

Port only changes in server, client is hard coded BAC0 as far as i know.

BR,

Erwin


RE: BACnet - how it works on LM? - apkotelnikov - 17.10.2017

(16.10.2017, 19:18)Erwin van der Zwart Wrote: Hi,

Are you using the client or server on LM?

Port only changes in server, client is hard coded BAC0 as far as i know.

BR,

Erwin

Hi Erwin!

Thanks for the answer. Previously, I did not know that the port settings only belong to the server part. I'm sure that OpenRb uses this BacNet Stack stack. I aslo use this BacNet implemetation on RPI. This iplementation have ability to use another (than BAC0) port in client side applications. To do this, just need to set the following environment variable BACNET_IP_PORT. But I could not find a way to get into the shell of the operating system on the LM reactor. Do you know the way to get into the shell or another way of setting the environment variable?

Best Regards,
Anton


RE: BACnet - how it works on LM? - Erwin van der Zwart - 17.10.2017

Hi,

Do you know the Linux command to change the port?

You can run that command with os.execute(‘linux command here’)

But i prefer we get this as variable in the client package so maybe admin can add something like this:
Code:
client = require(‘bacnet’)
client.port = 0xBAC1
BR,

Erwin


RE: BACnet - how it works on LM? - admin - 18.10.2017

Right now client will only work with default port.


RE: BACnet - how it works on LM? - apkotelnikov - 20.10.2017

(17.10.2017, 18:35)Erwin van der Zwart Wrote: Hi,

Do you know the Linux command to change the port?

You can run that command with os.execute(‘linux command here’)

But i prefer we get this as variable in the client package so maybe admin can add something like this:
Code:
client = require(‘bacnet’)
client.port = 0xBAC1
BR,

Erwin

Hi!

I know command but I thing that can`t help. We need to set global enviroment variable but scripts runs isolately. But I can try to do it.

BR
Anton

(18.10.2017, 08:40)admin Wrote: Right now client will only work with default port.

Bad news. Is it on roadmap?

BR

Anton


RE: BACnet - how it works on LM? - Erwin van der Zwart - 20.10.2017

Hi Anton,

Can you give me the full command you would normally use to set the port on you RP?

Saves me time to search for it, then i can check if i can modify it...

BR,

Erwin


RE: BACnet - how it works on LM? - admin - 21.10.2017

I'll provide an update next week. Which LM hardware version are you running?


RE: BACnet - how it works on LM? - admin - 27.10.2017

Update BACnet packages with ability to set port for read/write requests. BACnet scanner will still use default port.
Code:
require('bacnet')
bacnet.port = 0xBAC1
bacnet.write(260001, 'analog value', 0, 0, 22)

Old CPU:
https://dl.openrb.com/lm-17/pkg/bacnet_20171018_mxs.ipk
https://dl.openrb.com/lm-17/pkg/genohm-scada-bacnet_20171027_mxs.ipk

New CPU (Power version):
https://dl.openrb.com/lm-17-imx6/pkg/bacnet_20171018_imx6.ipk
https://dl.openrb.com/lm-17-imx6/pkg/genohm-scada-bacnet_20171027_imx6.ipk

Note that BACnet server settings will be reset after package installation.