1. Home
  2. Docs
  3. The Level Meter
  4. Technical Specifications
  5. IoT Connectivity

IoT Connectivity

[vc_row][vc_column][vc_column_text css=\”\”]

The Level Meter is a sophisticated device used for monitoring environmental and industrial conditions, such as temperature, motion, and location-based data. It has multiple sensors and connectivity options that enable seamless communication with cloud platforms and other devices.

Communication Technologies

  • Wi-Fi or Cellular (LTE/5G): The Level Meter can use Wi-Fi or cellular networks (via an embedded SIM module) to transmit data to a cloud platform, allowing remote monitoring and real-time analytics.
  • MQTT: Lightweight messaging protocol used for efficient communication. It allows the Level Meter to send data to the cloud with minimal overhead and quick response times.
  • LoRa: In remote or rural areas, LoRa connectivity can be used to transmit data over long distances with low power consumption. The Level Meter can leverage this technology in areas where traditional cellular coverage may be limited.
  • OTA Connectivity
  • LTE NB-IoT: Cat NB2: B1/B2/B3/B4/B5/B8/B12/B13/B17/ B18/B19/B20/B25/B28/B66/B70/B85

LoRa Connectivity

  • Used for environmental monitoring, asset tracking, and container-level detection.
  • Transmits sensor data (temperature, motion, battery level, etc.) at scheduled intervals.
  • Can trigger alarms based on threshold values (e.g., low battery, missing measurement, geofence violation).

Example of LoRa Payload

{
\"device_id\": \"LM123456\",
\"timestamp\": 1711532400,
\"temperature\": 23.4,
\"motion_detected\": true,
\"battery_level\": 78,
\"signal_strength\": -85
}

LoRaWAN supports different communication classes based on device requirements:

Mode Description Use Case (Device)
Class A Ultra-low power, devices communicate only when sending data Ideal for battery-powered Level Meter & LCT
Class B Scheduled reception windows for downlink messages Useful when periodic commands are needed
Class C Always listening, consumes more power Used for real-time control (not recommended for LM & LCT)

OTA Updates for Level Meter

The Level Meter is a sophisticated device with a variety of sensors (such as temperature, motion, and accelerometer). OTA updates ensure that the device can be remotely updated with new features, bug fixes, or security patches without requiring physical access.

How OTA Works for Level Meter:

  1. Firmware Update Process:

    • The device periodically checks a cloud server (or another designated source) for available firmware updates.
    • When an update is available, the Level Meter establishes a secure connection to the server and downloads the update.
    • The update is validated (via checksums, digital signatures) to ensure integrity and authenticity.
    • The firmware update is then installed, and the device reboots to apply the new firmware.
    • If needed, the device can be configured remotely to adapt to the new features or settings introduced by the update.
  2. Update Methods:

    • MQTT (Message Queuing Telemetry Transport): Used for lightweight communication between the Level Meter and the cloud. The update command can be sent via an MQTT topic, signaling the device to download and install the firmware update.
    • HTTP/HTTPS: Secure HTTP/HTTPS protocols can also be used to fetch and install firmware files from a cloud server.
    • CoAP (Constrained Application Protocol): In resource-constrained environments, CoAP can be a lightweight alternative for IoT devices to receive updates over low-bandwidth networks.
  3. Example of Firmware Update Payload:

{
\"device_id\": \"LM123456\",
\"update_type\": \"firmware\",
\"version\": \"v2.0.1\",
\"url\": \"https://server.com/firmware/LMT_v2.0.1.bin\",
\"checksum\": \"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\",
\"signature\": \"MIIBIjANBgkqhkiG9w0BAQEA7ENwFz5H8AyYmHoLBffZuFbKNF\"
}

Example MQTT Code

import paho.mqtt.client as mqtt

# Config. broker MQTT
BROKER = \"mqtt.example.com\"
PORT = 1883
TOPIC = \"levelmeter/data\"
CLIENT_ID = \"LevelMeterClient\"

# Callback to receive messages
def on_message(client, userdata, message):
print(f\"Messaggio ricevuto: {message.payload.decode()} su {message.topic}\")

# Creation client MQTT
client = mqtt.Client(CLIENT_ID)
client.on_message = on_message

# Connection to broker
client.connect(BROKER, PORT)

# Subscribe to the topic
client.subscribe(TOPIC)

# Pubblication of a message
payload = \'{\"temperature\": 22.5, \"motion\": true}\'
client.publish(TOPIC, payload)

# Set the loop to receive messages

client.loop_forever()

[/vc_column_text][/vc_column][/vc_row]

How can we help?