project Utilities / zepp_to_influxdb avatar

utilities/zepp_to_influxdb#8: App syncing is unreliable

Issue Information

Issue Type: issue
Status: closed
Reported By: btasker
Assigned To: btasker

Milestone: Unimplemented
Created: 19-Aug-23 11:43


In my blog post, I noted that

Despite being almost constantly connected (in order to send notifications to the watch), the Zepp app doesn't seem to sync data very frequently. In fact, as far as I can make out, it often doesn't sync data at all until the app is next opened (I haven't yet tried leaving it for days though).

I've now tried leaving it for a few days - the result is that I ended up with gaps in my data. The app doesn't sync at all unless it's opened.

Whilst this isn't a problem with this sync script per se, it does affect it, so I'm raising this to look at options

Toggle State Changes


assigned to @btasker

I had been hoping that there might be an intent that we could trigger to have the app sync, however no such luck:

adb shell
jflte:/ # dumpsys activity broadcasts | grep Intent | sort | uniq                                                                                          
      Action: ""
    Intent { act=android.intent.action.BATTERY_CHANGED flg=0x60000010 (has extras) }
    Intent { act=android.intent.action.TIME_TICK flg=0x50200010 }
    Intent { act=android.os.action.POWER_SAVE_TEMP_WHITELIST_CHANGED flg=0x40000010 }
    Intent { flg=0x14 (has extras) }
    Intent { flg=0x14 (has extras) }
    Intent { flg=0x40000010 }
    Intent { flg=0x14 (has extras) }
    Intent { flg=0x10 }
    Intent: act=android.hardware.usb.action.USB_STATE flg=0x31000010
    Intent: act=android.intent.action.ACTION_DEFAULT_DATA_SUBSCRIPTION_CHANGED flg=0x21000010
    Intent: act=android.intent.action.ACTION_DEFAULT_VOICE_SUBSCRIPTION_CHANGED flg=0x21000010
    Intent: act=android.intent.action.BATTERY_CHANGED flg=0x60000010
    Intent: act=android.intent.action.HDMI_PLUGGED flg=0x44000010
    Intent: act=android.intent.action.SIG_STR flg=0x10
    Intent: act=android.intent.action.SIM_STATE_CHANGED flg=0x5000010
    Intent: flg=0x10000010
    Intent: flg=0x34000010
    Intent: flg=0x34000010
    Intent: flg=0x34000010
    Intent: flg=0x10000010
    Intent: flg=0x4200010
    Intent: flg=0x4000010
    Intent: flg=0x20000010
    Intent: flg=0x44000010
    Intent: flg=0x4000010
    Intent: flg=0x4000010
    Intent: flg=0x4000010
    Intent: flg=0x4000010
    Intent: flg=0x4000010
    Intent: flg=0x24000010
    Intent: act=android.os.UpdateLock.UPDATE_LOCK_CHANGED flg=0x44000010
    Intent: act=android.telephony.action.DEFAULT_SMS_SUBSCRIPTION_CHANGED flg=0x21000010
    Intent: act=android.telephony.action.DEFAULT_SUBSCRIPTION_CHANGED flg=0x21000010
    Intent: act=android.telephony.action.SERVICE_PROVIDERS_UPDATED flg=0x10
    options=Bundle[{android.pendingIntent.backgroundActivityAllowed=false, android:broadcast.temporaryAppWhitelistDuration=10000}]

So, instead, we need to use a sledgehammer to crack a nut - we can use Tasker to automatically launch the Zepp app (at least) once a day.

There is, however, still an issue with this.

I configured a tasker profile to run at 12:42 (i.e. a few minutes ago) and launch Zepp.

It did exactly that.

But, Zepp was a little misleading - when I unlocked the screen it started syncing with the watch. This gave the impression that it only syncs when the screen is unlocked. However, as far as I can see, it had synced on launch - it must just launch a new sync when the display is unlocked.

mentioned in issue gadgetbridge_to_influxdb#8

Closing as Won't Fix - see #9