dasdigidings / the_things_stack_v3_tabs_decoder

Decoder in javascript for the family of tabs sensors for the things stack v3
GNU Affero General Public License v3.0
14 stars 8 forks source link

The Browan Tabs HT sensor on port 107 not included yet #7

Open jodelhobel opened 2 years ago

jodelhobel commented 2 years ago

Please include port 107 in your code to cover one more sensor, see working code here:

function Decoder(bytes, port) { // test payload: 08FB2638FFFFFFFF

var retValue = {}; retValue.port = 107; retValue.battery_state = 100 * ((bytes[1]>>4)/ 15); retValue.battery_voltage = (25 + (bytes[1]&&4)) / 10; retValue.temperature = (bytes[2]) -32; retValue.relative_humidity = (bytes[3]); return retValue;