BlueBubblesApp / bluebubbles-server

Server for forwarding iMessages to clients within the BlueBubbles App ecosystem
https://bluebubbles.app
Apache License 2.0
554 stars 47 forks source link

Option to not run when on battery #425

Closed anonymousaga closed 1 year ago

anonymousaga commented 2 years ago

When I am on battery, I would rather that BlueBubbles not run. I will not need bluebubbles when on battery because in that case, I will have my mac with me. However, when my mac is at home, plugged in, not sleeping (configured that by turning on internet sharing, which prevents sleep when on AC power), I would like it to run to use bluebubbles. Will such an option be possible? Thanks in advance.

zlshames commented 2 years ago

This is possible. Here is the API for it. It will likely be released with v1.5.0 (after the v1.4.0 release): https://www.electronjs.org/docs/latest/api/power-monitor

anonymousaga commented 2 years ago

Thanks. Do you have an idea for the 1.5 release? No pressure to finish it; I'm just wondering.

zlshames commented 2 years ago

Thanks. Do you have an idea for the 1.5 release? No pressure to finish it; I'm just wondering.

No, but 1.4.0 should come out shortly. Probably within the next week or so. I'm finishing up the Scheduled Messages API and UI (server). Once that's done, I'm going to release it (maybe a beta first). Then I can start work on 1.5.0 things

anonymousaga commented 2 years ago

Ok

anonymousaga commented 1 year ago

Sorry to bother you, but it is 1.9.0 - is the feature there?

zlshames commented 1 year ago

Sorry to bother you, but it is 1.9.0 - is the feature there?

Not yet. I guess I forgot about it. Just to be clear, what is the functionality you want? When it detects it's on battery, just close the server? Do you expect it to re-open when back on power?

anonymousaga commented 1 year ago

Yeah, just have an option for it to close/pause the server when on battery and reopen when connected to AC power. Thanks.

zlshames commented 1 year ago

Yeah, just have an option for it to close/pause the server when on battery and reopen when connected to AC power. Thanks.

The problem is, there is no way to detect when the power is connected when the server has already closed itself because the power was disconnected.

anonymousaga commented 1 year ago

Nevermind, I just realized that ControlPlane (I already use it for other things) can both quit & reopen BB based on battery. Feel free to close this issue.

On Mon, Nov 20, 2023, 22:03 Zach Shames @.***> wrote:

Yeah, just have an option for it to close/pause the server when on battery and reopen when connected to AC power. Thanks.

The problem is, there is no way to detect when the power is connected when the server has already closed itself because the power was disconnected.

— Reply to this email directly, view it on GitHub https://github.com/BlueBubblesApp/bluebubbles-server/issues/425#issuecomment-1819415229, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQJYJKJGTCWLXKP5EJQWP7TYFOA4XAVCNFSM6AAAAAAQ3ZTFHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJZGQYTKMRSHE . You are receiving this because you authored the thread.Message ID: @.***>