Stop the war

Stand with Ukraine flag

Support Ukraine

Try it now Pricing
Professional Edition
Community Edition Professional Edition Cloud Edge PE Edge IoT Gateway License Server Trendz Analytics Mobile Application PE Mobile Application MQTT Broker
How to connect Wireless open/close logger to ThingsBoard?
Getting Started Documentation Devices Library Guides Installation Architecture API FAQ
On this page

How to connect Wireless open/close logger to ThingsBoard?

Introduction

Wireless open/close logger

Wireless open / close sensor detects and logs in its memory events of door opening and closing.
If a change of state is detected, the device immediately sends the notification to cloud.
The device uses magnetic sensor to detect open / close event.

Efento NB-IoT sensors transmit the data over cellular network (Narrowband IoT) and do not require any additional devices (router, gateway, etc.).
Sensors are also equipped with Bluetooth Low Energy interface, which allows quick and easy configuration with a smartphone.
Efento NB-IoT sensors can be integrated with any cloud platform.

  • Sensor detects open / close events
  • Batteries ensure up to 10 years of maintenance free operation
  • NB-IoT sensors send the data over the cellular network to Efento Cloud or any other cloud platform.
  • Sensor’s configuration can be changed remotely from the cloud or with a mobile application over Bluetooth Low Energy
  • The device stores 40,000 measurements in its memory, when the memory is full, the oldest measurements are overwritten

Prerequisites

To continue with this guide we will need the following:

Create device on ThingsBoard

Create device profile

Before you add an Efento sensor to the platform you need to create a new Device profile for Efento device.

  • Log in to your administrator account and navigate to Device profiles section. Click on the + icon in the upper right corner to add a new profile. Select Create new device profile.

  • Fill up the profile name (mandatory) and configure optional settings (Rule chain, Queue Name, Description). Once you are ready press Next: Transport configuration button.

  • From the dropdown menu in the Transport type field select CoAP and from the dropdown menu in CoAP device type field select Efento NB-IoT, press Add button to save.

  • Once the profile is ready you will see it on the list in the Device profiles section. If you plan to use your ThingsBoard instance only with Efento sensors you can set the profile as default.

Configuration of the “Alarm rules” and “Device provisioning” tabs is optional.
If you want to learn more about these features please refer to the documentation.

Create a device

In order to save a data from the sensor we should also create a device on ThingsBoard.

  • Go to the Device groups section of ThingsBoard. You can either create a new device group or use the default one (All). Click on the + icon in the upper right corner to add a new device.

  • Name the device, in the Transport type field select CoAP. Choose Select existing profile option and add the profile you have recently created for Efento sensors. Press Next: Credentials button.

  • Select Add credential and in the Access token field set the new access token, which will be used by a sensor to validate in the platform. Note that the token must be unique for each sensor. Configuration of the token is optional. Press Add button to save.

  • Once the device is added, it appears within group All list in Device groups section.

Connect device to ThingsBoard

The whole configuration of Efento sensors is done with a free mobile application for Android.
Application can be downloaded from Google Play.
Before you start configuration make sure the sensor is able to register in the NB-IoT network and the APN settings are right. Detailed user manual of Efento NB-IoT sensors and Efento mobile application can be found in the support section of Efento website.

  • Once you download and install the application select “Nearby sensors” mode and unlock the power user mode: open the application menu and quickly tap Efento logo five times.

  • Make sure the APN you use allow the device to connect to the server on which your ThingsBoard instance is running. You can check the network status in the Efento mobile application. Connect to the sensor -> click on the menu (three dots in the upper right corner)

  • Click on Cellular network status. Mare sure that the field “Registration status” value is either “REGISTERED” or “REGISTERED_ROAMING”

  • Set the sensor to send the data to the server on which ThingsBoard instance is running. Connect to the sensor -> click on the menu (three dots in the upper right corner).

  • Click on Power user -> Server configuration. Select “Other” and fill in the address of the server (coap.thingsboard.cloud). Default port used for CoAP communication is 5683. Set authentication mode to “custom token” and key in the token you created for the device on ThingsBoard platform.

Set the CoAP endpoints, to which the sensor will send the data. Click on the menu (three dots in the upper right corner) -> Power user -> CoAP endpoints. Set the endpoints to the following values:

  • Data: “efento/m”
  • Time: “efento/t”
  • Configuration: “efento/c”
  • Device Info: “efento/i”

Check data on ThingsBoard

Trigger the transmission in order to check if the device sends the data to your ThingsBoard instance.
Click on the menu (three dots in the upper right corner -> Trigger transmission.
If everything is set correctly, you should see the data in ThingsBoard, to do this:

  • Click on the device and the most recent data from the device will be visible in the “Latest telemetry” tab.

Doc info icon

Important!
For orders over 250 devices Efento can pre-configure the devices for you, so they will send the data to your ThingsBoard instance out-of-the-box and no configuration will be required on the sensor side.
Efento will provide you with a csv file, which allows you easily add and provision all the devices at once on ThingsBoard instance.

Conclusion

With the knowledge outlined in this guide, you can easily connect your Wireless open/close logger and send data to ThingsBoard.

Explore the platform documentation to learn more about key concepts and features. For example, configure alarm rules or dashboards.