Sign in Sign up
Minol ZENNER Connect Logo
Minol ZENNER Connect Logo
  • Sign in
  • Sign up
  • English
    • German

Tag: Open source

B.One Middleware Howto: Connection to the IoT Platform Thingsboard

– 📖🕓 ≈  6 min – In my last two articles I have already shown you how you can connect the B.One.Middleware to the IoT platforms TagoIO and Kaa. In this…

Pampa98 29. July 2021

B.One Middleware Howto: Connection to the IoT Platform Kaa

– 📖🕓 ≈  6 min – In my last article I already showed you how you can connect the B.One Middleware to the IoT platform TagoIO. Today we come to the…

Pampa98 27. July 2021
0 Comments

B.One Middleware Howto: Connection to the IoT Platform TagoIO

– 📖🕓 ≈  6 min – As you may already know, the versatile B.One Middleware can be flexibly connected to various IoT systems. In the following small series of articles I…

Pampa98 20. July 2021

Grafana Howto: From B.One Middleware via MQTT to InfluxDB

– 📖🕓 ≈  5 min – In the last articles you have already been given a small introduction to the open source tool Grafana. It was also reported how to install…

kirchi 21. June 2021

Grafana Howto: Connect a Database as a Data Source

– 📖🕓 ≈  3 min – We introduced and described Grafana in the previous articles “Open Source Tool Grafana – An Introduction” and “Grafana Howto: Local Installation & Setup Using Ubuntu…

Community Admin 8. June 2021

Grafana Howto: Local Installation & Setup using Ubuntu as an Example

– 📖🕓 ≈  4 min – The article “Open Source Tool Grafana – An Introduction” has already described what kind of tool it is and what you can basically do with…

Community Admin 4. June 2021

Open Source Tool Grafana – An Introduction 

– 📖🕓 ≈  4 min – In the digital age, the monitoring and display of systems and databases, both in private and in business, are very popular and almost fundamental. Therefore…

Community Admin 27. May 2021
0 Comments

Who’s Online

Online 0
There are no users currently online

Search

Categories

Tags

Alarming B.One Community CO2 level CO2 measurement CO2 sensor Competition Connectivity door sensor GatewayPLUS GatewayPLUS Outdoor GatewayPLUS Smart Howto indoor climate indoor climate monitoring Instructions IoTandMe IoT platform Leakage monitoring LoRaWAN LoRaWAN network Minol ZENNER Monitoring Monitoring Network access Notifications Opening state Open source Payload configuration PLUG&PLAY room temperature sensitive Sensitive strips Sensor technology Strip Configuration App Strips multi-sensor Strips Multi-Sensor +Drip Temperature Temperature monitoring Tool Trainee contest Visualization tool ZENNER ZENNER CO2 indicator ZENNER IoT GatewayPLUS ZENNERShop

Recent Posts

  • LoRaWAN® on the Construction Site: Use Cases, Advantages & Practical Example
  • B.One Community Howto: Staying Up to Date
  • Room climate dashboard based on B.One Middleware Part 2: Technical Implementation
  • B.One Gallery Howto: Set Up & Manage Notifications
  • B.One Community Howto: Use forums for knowledge exchange
© 2023 - B.One Community
  • Privacy Policy
  • Imprint
  • Help
  • Terms of Use

Forum Description

In my last two articles I have already shown you how you can connect the B.One.Middleware to the IoT platforms TagoIO and Kaa. In this post, I will now do this with the third platform in this series. This is Thingsboard. Thingsboard is an IoT platform for collecting, processing and visualizing data. The platform is free provided you host it yourself. In this post I will use a demo version of Thingsboard for demonstration. As in the last post, I will go into how to create a sensor on the platform, how to connect the middleware to this platform (http) and last but not least, how to visualize the data on so-called dashboards.

Step 1: Applying a Sensor

To create our first device we click on Devices in the main menu. There we can then create our first device using the + icon at the top right. This now acts as a "digital twin" that represents a real device. After clicking on the device, an overview with the device details opens. First of all, the “access token” is important. This serves as a kind of password to authenticate the sending device. We can copy the latter directly via the “Copy Access Token” button.
[caption id="" align="alignnone" width="1280"] Thingsboard: Copy device token[/caption]

Step 2: Connection of the B.One Middleware

