Where is this battery draining code from?

Posted on
Page
of 2
Prev
/ 2
  • It shouldn't, no - however if gadgetbridge sent something in response, that could potentially cause a buzz.

    So maybe it's sending updates every second when the music is playing showing the current play position, and then somewhere along the line something responds to that when it shouldn't.

    It's one of the reasons I gave you that code to run - it would have shown you when and where the buzzing was coming from

    I ran that and tried some behaviour that buzzes on Podcast Addict Remote (up/down swipes to change volume) to see if it triggered it. But now I look at it a little closer I don't think that is what it would catch.

    I have now uploaded the buzz module to a file on the watch, named it "buzz". Going to start logging on the watch via 'Settings'->'Utils'->'Debug'.

    You said earlier:

    @Ganblejs Any chance you could connect with the IDE and paste this on the left hand side:

    require("Storage").write("buzzdebug.boot­.js",'require("buzz").pattern=p=>{throw new Error(`buzz! ${p}`)}');

    And then maybe leave it connected to the Web IDE?

    Which I can do, but that way there's no way to track if the problem stems from the communication with gadgetbridge? But I think that is solved if I enable logging on the bangle and connect to gadgetbridge instead, right?

  • Which I can do, but that way there's no way to track if the problem stems from the communication with gadgetbridge?

    Well, hopefully you'll get a stack trace which will point straight to the Android app on the watch, which would help a lot - but as you say you wouldn't see that message if you were then connected to Gadgetbridge (unless you used logcat, or use the new 'remote connection' in the Gadgetbridge app loader).

    You could definitely try and enable logging and see what happens - there is even logging in Gadgetbridge itself (or you obviously have Android Studio set up so you could look at logcat to see what's being sent).

    I think if you're looking at the Gadgetbridge logcat while using Podcast Addict and you're seeing a bunch of data transferred to the Bangle, that could be a good step to see what's going wrong. If you can isolate the GB(...) message that's being sent, we could try running that in the IDE with debugger;GB(...) and trace through exactly what happens.

  • Ok, thanks for all help! I shall see what I can find out 🙂

  • Attached is output from to the Web IDE after having had it connected to my bangle for a couple of hours today. Podcast Addict Remote was open on the watch during that time.

    The error message from buzzdebug.boot.js didn't trigger during this time.

    EDIT:

    or use the new 'remote connection' in the Gadgetbridge app loader).

    I'll do that next.


    1 Attachment

  • or use the new 'remote connection' in the Gadgetbridge app loader).

    I tried this once, but for some reason somewhere along the way the watch was disconnected from the web ide where I was checking for the error message. So that time it didn't yield to much.

    Tonight I had the battery fall of a cliff once again when Podcast Addict was active (Fastload utils not installed). Unfortunately I only have the gadgetbridge battery graph and nothing else. But I'll try connecting it to the web ide as suggested again.


    3 Attachments

    • Screenshot_20230529-065839~2.png
    • Screenshot_20230529-071033~2.png
    • Screenshot_20230529-071017~2.png
  • I think battery falling like that can only be either a horribly wrong value for the battery calibration (and relatively low charge being shown as full) or GPS being active. There is just no hardware taking that much power besides full power backlight, but I suspect you would have seen that at some point. Do you have agpsdata configured for autoupdating? Maybe there is some bug not turning GPS off after the update.

  • Do you have agpsdata configured for autoupdating? Maybe there is some bug not turning GPS off after the update.

    I don't have it installed now. I did have it installed before I removed it as part of this process some time ago: https://forum.espruino.com/conversations­/385629/#16983079

  • Well, hopefully you'll get a stack trace which will point straight to the Android app on the watch, which would help a lot - but as you say you wouldn't see that message if you were then connected to Gadgetbridge (unless you used logcat, or use the new 'remote connection' in the Gadgetbridge app loader).

    Now I've tried twice with this setup:

    • Watch is connected to Gadgetbridge.
    • I use the new remote connection feature of App Loader to get logs/prints to the console in Web IDE. The App Loader is open inside Gadgetbridge.
    • I have the bootcode you gave me on the watch.
    • My android device is set up to keep screen on while charging.
    • My laptop is set up to also keep awake.

    But the connection between App Loader and Web IDE is soon lost.

    I'll try this once more I think, or I'll try adding in Android Studios logcat in the mix as suggested as well.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Where is this battery draining code from?

Posted by Avatar for Ganblejs @Ganblejs

Actions