LogoLogo
  • Ruuvi Developer Documentation
  • Ruuvi Hardware
    • RuuviTag B
    • RuuviTag Pro
    • Ruuvi Gateway
    • Ruuvi DevShield
    • Ruuvi Connector Kit
    • TMP 117 External Sensor
  • Ruuvi Connector System
    • Introduction
    • Expansion boards
    • Cables
    • Connectors
  • Ruuvi Sensor Firmware
    • 1.2.12
    • 2.5.9
    • 3.X
      • 3.x Sensors
      • 3.x Heartbeat
    • Device Firmware Update (DFU)
  • Ruuvi Gateway Firmware
    • GW Getting Started
    • GW Web-UI
      • Greeting window
      • Internet connection settings
        • Connection via Wi-Fi
        • Connection via Ethernet
      • Software update
      • Automatic configuration download
      • Automatic updates
      • Access Settings from LAN
      • Cloud Options
        • Backend: HTTP(s)
        • Backend: MQTT(s)
        • Backend: Statistics
      • Time Synchronisation Options
      • Bluetooth Scanning Settings
      • Configuration completion
      • Authentication when accessing from LAN
    • GW Install custom firmware
    • GW nRF52811 Firmware
      • GW nRF52811 selftest
      • GW nRF52811 scanning
      • GW nRF52811 repeating
      • GW nRF52811 UART communication
  • GW ESP32 Firmware
    • GW ESP32 WiFi Hotspot
    • GW ESP32 Button
    • GW ESP32 LED
    • GW ESP32 HTTP Client
    • GW ESP32 MQTT client
  • GW Data formats
    • HTTP: Time-stamped data from Bluetooth-sensors
    • HTTP: Data from Bluetooth-sensors without timestamps
    • MQTT: Time-stamped data from Bluetooth-sensors
    • MQTT: Data from Bluetooth-sensors without timestamps
    • HTTP GET /history (with timestamps) and decoding
    • HTTP: Gateway status
    • Gateway configuration
  • GW Examples
    • Polling mode
    • Poll endpoint "/metrics"
    • Configuration update via API
    • Firmware update via API
    • Configuration download from a remote server via API
    • MQTT examples
    • Home Assistant
    • MQTT+AWS IoT Core
  • Communicate with RuuviTag devices via Bluetooth
    • Bluetooth advertisements
      • Data format 3 (RAWv1)
      • Data format 4 (URL)
      • Data format 5 (RAWv2)
      • Data format C5 (Cut-RAWv2)
      • Data format 8 (Encrypted environmental)
    • Bluetooth connection
      • DIS (Device Information Service)
      • NUS (Nordic UART Service)
        • Heartbeat transmissions
        • Read logged history
    • Real Time Transfer (RTT)
  • Communicate with Ruuvi Cloud
    • Ruuvi Cloud
      • User API
      • Gateway API
      • Internal API
      • Alerts
      • Cloud stored app settings
  • Ruuvi Community projects
    • Integrations
Powered by GitBook
On this page
Edit on GitHub
  1. GW Examples

MQTT+AWS IoT Core

Follow these detailed steps to establish a secure connection and send data from your Ruuvi Gateway to AWS IoT Core using MQTT. This setup uses MQTT over SSL/TLS for encrypted data transmission, ensuring secure communication.

  1. Select MQTT Transport Type:

    • For the transport type, choose "MQTT over SSL". This option encrypts the data, providing a secure connection to AWS IoT Core.

  2. Configure Server Address:

    • Input your AWS endpoint as the Server Address. You can find your unique AWS endpoint in the AWS IoT Core console under the Settings section.

  3. Set Communication Port:

    • Specify 8883 as the port. This is the standard port for MQTT over SSL, ensuring encrypted communication.

  4. Configure Client ID:

    • Input the Client ID provided by AWS, which uniquely identifies your Ruuvi Gateway. You will find this ID in the AWS IoT Core console, formatted as "iotconsole-xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx". The Client ID ensures AWS IoT Core correctly recognizes and manages your device's connection.

  5. Important: Disable Retained Messages:

    • Due to AWS's policy, enabling retained messages can cause AWS IoT Core to immediately close the connection upon receiving the Last Will and Testament (LWT) message. Therefore, it is crucial to disable the use of retained messages to maintain a stable connection. This step prevents potential disruptions and ensures continuous data transmission to AWS IoT Core.

  6. Configure SSL/TLS Certificates:

    • Enable "Use client SSL certificate".

      • Upload the Client Certificate File (.crt) and the Client Private Key File (.key) provided by AWS when you registered your device.

    • Enable "Use custom SSL certificate for the server".

      • Upload the Server SSL Certificate. This is usually the Amazon Root CA 1 certificate available from AWS documentation.

  7. Select Data Format:

    • Choose the preferred format for the data you are sending to AWS IoT Core. Options typically include:

      • Raw Data: Sends the data as collected by sensors without processing.

      • Decoded Data: Sends data that has been processed or formatted.

      • Both: Sends both raw and decoded data, providing comprehensive information.

PreviousHome AssistantNextBluetooth advertisements

Last updated 1 year ago