# Bangle JS

## Browser

<https://www.espruino.com/Quick+Start+BLE#with-web-bluetooth>

## Android

<https://github.com/espruino/BangleApps/wiki#phone-integration>

## Apps

- [Android](https://banglejs.com/apps/?id=android)
- [Home Assistant](https://banglejs.com/apps/?id=ha)
- [Spotify](https://banglejs.com/apps/?id=spotrem)
- [Find Phone](https://banglejs.com/apps/?id=findphone)
- [Weather](https://banglejs.com/apps/?id=weather)

## Sleep Data

Export in javascript format.

Use `=(A7/(1000*60*60*24)+25569)+(-4/24)` to convert javascript to date.

Use the following table to convert `sleep` values to human-readable:

| key | value       |
| --- | ----------- |
| 0   | unknown     |
| 1   | not worn    |
| 2   | awake       |
| 3   | light sleep |
| 4   | deep sleep  |

Use `=VLOOKUP(<raw sleep value>,<cell with 0>:<cell with deep sleep>,2)` to convert number to human
readable value.

Use `=(<end date>-<start date>)*1440` to calculate minutes between each timestamp.