How do I encode a Configuration Downlink for an Air Temperature and Humidity Sensor?

How do I encode a Configuration Downlink for an Air Temperature and Humidity Sensor?

A downlink message is one that is sent to the sensor from the cloud and is used to configure the sensor itself.
Messages cannot be initiated from the cloud since the sensor is typically sleeping and the radio is turned off, so the sensor itself must initiate a downlink message.
The supervisory, reset, and tamper-open (not tamper close) messages all request a downlink message as a response, and the response must be received within 30 seconds of the request.

This article describes how to create a downlink configuration specific to Air Temperature and Humidity Sensors.
Follow this link for help with creating General Configuration Downlink Messages.

NOTE:  All downlinks must contain a total of (8) bytes, padded with zeros at the end when necessary.

Air Temperature and Humidity Configuration Message: 0x0D 
      Byte            Description
      0   Reporting Mode (0x00 for Threshold, or 0x01 for Report on Change)
      1-6   Defined by Mode (See Mode sections)

Threshold Mode Configuration: 0x0D00...
      Byte            Description
      1   Periodic reporting in 1 minute or 1 hour intervals. Default is 0 (disabled)
      2   Restoral margin (bits 7:4 for humidity, bits 3:0 for temperature). Default 5 degrees C for temperature and 5% for humidity.
      3   Lower temperature threshold. Default 10 degrees C.
      4   Upper temperature threshold. Default 40 degrees C.
      5   Lower humidity threshold. Default 40% relative humidity.
      6   Upper humidity threshold. Default 60% relative humidity.

Report on Change Configuration: 0x0D01...
      Byte            Description
      1                   Periodic reporting in 1 minute or 1 hour intervals. Default is 0 (disabled)
      2                  Not used
      3                  Temperature increase (increments of 1 degree C)
      4                  Temperature decrease (increments of 1 degree C)
      5                  Humidity increase (increments of 1%)
      6                  Humidity decrease (increments of 1%)

Periodic Reporting Configuration: 
      Bit 7            Bits 6:0
      0                  Period defined in hours (1-127 hours)
      1           Period defined in minutes (1-127 minutes)
      Note that prior to firmware version 1.3, only hourly reporting is available. 
      The firmware version can be found in the reset message and is logged on the Radio Bridge console.

Threshold Mode Configuration Example:

      0D 00 18 A5 8A 1E 0F 3C

      0D                  Downlink Message Type (Air Temp & Humidity = 0x0D)
      00                  Reporting Mode (Threshold = 0x00)
      18                   Periodic Reporting (24 hours = 0x18)
      A5                  Restoral Margin (10% Humidity, 5 degrees C Temperature)
      8A                  Lower Temperature Threshold ( -10 degrees C = 0x8A)
      1E                   Upper Temperature Threshold ( 30 degrees C = 0x1E)
      0F                  Lower Humidity Threshold ( 15% = 0x0F)
      3C                  Upper Humidity Threshold ( 60% = 0x3C)

Report on Change Configuration Example:

      0D 01 8F 00 0A 0F 05 14

      0D                  Downlink Message Type (Air Temp & Humidity = 0x0D)
      01                   Reporting Mode (Report On Change = 0x01)
      8F                  Periodic Reporting (15 minutes = 0x8F)
      00                  Not Used
      0A                  Temperature Increase (10 degrees C = 0x0A)
      0F                  Temperature Decrease (15 degrees C = 0x0F)
      05                  Humidity Increase (5% = 0x05)
      14                   Humidity Decrease (20% = 0x14)

      If the configuration is successful the sensor will respond with a Downlink Acknowledge message:

      1 0 FF 02

      1                    Protocol Version (currently always 0x1)
      0                   Packet Counter, increments by 1 each message and wraps from 0xF to 0x0
      FF                 Message Type (Downlink ACK = 0xFF)
      02                 Downlink Message Valid (Invalid/Undefined = 0x01, Valid = 0x02)

See Also:

    • Related Articles

    • How do I decode an Air Temperature and Humidity event?

      The Air Temperature and Humidity Sensor will generate events when the environment changes to exceed set thresholds or on a periodic basis. Air Temperature and Humidity Event Message: 0x0D       Byte                        Description       0          ...
    • How do I decode an Air Temperature and Humidity event?

        The Air Temperature and Humidity Sensor will generate events when the environment changes to exceed set thresholds or on a periodic basis.   ​ Byte 0: 7-4 Byte 0: 3-0 Byte 1 Byte 2          Byte 3     Byte 4   Byte 5 Byte 6 Protocol version   (4 ...
    • How do I encode a General Configuration Downlink message?

      A downlink message is one that is sent to the sensor from the cloud and is used to configure the sensor itself.  Messages cannot be initiated from the cloud since the sensor is typically sleeping and the radio is turned off, so the sensor itself must ...
    • What is the procedure for sending downlink messages to sensors?

      The recommended way to send a downlink is to use the RadioBridge Console API which uses a simple POST request.  From there you can use the uplink and downlink APIs described in the RadioBridge API Documentation.  To access the API section of the ...
    • How do I decode an External Probe Temperature Sensor Event?

      The External Probe Temperature Sensor will generate events if the temperature rises above or falls below the configured thresholds.   Byte 0: 7-4 Byte 0: 3-0 Byte 1 Byte 2    Byte 3 Byte 4 Protocol version     (4 bits) Counter       (4 bits) ...