Bluetooth 4 UUIDs used by Trygvis IO


Bluetooth 4 UUIDs used by Trygvis IO

Trygvis.io base UUID: 32D0xxxx-035D-59C5-70D3-BC8E4A1FD83F.

Services

Status Panel: 0x0001

Soil Moisture: 0x0010

Included characteristics:

  • Soil Moisture Level

Characteristics

Gauge Data: 0x0002

Gauge Control: 0x0004

Soil Moisture Control: 0x0011

Each soil moisture control endpoint controls a set of soil moisture sensors. The sensors are indexed from 0 to soil moisture sensor count - 1. Every sensor has a value which is the soil moisture measured by the sensor, an update interval specifying how ofte the device should measure the soil moisture, a warning level that specifies when the device should send a notification and a name used to identify the device.

The characteristic can be used with or without response notifications. To use it without a notification write a command and then read the response. If notifications are enabled, the device will send a notification as soon as the command is processed. Even if the notifications is sent is it possible to read the response.

Packet Format

The format is the same for both requests and responses:

  • uint8_t code - the command code
  • payload - specified by the command. May be empty.

Commands

Get Sensor Count Request

  • payload - no payload

Get Sensor Count Response

  • uint8_t - number of sensors

Get Sensor Value Request

  • uint8_t - the sensor's index

Get Sensor Value Response

  • uint16_t - the sensor's value

Set Warning Value Request

  • uint8_t - the sensor's index
  • uint16_t - the warning value

Set Warning Value Response

No data.

Get Warning Value Request

  • uint8_t - the sensor's index

Get Warning Value Response

  • uint16_t warning_value

Set Sensor Name Value Request

  • uint8_t sensor - the sensor's index
  • uint8_t length - the length of the name
  • uint8_t[] name - the name. Must be exactly the number of bytes as specified in the length field.

Set Sensor Name Value Response

No data.

Get Sensor Name Value Request

  • uint8_t sensor

Get Sensor Name Value Response

  • uint8_t length - the length of the name
  • uint8_t[] name - the name. Must be exactly the number of bytes as

Set Update Interval Value Request

  • uint8_t sensor
  • uint8_t interval_in_seconds TODO: this is a way to small type

Set Update Interval Value Response

No data.