Now that we have set up our digital twin on the platform, we can connect a real device to it. In this post, we use HTTP as the transmission standard. After setting up a corresponding forwarding as described in the blog article “B.One Middleware forwarding options”, the sensor data is sent to the platform. The URL used for the redirect must be constructed like the following example: http://HOST_NAME/api/v1/ACCESS_TOKEN/telemetry Of course, the attributes HOST_NAME and ACCESS_TOKEN still have to be replaced by the corresponding parameters. Example:
[caption id="" align="alignnone" width="1481"] B.One Middleware: Set up a forwarding rule[/caption]
After successful reception, the data can be found in the device details under the item latest telemetry.
[caption id="" align="alignnone" width="1280"] Thingsboard: View device telemetry[/caption]
When the platform receives data from the middleware, it is in JSON format. A summary of the most important data of the telegram can be found under data/unmapped:
data : {
unmapped{           //hier sind die Daten
}
}
In this case, "data" is the key and everything behind it is the value for this. We can later visualize the data by querying a key and displaying its value. Well, in this case, however, represents a key all the data relevant to us. In order to work with the data, we need a separate key for each value that is important to us.
[caption id="" align="alignnone" width="1280"] Thingsboard: View device telemetry[/caption]
To achieve this, a rule chain can be created. Chains of rules determine how data is processed when it arrives on the platform and where it is stored. To create a rule chain Go to rule chains/"rule chains" in the left menu bar and then add a new rule chain via the + icon in the top right. If we now click on the new chain, an editing window opens in which there is already a so-called “Input” node. The data arrives at our control chain via this input node.
[caption id="" align="alignnone" width="1280"] Thingsboard: create a chain of rules[/caption]
[caption id="" align="alignnone" width="1280"] Thingsboard: edit rule chain[/caption]
From the left bar we now drag a “script” and a “safe timeseries” node into our editing window. The "script" node is there to process data and the "safe timeseries" node then stores it. We initialize the “script” node as follows: [caption id="attachment_14072" align="alignnone" width="500"] Thingsboard: configure nodes of the rule chain[/caption]
Appending msg.data.unmapped in msg: ensures that each value pair in unmapped becomes its own key/value pair. The value msg stands for all data of the telegram. The "safe timesieries" node only needs to be named. To connect two nodes, we click the endpoint of the first and drag it to the second node. In this example, the "Success" condition is required for the connection between the "script" and the "safe timeseries" nodes.
[caption id="" align="alignnone" width="1365"] Thingsboard: overview of the rule chain[/caption]
Now the new rule chain has to be attached to the "Root Rule Chain". The "Root Rule Chain" is the "main" chain of rules that is traversed whenever we receive data. To attach our new chain, we now open the "Root Rule Chain". Here the "safe timeseries" node can now be deleted and replaced by a "rule chain" node. When choosing the chain of rules, we use the chain we just created. In the example this is "newRuleChain". Our chain of rules is complete.
[caption id="" align="alignnone" width="1280"] Thingsboard: link rule chains[/caption]

Step 3: Visualization of the Sensor

Step 3.1: Create Dashboard

On things board we can create an unlimited number of dashboards. To design these, the platform offers a variety of different widgets. To create our first dashboard, we click on the “+” icon under Dashboards in the main menu. Then we name the dashboard and click on “Add”.
[caption id="" align="alignnone" width="1280"] Thingsboard: create a dashboard[/caption]
We can then open the dashboard by clicking on “open dashboard”. However, before we can design our first dashboard, we have to switch to the so-called “edit mode” of the dashboard. We can activate this via the pen icon at the bottom right. Then we have to give our device a dashboard alias. To do this, click on the device icon at the top right and create an alias. In the following we will create a chart and a map widget as an example.
[caption id="" align="alignnone" width="1280"] Thingsboard: Create device alias[/caption]
[caption id="" align="alignnone" width="1280"] Thingsboard: Configure device alias[/caption]

Step 3.2: Create Chart Widget

If we click on the plus button at the bottom right and then on “create widget” we get an overview of the widget categories. From the Chart Widgets category, we now select the “Timeseries Line Chart”. This shows us the course of data such as the temperature over a certain period of time. We choose our previously created device alias as the data source and for “Entity timeseries” one or more values that we want to have visualized. Upon completion, our first widget can be seen on the dashboard.
[caption id="" align="alignnone" width="1280"] Thingsboard: Configure chart widget[/caption]

Step 3.3: Create Map Widget

Now let's create a map widget to track the location of our devices. We choose “OpenStreetMap” for this. The configuration is similar to the Chart widget, with the difference that we select the values “longitude” (longitude) and “latitude” (latitude) as entity attributes.
[caption id="" align="alignnone" width="1280"] Thingsboard: configure map widget[/caption]
Our first dashboard is now complete. At the top right we can use the clock icon to specify which period of time we would like to have visualized.
[caption id="" align="alignnone" width="1280"] Thingsboard: Overview dashboard[/caption]
You now also know how the B.One Middleware Thingsboard can be connected and how you can visualize your data on dashboards there. In the coming days I will introduce you to an additional platform. Until then, have fun trying it out!

COOKIES:

In order to provide you with the best possible user experience and offer, we use cookies on our website that are not only technically necessary but also serve to analyse access. By clicking on 'Accept all' you agree to this. You can find more detailed information and how to revoke your consent at any time in our Privacy Policy. (Decline)
Cookie settingsAccept all
Einwilligung erneut aufrufen

Your Cookie Consent

Our website uses cookies to help us improve our website and provide you with the best possible service. These cookies are necessary and cannot be disabled. We also use cookies to analyse the traffic on our website. By clicking on 'Accept', you agree to our cookie policy:
Essential
Always Enabled
Essential cookies enable basic functions and are necessary for the proper functionality of the website.
Statistics
Statistics cookies collect information anonymously. This information helps us understand how our visitors use our website.
SAVE & ACCEPT