as79dev / introduction

Code examples and additional documentation for using Calimero

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Introduction to Calimero

This repository contains additional documentation for Calimero and code examples using Java and Kotlin.

All examples require Java 11 and can be built using Gradle (./gradlew build). A single example can be executed via Gradle by specifying the class like ./gradlew run -DmainClass=GroupMonitor.

For Kotlin, an example can be run via Gradle by appending "Kt" to the class name, e.g., for DiscoverKnxServers this would be ./gradlew run -DmainClass=DiscoverKnxServersKt

Guide for the KNX push-button device example

  • Run the example in your IDE, or command line using ./gradlew run -DmainClass=PushButtonDeviceWithDiscovery

  • Use process communication to read/write the push button state, for example in the ETS group monitor. Or with the Calimero tools group monitor in a second terminal (./gradlew run --args "groupmon 224.0.23.12") and enter the following commands:

   read 1/0/1 switch
   [response should be printed with switch state off]
   write 1/0/1 on
   r 1/0/1
   [response should be printed with switch state on]
   Ctrl^C
  • Read device information of the Calimero KNX device, for example with the ETS device info diagnostics. Or, use the Calimero device info tool ./gradlew run --args="devinfo 224.0.23.12 1.1.10".

  • Discover the KNX IP device. With the Calimero discover tool, ./gradlew run -Dexec.args="discover"

    Example output:

      Using 192.168.10.10 (en0)
      -------------------------
      "Push Button (KNX IP)" endpoint 192.168.10.17:3671 (IPv4 UDP)
      KNX address 1.1.10
      KNX medium KNX IP
      Installation 0 - Project 0 (ID 0)
      KNX IP multicast address 224.0.23.12
      MAC address f4:5c:89:8a:f4:9b
      Supported services: Core (v1)
    

Archived examples

About

Code examples and additional documentation for using Calimero


Languages

Language:Java 76.5%Language:Kotlin 23.5%