Thursday, June 28, 2018

Reading Temperature and Humidity on AppsFactory Beacons

AppsFactory Beacons have SHT20 High precision Temperature and Humidity sensor embedded in them. Reading the values from the beacons is not that easy that is why this post is written which will serve as guide. Temperature and Humidity is important as it will allow building owners discover patterns that can not be detected by ordinary humans not unless of course humans are so super intelligent that they may not need tools to predict or discover patterns which could suggest something is just about to happen.

There are two ways to read the sensor data which are as follows:

  1. can be read via GATT
  2. can be included in the beacon advertisement data.

Here is the detail:

1. Reading the Temperature and Humidity via GATT Service
The data can be accessed via GATT Service 0xFFB0 see table below:
The characteristic 0xFFB3 is used to enable the measured Teperature and Humidity on the Advertisement Data. The possible values are as follows(2 bytes):

  • 0x0 - Enable
  • 0x00 - Disable 
Other values maybe entered to specify the rate which it will be advertised, example if 0x0F was entered means the temp and humidity will be advertised every 30 seconds. 
2. Reading the Temperature and Humidity from Beacon Advertisement Data
The Temperature and Humidity is included at the last bytes of the major and minor of the Ibeacon frame.

After obtaining the value, the conversion formula to get the actual values are as follows:

1 comment:

  1. http://gadgetzoneblog.blogspot.com/2018/06/reading-temperature-and-humidity-on.html

    ReplyDelete