JohnySeven / TWatchSK

TTGO T-Watch 2020 v1 supporting Signal K features for displaying boat data and controlling devices on board.
MIT License
9 stars 1 forks source link

Low power notification should play sound or/and vibrate #2

Closed JohnySeven closed 2 years ago

JohnySeven commented 3 years ago

Right now watch when entering into low power connected mode will automatically update subscriptions on server to subtribe only to notifications.*. When receiving delta with prefix 'notifications.' watch will check notification status, if the status is 'alert' or 'alarm' and notification wasn't displayed it will wakeup watch and show message box with notification message. Now although this is nice proof of concept user might not notice it, so the watch needs to support:

  1. DONE: ~Play wav file via I2S speaker - in loop for x seconds~
  2. DONE: ~Vibrate the watch~

All of the options must be configurable by user.

Maybe have DND mode activated by user?

JohnySeven commented 3 years ago

PR #22 is enabling vibration when new warning message is shown. Works with SK notifications and with Wi-Fi loss notification or other warnings - rejected SK access request, mDNS failure messages, etc.

After #22 is merged, I'll focus on making some noise!

ba58smith commented 3 years ago

Sounds like excellent progress!

JohnySeven commented 3 years ago

Will try to implement sounds using following sample: https://github.com/nhatuan84/esp32-i2s-sdcard-wav-player/blob/master/esp32-i2s-sdcard-wav-player-builtin-DAC.ino

JohnySeven commented 3 years ago

As PR #48 is in, we have support for sounds when notification is displayed. It's not ideal, but we'll make it better. I'm not closing this for now.