Ludy87 / xplora_watch

Xplora® Watch Home Assistant Integration
MIT License
47 stars 6 forks source link

[🏗️ FR] Messaging event #32

Closed plastbox closed 1 year ago

plastbox commented 2 years ago

Is your feature request related to a problem? Please describe.

No response

Describe the feature you want

Add a HA event triggered when a message is sent to the account this integration is configured to use.

The event payload should include the message itself, as well as a way to identify its sender.

Additional context

Providing Xplora watch users with the ability to interact with HA would create a lot of engagement with curious, young minds. I know my son would love showing off to his friends how he could turn lights or the TV on and off.

Ludy87 commented 2 years ago

There are problems that are not easy to fix.

  1. You must be logged in as admin.
  2. The clock can only text modules and not individual texts

So I'm thinking about the implementation and can't decide to pursue it further.

plastbox commented 2 years ago

Thanks for the quick reply. I'd like to understand the issue though.

Does this integration not pretend to be the Explora app? Meaning: it uses API calls found by decompiling the app or doing network sniffing.

If so, it must be possible to have the integration be able to receive a message sent from the watch, to the number the integration is set up to use.

plastbox commented 1 year ago

Hello again!

Given the recent API changes discussed in https://github.com/Ludy87/xplora_watch/discussions/90 does it not make sense to revisit this point?

There are only two Admin accounts per watch, so the need to use an Admin account for HA leaves one parent without access through the Xplora app.

This makes it all the more important that the HA integration also handles messages from the Watch (to the Admin account HA uses). Rather conveniently, the situation has also forced everyone to start using Admin users for the integration.

So.. what prevents implementation of an event in HA that triggers when the Watch user messages the Admin contact used by HA?

sevorl commented 1 year ago

Would be really great to get the phone notifications in HA. Using this, HA could notify my phone about an incoming message. If that feature would be available, I would not mind the "only 2 admins" limitation. I wouldn't really need the xplora app on my phone, but would just use HomeAssistant in stead.

Ludy87 commented 1 year ago

I've been thinking a lot, it's going to be just text chats. Only messages from the logged in user to the watch and from the watch to the user can be read.

The battery will be drained faster depending on the update interval.

Ludy87 commented 1 year ago

I will test the battery consumption next week

Markdown Layout:

Spoiler closed Spoiler opened
Screenshot_20221107-105603 Screenshot_20221107-105702
sevorl commented 1 year ago

Nice! I would assume that the watch sends the message to the server and your api calls would get the messages from this server without connecting to the watch every time. So hopefully this does not affect battery live at all

Ludy87 commented 1 year ago

My test is complete! The battery is not loaded, the polling interval was 30 seconds.

sevorl commented 1 year ago

Awesome! Can’t wait to try this!