Created
July 27, 2026 22:39
-
-
Save mhaberler/36c69488f6ec2025aa925ef16c6f952c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // TE Connectivity M5600/U5600 ("TESS 5600") wireless pressure transducer. | |
| // Protocol: TE_M5600_U5600_Software_Manual.pdf | |
| const BASE_UUID = "f0000000-0451-4000-b000-000000000000"; | |
| const PRESSURE_SVC = "f000ab30-0451-4000-b000-000000000000"; | |
| const DATA_CHAR = "f000ab31-0451-4000-b000-000000000000"; | |
| const BATTERY_SVC = "f000180f-0451-4000-b000-000000000000"; | |
| const BATTERY_CHAR = "f0002a19-0451-4000-b000-000000000000"; | |
| const ERR_T = 0x7fff; | |
| const ERR_P = 0x7fffffff; | |
| function onData(deviceId, data) { | |
| if (!data || data.length < 14) return null; | |
| const tRaw = data.readInt16LE(0); | |
| const pRaw = data.readInt32LE(2); | |
| const pMinRaw = data.readInt32LE(6); | |
| const pMaxRaw = data.readInt32LE(10); | |
| return { | |
| temperature_C: tRaw === ERR_T ? null : tRaw / 100, | |
| pressure_Pa: pRaw === ERR_P ? null : pRaw / 10, | |
| pressureMin_Pa: pMinRaw === ERR_P ? null : pMinRaw / 10, | |
| pressureMax_Pa: pMaxRaw === ERR_P ? null : pMaxRaw / 10, | |
| }; | |
| } | |
| function onBattery(deviceId, data) { | |
| if (!data || data.length < 2) return null; | |
| return { | |
| batteryLevel_percent: data.readUInt8(0), | |
| batteryCharging_dimensionless: data.readUInt8(1), | |
| }; | |
| } | |
| async function start() {} | |
| async function stop() {} | |
| export const decoder = { | |
| decoderName: "tess5600", | |
| name: null, | |
| manufacturer: null, | |
| serviceUUID: BASE_UUID, | |
| advertisementDecode: null, | |
| start, | |
| stop, | |
| notify: [ | |
| { service: PRESSURE_SVC, characteristic: DATA_CHAR, onNotification: onData }, | |
| { service: BATTERY_SVC, characteristic: BATTERY_CHAR, onNotification: onBattery }, | |
| ], | |
| units: "Temperature in °C. Pressure, pressureMin, pressureMax in Pa. Battery level in %, charging is 1 (charging) or 0 (discharging).", | |
| frequency: "Set by the device's configured data rate.", | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment