How to send sensor data to Kura? - iot

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.

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? =)

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.

Related

How can I combine RPL, UDP and MQTT in Cooja of Contiki-NG?

All this is done in the Cooja simulation.
I need to develop a project in which I have a mote (or many) that acts like a sensor and sends data to a server which does computations and publishes the results on a topic using MQTT.
In both cases I assign IPs to motes using the rpl-border-router example provided by Contiki-NG.
I can publish fake data created by the server and publish it through the border router via MQTT; I can create a tree to send the values from the sensor motes to the server using UDP and compute what The problem is that I can't connect the two.
I don't attach the code because I want to understand the structure that I should use to accomplish this and the general idea behind the solution you propose, if possible
I tried two configurations but none works, because I think I don't have the right structure.
These are the two settings:
one mote per functionality: 1 sensor (1) sending data via UDP to a server (2), this server is set as root using NETSTACK_ROUTING.root_start(), which should publish data through MQTT via the rpl-border-router (3). I think the error here is that the server is set as root, while the rpl-border-router should, but then how can I send data to the server for computations?
use the rpl-border-router (1) as server also, so it computes the outcomes and publishes through MQTT, receiving the values via UDP from sensor mote (2). The problem here is the synchronization between MQTT broker assignment and IPv6 assignments, since both require IP
Thank you

How to load data from a sensor into CrateDB?

We have a sensor that publishes data to a TCP socket.
How could we create an ingest rule in CrateDB to read from that specific socket?
Do we need to use MQTT to read data from the Socket and then publish it as topics so a CrateDB ingest rule can read it?
Such approach sounds inefficient. We would like to populate the table with data directly from the TCP socket. Is that possible?
No this is currently not possible inside CrateDB. Also please aware that the MQTT implementation at CrateDB is deprecated and will be removed in future versions, https://crate.io/docs/crate/reference/en/latest/admin/ingestion/sources/mqtt.html.
Main reasons are that the current implementation was very limited (e.g only implements MQTT Quality of Service (QoS) level one), using a dedicated MQTT ingest service is much more flexible in rule definition and protocol support, etc...

Lora Sensor (Elsys ERS) to Lora antenna (Multitech Antenna)

I am using Lora technology to send Data from a Lora sensor (Elsys ERS: link) to a Lora Base station (multitech MultiConnect Conduit IP67 Base Station: link). I have configured the sensor using an android application (using NFC) as in the manual. For the configuration, I followed the manual (link) of the base station and a youtube tuto (link), but I still do not know how it works.
Now I want to know how to receive a data from this sensor using the cited base station.
PS: the multitech bas station is equipped with a lora antenna.
Thank you for your help.
The solution is to update the software version, called Application Execution Platform (or AEP). Then, you have to "Save and Restart" the system. After that, you can add all the nodes you need by only using the AEP.
It is recommended to "Save and Restart" each time you do a modification on the system. Elsewhere, the modifications risk not to be considered by the system.
For more information, please visit the YouTube channel of Multitech: https://www.youtube.com/watch?v=6-Nw7I6yCuY&t=296s
Good luck.
Make sure your MultiTech gateway is running the latest firmware, 1.6.4 as of this writing.
You will have a bunch of LoRa settings, you will be able to see uplink packets and send downlink packets too.
Most important configuration parameters are:
* DevEUI (like a MAC address of the device).
* Frequency sub-band (your gateway can only do one sub-band, your sensor needs to use the same one; more expensive gateways can do 2 or more sub-bands).
* AppEUI (like a group of devices, the sensor will connect to it)
* AppKey (Encryption key)
If those 4 things are match then your device should be able to connect.

Sending MQTT messages to Orion Context broker

I have a relatively simple switch that sends data whenever the button is pressed (either 1 or 0). The message protocol it uses is MQTT. It is connected to Mosquitto via Wi-Fi and successfully sends data to it (i am able to see it using mosquitto_sub -v -t "#". However, I would like to be able to send this data to Orion Context Broker and then receive it using REST commands and store it using Fiware-Cygnus afterwards.
the topic that sensor publishes messages to is tt/sergo/demo/sw
the name of the sensor presented in mosquitto_sub when sensor is first connected: DMS-A01
the IP - address of sensor: 192.168.0.108
I have installed Iot-Agent UL, which is working, but I don't know how to make it listen to the specific sensor that sends data to Mosquitto.
I read the manuals but either missed something or did not find the solution to my problem.
I tried using the manual below, but could not apply it to my problem.
Connecting "thing" to Fiware
Thank you in advance, stack overflow community.
Before sending measures you need to do a provision operation for the device using the IOTA-UL API. That provision operation "creates" the device in the IOTA-UL and map it with the corresponding entity at CB. Then, you can start sending measures using MQTT.
You can have a look to this piece of documentation for more detail.

Configuration Topology with cooja/contiky

I'm trying to implementing tree topology with Cooja/contiky. Finding through examples i've not been able to find an a good example to find what i need.
In short :
I'd need to implementing a topology of this type(picture here under) with cooja end contiky, is there someone that could give me some advice?
Thanks in advance
I don't really use Contiki Operating System, I have only ever used TinyOS but a network topology such as the one you have should be easily achievable.
For TinyOS, the mote-to-mote radio tutorial HERE will show you how to two different sensor nodes can communicate with each other (a gateway is basically just a sensor node connected to a PC) and the mote-to-PC communication tutorial HERE will show you how a gateway node can forward information from itself to the PC it is connected to. When the network is running you basically have a Java application listening to USB port and receiving packets from gateway node. Once the packet has been received on the Java application then you can send it to an external network server.
It may sound difficult if you have never developed on TinyOS but what you want to do is very common and so there will be complete programs in the tutorial section of a typical TinyOS distribution showing you how to achieve most of the things you need you need to achieve. There should also be similar examples in Contiki.

Resources