Skip to main content

KNX / BACnet Client Gateway

To access HSYCO Manager open a browser and type the URL:

https://192.168.1.50/hsycoserver/manager

note

The IP address and the URLKey written above are the default ones

Add a KNX I/O Server

Follow these steps of this tutorial:

Add a KNX I/O Server

Import a KNX project

Check the connection status

1. Let’s now check the connection status of the KNX I/O server we just added. Go back to the Manager splash screen and click on Status Browser.

2. Click the "Filter" field to search for the connection datapoint.

3. Click on the settings icon.

4. If the datapoint ‘knx.connection’ is equal to ‘online,’ this means that the KNX I/O servers is successfully connected to HSYCO.

Add a BACnet I/O Server

1. Go back to che Manager splash screen

2. Click on Settings

3. Click "I/O Servers"

4. Add a new I/O server.

5. Click the type field.

6. Type "bac"

7. Select BACNET.

8. Click on the name field.

9. Assign a unique name to the I/O server, for example "bac"

10. Click the IP input field.

11. Type the broadcast IP address of the LAN used for BACnet traffic, for example: "192.168.1.255".

12. Click Confirm.

13. Click on the option icon.

14. Add a new option.

15. Click on the option field.

16. Select "eventslog".

17. Click the value field.

18. Select "true". If the general eventsLog option is also true in System Settings, BACnet events for this gateway are written in the log files.

19. Click "Confirm"

20. Close the options popup.

21. Click Save.

22. Click "Save" again to confirm.

The BACnet Utility

The BACnet Utility provides a graphical interface to browse all BACnet/IP devices available on the network, to show all objects of a device, and all properties and values of any object instance.

The BACnet Utility application allows you to find all BACnet/IP devices available on the network, to show all objects of a device, and all properties and values of any object instance. It also supports writing values to writable properties. Whenever a BACnet I/O Server is defined in HSYCO, the BACnet Utility will appear among the applications of the manager.

EVENTS scripting

1. From the Manager splash screen select Code Editor.

2. Click "New Events File"

3. Give a name to your script, for example: "gateway.txt"

4. Click "New File"

5. Now it's time to write some lines of code.

For further information about the logic of EVENTS programming, read EVENTS programming quickstart

Let's start with some simple functions:

#every 10 seconds read the present value of a BACnet object then copy it to a KNX group
INIT : PROGRAMTIMER readbac = REPEAT 10
PROGRAMTIMER readbac : IO bac.123.analogoutput.1 = readproperty:presentvalue
IO bac.123.analogoutput.1.presentvalue : io knx.1/2/3 = IO bac.123.analogoutput.1.presentvalue


#copy the value of a knx group to a BACnet object
IO knx.4/5/6 : $value1 = IO knx.4/5/6, IO bac.21.pulseconverter.0 = writeproperty:adjustvalue: $value1


#subscribe to a BACnet object then when it changes status copy the new value on a KNX group
INIT : IO bac.21.analoginput.0 = subscribecov
IO bac.21.analoginput.0.presentvalue : IO knx.7/8/9 = IO bac.21.analoginput.0.presentvalue

Click ‘Save’ in the upper right corner to activate this script.

The complete list of all the datapoints generated by an I/O Server is available in the Integrations section.

You can use Javascript as well:

function IOEvent(name, value) : {
//copy a KNX group status to a BACnet object
if (name.startsWith("knx") ){
//knx.1/2/3
var splitted = name.split(".");
var lowergroup = splitted[1].split("/")[2];
ioSet("bac.123.analogoutput." + lowergroup, "writeproperty:presentvalue:" + value);
}
}