obniz Parts Library

TR7

GitHub
TR7
Usable Devices :
obniz_board
m5stickc
obnizble
esp32
esp32gateway
m5stackbasic
ak-030
obnizble_lte
obniz_plc

TR7 series

This is BLE sensor series from T&D corporation.
They can measure temperature and humidity data.

obniz.js supports TR71, TR72 and TR75.

Get the data

Extract the data from an advertisement.

Result format:

{
  deviceSerial: DeviceSerial
  controlCode: Control Code
  counter: Counter
  statusCode1: Status Code1
  statusCode2: Status Code2
  temperature: Temperature [degC];
  humidity: Humidity [Percentage];
}
// Javascript Example
const TR7 = Obniz.getPartsClass('TR7');
await obniz.ble.initWait();
obniz.ble.scan.onfind = (p) => {
    if (TR7.isDevice(p)) {
        const data = TR7.getData(p);
        console.log(data);
    }
};
await obniz.ble.scan.startWait(null, { duplicate: true, duration: null });

Supported from: obniz.js 3.21.0