Skip to content

DnomaidGit/KuraIotMqtt

Repository files navigation


KuraIotMqtt


Table of Contents

  1. General Info
  2. Development Environment
  3. System Requirements
  4. Build sources
  5. Tested
  6. Binary package
  7. List of IoT device
  8. Topics Publish
  9. Tutorial
  10. Links

General Info

It is a simple Kura component to scheduler the switching on/off of relays. We will use Mqtt for sending messages and we can choose different devices.


Development Environment

  • Eclipse Neon Version: 2019-09 R (4.13.0). An additional plugin, mToolkit, is needed to allow remote connectivity to an OSGi framework on a Kura-enabled target device. To install mToolkit into Eclipse, use the following steps:
    • Open the Help | Install New Software… menu.
    • Add the following URL as an update site based on your version of Eclipse http://mtoolkit-neon.s3-website-us-east-1.amazonaws.com
    • Install the “mToolkit” feature (you need to uncheck the Group items by category checkbox in order to see the feature).
    • Restart Eclipse. In the menu Window | Show View | Other, there should be an mToolkit | Frameworks option. If so, the plugin has been installed correctly.
  • Development platform Linux (Debian 10).

System Requirements

  • Eclipse Kura 5.0.0 is compatible with Java 8 and OSGi R6.
  • Zigbee2Mqtt.

Build sources

The only requisite to build from sources is an already
installed Eclipse Kura User Workspace.


Tested

  • Raspberry pi 3 and 4.
  • Eclipse Kura 5.0.0.
  • Gateway Zigbee CC2531

Binary package

The binary package ready for the installation can be found in folder "resources/dp".

BUNDLE COMMENT
clientMqttDnomiad.dp Client mqtt
mqttApiDnomaid.dp Client mqtt Api
mqttDeviceDnomaid.dp Configuration of mqtt devices
mqttScheduleDnomaid.dp Relay time scheduler
iotDnomaid.dp Contains all previous bundles

List of IoT devices

A list of IoT devices used within the project:

  • Sonoff20 (Tasmota)
  • XiaomiZNCZ04LM (Zigbee2mqtt)

Topics Publish

The publish topic is created automatically and the device has to be configured with this same topic.

  1. Sonoff20: Dnomaid/cmnd/Router_1/Sonoff20_Number Device/Relay_1/POWER.
    • Example:
      • Configuration (Eclipse Kura Web UI): Type device: Sonoff20; Number Device: 1.
      • Topic (Tasmota): Dnomaid/Router_1/Sonoff20_1/Relay_1
  2. XiaomiZNCZ04LM: Dnomaid/mix/CC2531_1/XiaomiZNCZ04LM_Number Device/RelaySensorClimate_1/set.
    • Example:
      • Configuration (Eclipse Kura Web UI): Type device: XiaomiZNCZ04LM; Number Device: 2.
      • Topic (Zigbee2mqtt): Dnomaid/mix/CC2531_1/XiaomiZNCZ04LM_2/RelaySensorClimate_1.

Tutorial

Watch the video on youtube.

Watch the video


Links

Android application: