A javascript library and tools for huami watchfaces
- Xiaomi Mi Band 7 (Only for converting from miband 6 and converting images)
- Xiaomi Mi Band 6
- Xiaomi Mi Band 5
- Xiaomi Mi Band 4
- Amazfit X (Untested)
- Amazfit T-Rex Pro (Untested)
- Amazfit T-Rex / Verge Lite (Untested)
- Amazfit GTS 2 mini (Untested)
- Amazfit GTS 2 (Untested)
- Amazfit GTS (Untested)
- Amazfit GTR 2 (Untested)
- Amazfit GTR 42mm (Untested)
- Amazfit GTR 47mm (Untested)
- Amazfit Bip (Untested)
- Amazfit Bip S (Untested)
- Amazfit Bip U (Untested)
npm i -g watchface-js
wfjs readBin -i mywatchface.bin -m miband5
wfjs writeBin -i watchfacefolder -m miband5
wfjs convertBand6To7 -i mywatchface.bin
wfjs convertPngToTga -i picture.png
wfjs -h
npm i --save watchface-js
import { getAvailableModels, parseWatchFaceBin } from "watchface-js/watchFaceBinParser";
function readWatchFaceFile(buffer) {
const models = getAvailableModels()
const { parameters: parsedParameters, images: parsedImages } =
parseWatchFaceBin(
buffer,
models[0].fileType // First model is miband6
);
console.log(parsedParameters)
}
For more a more complete example, you can look at the source code of Watchface web editor