home-assistant-miele icon indicating copy to clipboard operation
home-assistant-miele copied to clipboard

use server-sent events instead of polling

Open SteffenWilberg opened this issue 4 years ago • 1 comments

Currently, the server is polled every 5 seconds: https://github.com/HomeAssistant-Mods/home-assistant-miele/blob/e9d94d82a1d6974c5ba88ec06065299e8a7c89e8/custom_components/miele/init.py#L159-L176

As of v.1.0.3 of the Miele API introduced in August 2020, server-sent events are supported: https://www.miele.com/developer/eventing.html

Try this:

curl -X GET "https://api.mcs3.miele.com/v1/devices/all/events" -H "accept: */*" -H "Authorization: Bearer DE_xxxx"

SteffenWilberg avatar Dec 26 '20 11:12 SteffenWilberg

Sounds like fun to implement :-) I'm currently without PC but I hope to implement this begin of this year. Thanks for pointing it out!

kloknibor avatar Dec 26 '20 15:12 kloknibor