eclipse / kura

Eclipse Kura™ is a versatile framework to supercharge your edge devices, streamlining the process of configuring your gateway, connecting sensors, and IoT devices to seamlessly collect, process, and send data to the cloud.
https://eclipse.dev/kura/
Eclipse Public License 2.0
494 stars 305 forks source link

Allow patterns for building the final MQTT topic #1752

Closed ctron closed 6 years ago

ctron commented 6 years ago

Right now the final MQTT topics are structured like this: [$EDC]/<tenant>/<client-id>/<application>/custom/topic/structure.

For the LWT this is configurable using the MqttDataTransport service configuration. But it is not for topics in general.

So as discussed during EclipseCon with @cdealti it would be a valuable addition to Kura to make this configurable as well for data and control topics in a pattern style way (like the LWT pattern).

This would allow it e.g to connect to Eclipse Hono by adding the "telemetry" prefix just by configuration of the MqttDataTransport service.

e.g.: data-topics: telemetry/#account-name/#device-id/#application/#topic which might resolve into telemetry/my-device/my-app/my/custom/topic.

cdealti commented 6 years ago

@ctron since EclipseCon, the Hono project has created an MQTT Adapter for Eclipse Kura. We also wanted to make the topic namespace of the Kura default CloudService more configurable to support other Cloud platforms but it turned out that this is too difficult. The Kura way to address this is to develop a new CloudService implementation.

About Hono, Kapua and Kura, we are talking together and we will hopefully see interesting things happening over the next months.

For these reasons I suggest to close this issue.

ctron commented 6 years ago

That is sad to hear, as others might have had a benefit from that as well. But if there is no other way, then go ahead and close it.

cdealti commented 6 years ago

Seemed a good idea and we tried with a commercial Cloud platform and decided it's not worth. Thanks for understanding.

devinsaini commented 1 year ago

@cdealti Is there any further development on this topic? Is the recommended way still to implement a CloudService to work with Hono? I'm trying to connect Kura to Hono and getting the same issue that Kura's telemetry topics don't include telemetry/ prefix that Hono expects.

discarding message [topic: tenant1/device1/HEATER/temperature, authenticated device: device [device-id: device1, tenant-id: tenant1]]: org.eclipse.hono.client.ClientErrorException: no such endpoint

MMaiero commented 1 year ago

Hi, did you give a go to the Eclipse IoT connector? https://github.com/eclipse/kura/tree/develop/kura/org.eclipse.kura.cloudconnection.eclipseiot.mqtt.provider

devinsaini commented 1 year ago

@MMaiero Thanks a ton for the pointer. I tried the Eclipse IoT connector and it works perfectly with Hono. Thank you.