A Garmin watch watches for sudden rhythmic shaking of the wrist and tells your phone.
The watch reads its accelerometer 25 times a second and counts how often the movement crosses an amplitude threshold. When enough crossings pile up inside a five-second window, it treats that as shaking: it vibrates, beeps and lights the screen, and posts a short signal to this server. The server then pushes a notification to every browser subscribed to that watch.
Detection happens entirely on the watch, so it keeps working with the phone off, out of range or out of signal โ the phone is only a louder speaker. To keep notifications useful rather than noisy, the watch tells the server at most once a minute even while it keeps buzzing on your wrist every few seconds.
this-site/s/CODE to reach the setup page.That is it. From then on the watch sends an alert whenever it triggers.
Apple does not allow notifications for sites opened in a Safari tab, so at step 2 the page will ask you to install it as an app:
Requires iOS 16.4 or newer. Always open it from the Home Screen icon afterwards: in a Safari tab, subscribing is unavailable again.
On the watch: Menu โ Test fires a real alarm and reports whether the signal reached the server. The watch vibrates and a notification arrives on the phone.
Everything is open source โ the Connect IQ watch app and this server live in one repository:
github.com/geminixandroid/garmin-shake-detector
Licensed under GPL-3.0-or-later.
If you need something clinically founded rather than a personal experiment, look at OpenSeizureDetector: a separate project that streams the watch's accelerometer to a phone and analyses it there with a proper frequency-domain algorithm.
Bug reports and pull requests are welcome. If you run your own instance, the watch app's
server address is a build-time constant in ShakeDetectorPhone.mc.