Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support receiving snooze command #4

Open
Andries-Smit opened this issue Dec 15, 2022 · 10 comments
Open

Support receiving snooze command #4

Andries-Smit opened this issue Dec 15, 2022 · 10 comments
Labels
enhancement New feature or request

Comments

@Andries-Smit
Copy link
Contributor

The watch should also be snoozed when a user snoozes a (high BG) alarm through his phone.
Similar to the original implementation https://github.com/NightscoutFoundation/xDrip/blob/master/app/src/main/java/com/eveningoutpost/dexdrip/UtilityModels/AlertPlayer.java#L237

Please add support in Watchdrip to receive CMD_SNOOZE_ALERT
https://github.com/NightscoutFoundation/xDrip/blob/master/app/src/main/java/com/eveningoutpost/dexdrip/Services/broadcastservice/Const.java#L22

@bigdigital
Copy link
Owner

Hi. this command is implemented in wathdrip app. The alarm snooze should work. Yesterday tested snoozing on GTR2 mini watch

@Andries-Smit
Copy link
Contributor Author

@bigdigital Snooze watch -> phone does work, but the other way; phone -> watch does not.
When snoozed on the phone, the me-band 5 is still "calling."

@atomphil
Copy link

atomphil commented Jan 4, 2023

@bigdigital Snooze watch -> phone does work, but the other way; phone -> watch does not. When snoozed on the phone, the me-band 5 is still "calling."

Same here with Bip S and Bip S lite.

@bigdigital
Copy link
Owner

Ah, i see. Thank you for the clarification. It seems it will require a small PR to xdrip

@atomphil
Copy link

atomphil commented Jan 7, 2023

Update: alarm handling is still buggy in v0.2.0.2 on Bip S and Bip S lite.

  1. alarms are first displayed as a normal notification and only on the second or third time as a call
  2. when I confirm the alarm call on the watch, it is not snoozed in xDrip and snoozing confimation message is sent.

@bigdigital
Copy link
Owner

Update: alarm handling is still buggy in v0.2.0.2 on Bip S and Bip S lite.

  1. alarms are first displayed as a normal notification and only on the second or third time as a call
  2. when I confirm the alarm call on the watch, it is not snoozed in xDrip and snoozing confimation message is sent.

This is a little different problem than described in this issue. I guess found the problem, it seems related to the library update. Switched back to an old library and looks like there is no such problem. Can you check https://www.dropbox.com/s/xaksfgukrdydabr/WatchDrip_v0.2.0.3.apk?dl=0 ?

@Andries-Smit
Copy link
Contributor Author

@bigdigital it crashes when opening with the following error:

FATAL EXCEPTION: main
Process: com.thatguysservice.huami_xdrip, PID: 25085
java.lang.ExceptionInInitializerError
at com.thatguysservice.huami_xdrip.models.UserError$Log.d(UserError.java:328)
at com.thatguysservice.huami_xdrip.utils.bt.ConnectReceiver.onReceive(ConnectReceiver.java:42)
at android.app.ActivityThread.handleReceiver(ActivityThread.java:4881)
at android.app.ActivityThread.-$$Nest$mhandleReceiver(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2417)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.app.ActivityThread.main(ActivityThread.java:8741)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'com.activeandroid.TableInfo com.activeandroid.ModelInfo.getTableInfo(java.lang.Class)' on a null object reference
at com.activeandroid.Cache.getTableInfo(Cache.java:148)
at com.activeandroid.Model.(Model.java:54)
at com.thatguysservice.huami_xdrip.models.PlusModel.(PlusModel.java:6)
at com.thatguysservice.huami_xdrip.models.UserError.(UserError.java:65)
at com.thatguysservice.huami_xdrip.models.UserError.UserErrorHigh(UserError.java:93)
at com.thatguysservice.huami_xdrip.models.UserError$Log.wtf(UserError.java:306)
at com.thatguysservice.huami_xdrip.models.Pref.initializePrefs(Pref.java:31)
at com.thatguysservice.huami_xdrip.models.Pref.getStringDefaultBlank(Pref.java:71)
at com.thatguysservice.huami_xdrip.models.UserError$ExtraLogTags.(UserError.java:356)
at com.thatguysservice.huami_xdrip.models.UserError$Log.(UserError.java:348)
at com.thatguysservice.huami_xdrip.models.UserError$Log.d(UserError.java:328) 
at com.thatguysservice.huami_xdrip.utils.bt.ConnectReceiver.onReceive(ConnectReceiver.java:42) 
at android.app.ActivityThread.handleReceiver(ActivityThread.java:4881) 
at android.app.ActivityThread.-$$Nest$mhandleReceiver(Unknown Source:0) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2417) 
at android.os.Handler.dispatchMessage(Handler.java:106) 
at android.os.Looper.loopOnce(Looper.java:226) 
at android.os.Looper.loop(Looper.java:313) 
at android.app.ActivityThread.main(ActivityThread.java:8741) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067) 

@atomphil
Copy link

atomphil commented Jan 7, 2023

This is a little different problem than described in this issue. I guess found the problem, it seems related to the library update. Switched back to an old library and looks like there is no such problem. Can you check https://www.dropbox.com/s/xaksfgukrdydabr/WatchDrip_v0.2.0.3.apk?dl=0 ?

Thanks for the quick bugfix. I have tried it out: The problem seems to be solved. The alarms come immediately and also the confirmation works again.

@atomphil
Copy link

atomphil commented Jan 9, 2023

This is a little different problem than described in this issue. I guess found the problem, it seems related to the library update. Switched back to an old library and looks like there is no such problem. Can you check https://www.dropbox.com/s/xaksfgukrdydabr/WatchDrip_v0.2.0.3.apk?dl=0 ?

Thanks for the quick bugfix. I have tried it out: The problem seems to be solved. The alarms come immediately and also the confirmation works again.

Rejoiced too soon :-/ Today Watchdrip showed the old incorrect behavior again. Only a few times the alarm shown as the notification direction. Then alerted as a call, but did not respond to the confirmation and did not snooze the alarm. Watchdrip shows something like "Waiting for user response" as status but didn't respond to the confirmation.

@bigdigital bigdigital added the enhancement New feature or request label Jan 17, 2023
@4RK4N
Copy link
Contributor

4RK4N commented Jan 17, 2023

any way to get this working on zeppOS devices ? but since watchdrip is not connecting directly to the watch it might not be possible at all. no way to trigger a phone call from the fetchAPI or any other means without direct connection (which then breaks zepp app and fetch api).
"Notify for GClock" from the official watch appstore has similar problems: once set up it works but ONLY if you open the watchapp yourself. no popup with the snooze buttons either when an alarm goes off. afaik there is no "open watchapp triggered from the phone" functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants