After find phone is stopped, watch sends a Command message back
without system set, and because of missing hasSystem() check, we'd
wrongly go to condition that sets findPhoneEvent.event to START.
Freeyourgadget/Gadgetbridge
Xiaomi: Handle find phone messages without system properly #3458
Closed
LuK1337
wants to merge 1 commit from
LuK1337:luk/xiaomi_find_phone into master
pull from: LuK1337:luk/xiaomi_find_phone
merge into: Freeyourgadget:master
Freeyourgadget:master
Freeyourgadget:jr-find-device
Freeyourgadget:jr-aawireless-dsl
Freeyourgadget:jr-garmin-oauth-notification
Freeyourgadget:release-0.92.x
Freeyourgadget:jr-sdk-37
Freeyourgadget:renovate/gradle-9.x
Freeyourgadget:jr-zepp-os-device-source-dynamic
Freeyourgadget:jr-auth-helper
Freeyourgadget:renovate/androidx.lifecycle
Freeyourgadget:renovate/androidx.core
Freeyourgadget:renovate/kotlin
Freeyourgadget:jr-dji-osmo-action-4
Freeyourgadget:renovate/material
Freeyourgadget:jr-data-migration
Freeyourgadget:renovate/major-android.gradle.plugin
Freeyourgadget:jr-casio-gbd-200-migration
Freeyourgadget:jr-endurain
Freeyourgadget:release-0.91.x
Freeyourgadget:jr-garmin-waypoint-symbol
Freeyourgadget:garmin-mlr
Freeyourgadget:dg-add-f8scale
Freeyourgadget:jr-mr-5289
Freeyourgadget:release-0.89.x
Freeyourgadget:jr-async-processor
Freeyourgadget:jr-garmin-enums
Freeyourgadget:jr-woodpecker-unify
Freeyourgadget:jr-hc-calories
Freeyourgadget:jr-blood-pressure-hc
Freeyourgadget:jr-garmin-prg
Freeyourgadget:dg-liveview-revamp
Freeyourgadget:jr-harmony-os-trusleep
Freeyourgadget:jr-vico
Freeyourgadget:release-0.87.x
Freeyourgadget:dg-refactor-dbaccess
Freeyourgadget:jr-zepp-os-multi-weather
Freeyourgadget:jr-cards-elevation-colors
Freeyourgadget:dg-gpx-improv-coursepoints
Freeyourgadget:jr-coospo-max-hr
Freeyourgadget:jr-mr-4655
Freeyourgadget:jr-nothing-ear-a
Freeyourgadget:jr-garmin-user-info
Freeyourgadget:jr-mr-4344-emoji
Freeyourgadget:jr-garmin-progress
Freeyourgadget:dg-print-incoming-text
Freeyourgadget:dg-device-ls24x
Freeyourgadget:jr-mr-4773
Freeyourgadget:jr-pairing-activity
Freeyourgadget:release-0.86.x
Freeyourgadget:jr-garmin-fit-concat
Freeyourgadget:jr-bangle-fill-gaps
Freeyourgadget:jr-dashboard-async
Freeyourgadget:jr-garmin-training-load
Freeyourgadget:jr-zepp-os-music
Freeyourgadget:jr-zepp-os-auto-detect
Freeyourgadget:jr-generic-hrv
Freeyourgadget:jr-garmin-fenix-3
Freeyourgadget:jr-garmin-fenix-5s
Freeyourgadget:jr-xiaomi-fetch-order
Freeyourgadget:jr-auto-export
Freeyourgadget:jr-hr-sample-rate-dynamic
Freeyourgadget:jr-background-notifications
Freeyourgadget:release-0.82.x
Freeyourgadget:jr-activity-load-async
Freeyourgadget:jr-dashboard-preview
Freeyourgadget:kaitai-integration
Freeyourgadget:jr-huawei-parallel-chains
Freeyourgadget:jr-garmin-track-name-priority
Freeyourgadget:jr-huami-fetch-sports-details-time
Freeyourgadget:jr-garmin-hand-alignment
Freeyourgadget:jr-settings-revamp
Freeyourgadget:jr-infinitime-external-resources
Freeyourgadget:jr-dashboard-horizontal
Freeyourgadget:jr-huami-calendar
Freeyourgadget:greendao-2.2.0-fyg2
Freeyourgadget:deprecate-sms-receiver
Freeyourgadget:jr-r8-full-mode
Freeyourgadget:device-pavlok
Freeyourgadget:dg-garmin-notification-image
Freeyourgadget:jr-garmin-apps
Freeyourgadget:dashboard_today_spiral_view
Freeyourgadget:jr-bangle-reply
Freeyourgadget:jr-bangle-prefs
Freeyourgadget:ble-scan-before-reconnect-old
Freeyourgadget:pixoo-experiments
Freeyourgadget:jr-xiaomi-activity-hr
Freeyourgadget:jr-zepp-os-alexa
Freeyourgadget:jr-lint-fixes
Freeyourgadget:jr-internet-helper
Freeyourgadget:filter_ci
Freeyourgadget:nightly-branch
Freeyourgadget:release-0.75.x
Freeyourgadget:osmand-experiments
Freeyourgadget:bicycle_sensor
Freeyourgadget:supercars_blinking
Freeyourgadget:test_link
Freeyourgadget:test_debug_release
Freeyourgadget:debug-branch
Freeyourgadget:test_own_image
Freeyourgadget:fix_logger_again
Freeyourgadget:streaks
Freeyourgadget:huami-sms-reply
Freeyourgadget:RemoveMibandGlobalPreferences
Freeyourgadget:SystemEvents
Freeyourgadget:combined
Freeyourgadget:openTracksObserver-debug
Freeyourgadget:cycling_sensor
Freeyourgadget:multi-device-support-clean-2
Freeyourgadget:fossil-hr-activity-fix
Freeyourgadget:fossil-q-hr-html
Freeyourgadget:dakhnod/fix-notification-removed
Freeyourgadget:dakhnod/beautify-device-information
Freeyourgadget:Lightwars/TurnClocksForward
Freeyourgadget:andyboeh/ble_reconnect_scan
Freeyourgadget:ildar/patches/circleci
Freeyourgadget:mvallerie/custom_menu_miband2
Freeyourgadget:christian-n/master
Freeyourgadget:lucasgaley/master
Freeyourgadget:Dikay900/steps_diagram
Freeyourgadget:comradekingu/patch-3
Freeyourgadget:elagin/sleep_values_on_chart
Freeyourgadget:boun/runnerup
Freeyourgadget:thePanz/add-raw-data-support
Freeyourgadget:plugdio/master
Freeyourgadget:atx/master
Freeyourgadget:Vebryn/csv-export
Freeyourgadget:rosenpin/master
Freeyourgadget:lazarosfs/EnableBtOnConnect
Freeyourgadget:health-new-database
Freeyourgadget:mi2-text-notifications
Freeyourgadget:polarm400
Freeyourgadget:release-0.11.x
Freeyourgadget:led-profile
Freeyourgadget:live-sensor-data
LuK1337
commented 2023年12月19日 00:23:00 +01:00
After find phone is stopped, watch sends a `Command` message back
without `system` set, and because of missing hasSystem() check, we'd
wrongly go to condition that sets findPhoneEvent.event to START.
joserebelo
commented 2023年12月19日 15:28:54 +01:00
Is this message sent when stopping on the phone or watch? I agree we need the safeguard, but should we still fire the stop event locally?
Is this message sent when stopping on the phone or watch? I agree we need the safeguard, but should we still fire the stop event locally?
LuK1337
commented 2023年12月19日 15:40:54 +01:00
Is this message sent when stopping on the phone or watch? I agree we need the safeguard, but should we still fire the stop event locally?
Either, the confirmation (?) message looks like this:
# nodomain.freeyourgadget.gadgetbridge.proto.xiaomi.XiaomiProto$Command@c5e5d076
status: 1
subtype: 17
type: 2
And prior to it, we get a correct stop message:
# nodomain.freeyourgadget.gadgetbridge.proto.xiaomi.XiaomiProto$Command@5a30d42c
subtype: 17
system {
find_device: 1
}
type: 2
> Is this message sent when stopping on the phone or watch? I agree we need the safeguard, but should we still fire the stop event locally?
Either, the confirmation (?) message looks like this:
```
# nodomain.freeyourgadget.gadgetbridge.proto.xiaomi.XiaomiProto$Command@c5e5d076
status: 1
subtype: 17
type: 2
```
And prior to it, we get a correct stop message:
```
# nodomain.freeyourgadget.gadgetbridge.proto.xiaomi.XiaomiProto$Command@5a30d42c
subtype: 17
system {
find_device: 1
}
type: 2
```
joserebelo
commented 2023年12月20日 20:32:12 +01:00
Okay, so we always get the correct stop message, it's just the confirmation that has nothing 👍
Thanks.
Okay, so we always get the correct stop message, it's just the confirmation that has nothing 👍
Thanks.
joserebelo
added the 2023年12月20日 20:32:26 +01:00
device xiaomi
label
LuK1337
deleted branch luk/xiaomi_find_phone 2023年12月20日 20:36:29 +01:00
Pull request closed
This pull request cannot be reopened because the branch was deleted.
Sign in to join this conversation.
No reviewers
Labels
Clear labels
device mi band 7
Mi Band 7
activity post processing
activity data processing, import, export
activity/health
Android 12
Android 13
android integrations
architecture
Bangle.js
blocked
bug
changes requested
the provided PR needs some modifications
charts
dependency
deprecation notice
This issue serves as reference for a feature that is deprecated and will be removed.
details not provided
developer documentation
Information for contributors
device amazfit band 5
Amazfit Band 5
device amazfit bip
device amazfit cor
device Casio
device colmi r0x
device fossil
device garmin
device gtr 2e
device gts 2 mini
device h30
device hplus
device huami
device Huawei
Huawei honor
device liveview
device mi band
device mi band 2
device mi band 3
device mi band 4
device mi band 5
Mi Smart Band 5
device mi band 6
Mi Smart Band 6
device moyoung
device no.1 f1
device pace
device pebble
device pebble 2
device pinetime infinitime
device request
device sony
Sony
device support
device watch 9
device xiaomi
device yawell
discussion
documentation
duplicate
enhancement
external integrations
feature request
Gadgetbridge
Gadgetbridge
good first issue
good entry level issue for new contributors
health connect
help wanted
i am developing my own app can you help
no, sorry
icebox
An icebox for abandoned PRs. Feel free to pick it up, update and make a new PR
intent api
internationalisation
metric/imperial/celsius/fahrentheit...
invalid
lacking information
needs work
network companion app
ideas pool for a network enabled companion app
new device
no feedback
not a bug
notifications
ideas and improvements for notifications
pairing/connecting
potentially fixed / confirm and close
question
reconnection
regression
research
security
seems abandoned
PR seems to abandoned
sleep as android
Solved, waiting for F-Droid release
suggest to close
probably should/could close
task
user interface / UX
waiting for upstream
wear os
weather
wip
Work in progress / draft pull request
wontfix
Zepp OS
No labels
device mi band 7
activity post processing
activity/health
Android 12
Android 13
android integrations
architecture
Bangle.js
blocked
bug
changes requested
charts
dependency
deprecation notice
details not provided
developer documentation
device amazfit band 5
device amazfit bip
device amazfit cor
device Casio
device colmi r0x
device fossil
device garmin
device gtr 2e
device gts 2 mini
device h30
device hplus
device huami
device Huawei
device liveview
device mi band
device mi band 2
device mi band 3
device mi band 4
device mi band 5
device mi band 6
device moyoung
device no.1 f1
device pace
device pebble
device pebble 2
device pinetime infinitime
device request
device sony
device support
device watch 9
device xiaomi
device yawell
discussion
documentation
duplicate
enhancement
external integrations
feature request
Gadgetbridge
good first issue
health connect
help wanted
i am developing my own app can you help
icebox
intent api
internationalisation
invalid
lacking information
needs work
network companion app
new device
no feedback
not a bug
notifications
pairing/connecting
potentially fixed / confirm and close
question
reconnection
regression
research
security
seems abandoned
sleep as android
Solved, waiting for F-Droid release
suggest to close
task
user interface / UX
waiting for upstream
wear os
weather
wip
wontfix
Zepp OS
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Dependencies
No dependencies set.
Reference
Freeyourgadget/Gadgetbridge!3458
Loading...
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "LuK1337:luk/xiaomi_find_phone"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?