• UPDATE: fetching Gadgetbridge debug logs, I see… nothing from Sleep as Android in Gadgetbridge's logs.

    I have my custom code snippet from Tasker successfully shown and parsed, though.

    Perhaps there's something between Bangle.js Gadgetbridge and Sleep as Android that needs fixed?

    I do frequently see the following, but I suspect it's unrelated:

    Could not load clock info "sched.clkinfo.js"
    

    Looking at adb logcat, it seems like Sleep as Android is listening for a com.urbandroid.sleep.watch.CONFIRM_CONNECTED broadcast:

    03-22 16:23:56.110 20919 20919 I SleepAsAndroid: [22Mar 16:23:56.110, main]: Theme: setting last SmartWatchActivity 16
    03-22 16:23:56.110 20919 20919 I SleepAsAndroid: [22Mar 16:23:56.110, main]: SmartWatchActivity:onCreate() {EX:null} [I: {EX:test_sensors (true) }]
    03-22 16:23:56.122 20919 20919 I SleepAsAndroid: [22Mar 16:23:56.122, main]: onCreate SmartWatchActivity wearable Bangle.js
    03-22 16:23:56.123 20919 20919 I SleepAsAndroid: [22Mar 16:23:56.123, main]: SmartWatchActivity:Async connecting smart watch 
    03-22 16:23:56.123 20919 20919 I SleepAsAndroid: [22Mar 16:23:56.123, main]: SmartWatch: Async smart watch connect called
    03-22 16:23:56.123 20919 20919 I SleepAsAndroid: [22Mar 16:23:56.123, main]: SleepPhaser: GET address null
    03-22 16:23:56.123 20919 20919 I SleepAsAndroid: [22Mar 16:23:56.123, main]: SleepMaskBt: GET address null
    03-22 16:23:56.124 20919 20919 I SleepAsAndroid: [22Mar 16:23:56.124, main]: Using watch accel: BaseWatchAccelManager
    03-22 16:23:56.124 20919 20919 I SleepAsAndroid: [22Mar 16:23:56.124, main]: SmartWatch: ConnectivityChecker registering receiver for com.urbandroid.sleep.watch.CONFIRM_CONNECTED watch com.urbandroid.sleep.smartwatch.generic.GenericWatch@6946671
    […]
    03-22 16:23:56.131 20919 20919 D SleepAsAndroid: [22Mar 16:23:56.131, main]: SmartWatchActivity:onStart()
    03-22 16:23:56.132 20919 20919 D SleepAsAndroid: [22Mar 16:23:56.132, main]: SmartWatchActivity:onResume()
    03-22 16:23:56.133 20919 20919 I SleepAsAndroid: [22Mar 16:23:56.133, main]: Theme: onPostResume() SmartWatchActivity
    03-22 16:23:56.138  1810  4994 D CoreBackPreview: Window{d471394 u0 com.urbandroid.sleep/com.urbandroid.sleep.SmartWatchActivity}: Setting back callback OnBackInvokedCallbackInfo{mCallback=android.window.IOnBackInvokedCallback$Stub$Proxy@3722632, mPriority=0}
    03-22 16:23:56.145 20919 29298 E OpenGLRenderer: Unable to match the desired swap behavior.
    03-22 16:23:56.152 20919 29298 W Parcel  : Expecting binder but got null!
    03-22 16:23:56.167  1810  1933 I ActivityTaskManager: Displayed com.urbandroid.sleep/.SmartWatchActivity: +81ms
    03-22 16:23:56.234 20919 20919 I SleepAsAndroid: [22Mar 16:23:56.233, main]: Theme: onPostResumeAfterRecreate()
    […]
    03-22 16:23:56.747 20919 20919 D SleepAsAndroid: [22Mar 16:23:56.747, main]: AlarmClock:onStop()
    03-22 16:23:56.752 20919 20919 D SleepAsAndroid: [22Mar 16:23:56.752, main]: SimpleSettingsActivity:onStop()
    03-22 16:23:56.753 20919 20919 D SleepAsAndroid: [22Mar 16:23:56.753, main]: TrackSettingsActivity:onStop()
    03-22 16:23:56.754 20919 20919 D SleepAsAndroid: [22Mar 16:23:56.754, main]: SmartwatchSettingsActivity:onStop()
    

    This matches up with the Sleep as Android Wearable integration API documentation:
    https://docs.sleep.urbandroid.org/devs/wearable_api.html#initiating-connection-to-phone

    I git-clone'd the Gadgetbridge source code and searched recursively for CONFIRM_CONNECTED, but didn't find it anywhere.

About