Skip to main content

KNX / LoRaWAN Server 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.

LoRaWAN packet

The LoRaWAN I/O server implementation complies with the Semtech's paket forwarder protocol v4.0.1

On the LoRaWAN router, it is necessary to activate a port-forwarding rule for the LoRaWAN traffic to the IP address of HSYCO.

Add a LoRaWAN I/O Server

1. Go back to the Manager splash page

2. Click on Settings.

3. Add a new I/O server.

4. Click on the type field.

5. Type "lora"

6. Select LORAWAN.

7. Click the name field.

8. Type an unique name for the I/O server, for example "lora"

9. Click Confirm.

10. Click "Apply & restart"

11. Click Save to confirm.

Connect a LoRaWAN device

To connect a LoRaWAN device use the LoRaWAN Utiliy.

Once a device is successfully connected, you will see its datapoints in the Status Browser.

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:

#when a KNX group is set to 1, send a command to a LoRaWAN device
io knx.1/2/3 = 1 : io lora.dev.13.queue.ch30 = 0

#when a LoRaWAN device sends a temperatura data, multiply * 10 then send id to KNX
io lora.dev.212.data.ch101 : $temp212 = io lora.dev.212.data.ch101, $temp212 * 10, $temp212 round 0, io kxn.4/5/6 = $temp212

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 LoRaWAN device status to a KNX datapoint
if (name.startsWith("lora") && name.endsWith(".ch101")){
var lowergroup = name.split(".")[2];
if (lowergroup <= 256){
ioSet("knx.0/0/"+lowergroup, value);
}
}
}