utilities/gadgetbridge_to_influxdb#18: Steps and Heart Rate don't import from Bip 6



Issue Information

Issue Type: issue
Status: closed
Reported By: btasker

Milestone: 0.5.1
Created: 07-Jul-25 14:54



Description

I've been setting a Bip 6 up with Gadgetbridge on a new phone.

It pairs with Gadgetbridge in exactly the same way and steps etc show up in-app. They don't, however, get imported to InfluxDB.



Toggle State Changes

Activity


Poking around shows that the issue is this query

SELECT TIMESTAMP, DEVICE_ID, RAW_INTENSITY, STEPS, RAW_KIND, HEART_RATE, SLEEP,DEEP_SLEEP, REM_SLEEP FROM HUAMI_EXTENDED_ACTIVITY_SAMPLE WHERE TIMESTAMP >= 1736119950000 ORDER BY TIMESTAMP ASC;

If I take the WHERE out, I get results back but the timestamps are in seconds, not milliseconds.

The time bound used in that query was originally in seconds, but it was changed in b9b587806015ec1f19f0055f00d5896391feea35 along with a bunch of other Huami tables.

Checking the DB associated with my Bip 3, the table's empty.

I think, having found that one of the other tables was ms, I probably assumed they all were.

This is fixed by

  • https://github.com/bentasker/gadgetbridge_to_influxdb/commit/cadd8a43f50bd27aaf38f2be841ff5a41a420335
  • https://github.com/bentasker/gadgetbridge_to_influxdb/commit/d69a1e51d11959b5422b2e8b073dd6b001cdcbc7