dondon
dondon

Reputation: 105

How to send sensor data to Kura?

I am new to Kura. I read the documentation of Kura but I found no instruction on how to connect an edge device to Kura. More specifically, I have a DHT11 sensor connect to a raspberry Pi named A, I have Kura already installed on another raspi (as a gateway) named B . How can I send the data from the sensor on raspi A to Kura on raspi B over MQTT ? I also took a look into the web UI but only found the option to connect to a cloud service.

Upvotes: 1

Views: 583

Answers (2)

pinty
pinty

Reputation: 499

Considering you are not interested in installing Kura on raspi A, a possible stable solution I can think with the tools you have at hand is:

  • Raspi A: create a service that reads your sensor and send it via MQTT to Raspi B. Consider:

    • The format of such data needs to be KuraProtobuf or JSON with this schema:

    {
      "sentOn": 13415414544,
      "metrics: [
        "field1": 5234524,
        "field2": "adsfasd"
      ]
    }
    
    • The topic must be account/client/application/other
  • Raspi B: deploy the Simple Artemis MQTT Broker and create a CloudService connected locally to the broker. Configure it with the proper data format, account and client. Then, create a subscription in such CloudService with the proper application and topic (other)

However, there may be other solutions. For example, the camel routes could provide you a more optimized solution if you have some knowledge.

Upvotes: 0

L.anh
L.anh

Reputation: 11

i'm also a new Kura. You said you must send sensor data to another ras pi, as for me, i must write a driver to collect sensor data from sensor. I read lots of doc, blog,somebody said using pi4j or gpio is the best way. do you have any experience about it? =)

Upvotes: 0

Related Questions