[No Longer Maintained] Miele Integration

I have built an integration for Miele@home devices. It uses the Miele 3rd Party API (https://developer.miele.com). It is available via Hubitat Package Manager ([RELEASE] Hubitat Package Manager (HPM) -- HubitatCommunity) (search for "Miele") or you can install it manually (although HPM is preferred as you will be notified of updates).

The first version is read-only and supports device state updates. These can be used in automations e.g. 'notify me when the tumble dryer finishes', 'warn me if I forgot to put the dishwasher on before I went to bed'. I have also implemented text description events (e.g. "Finish at 13:30") which can be helpful displayed in dashboards. I intend to release updates to add more functionality including device actions. For more information including detailed installation instructions check out the readme linked below.

Bug reports and suggestions welcome!

3 Likes

Releases:

31/01/2023 - Error handling
Fix Miele get devices error handling

  • Miele Integration v1.0.4

29/01/2023 - JSON parsing
Change JSON parsing to be less strict

  • Miele Integration v1.0.3

29/01/2023 - JSON error logging
Add error handling and logging around JSON parsing.

  • Miele Integration v1.0.2

26/01/2023 - App bug fix
Fix bug causing error if user moves back to main page from auth page and then re-authorizes.

  • Miele Integration v1.0.1

19/01/2023 - Child devices
Add child devices for Miele Generic Device.

  • Miele Generic Device v1.3.0
  • Miele Eco Feedback Child Device v1.0.0
  • Miele Light Child Device v1.0.0
  • Miele Temperature Child Device v1.0.0

17/01/2023 - More device attributes
Add signal and remote enable attributes.

  • Miele Generic Device v1.2.0

16/01/2023 - Device events preferences
Add preferences to control if text/description events are raised.

  • Miele Generic Device v1.1.0

14/01/2023 - Initial Release
Initial release of Miele Integration.

  • Miele Integration v1.0.0
  • Miele Event Stream v1.0.0
  • Miele Generic Device v1.0.0
1 Like

@TemptingTime @will2rob Thought this might be of interest.

This is fantastic @xap I’ll test it out soon.

More device state data is now exposed as attributes, including: Signals (Info, Failure, Door), Remote Enable (Full Remote, Mobile Start, Smart Grid), Eco Feedback, Light, Ambient Light, Temperatures and Core Temperature.

For some of the attributes I have added child devices. Using child devices makes it easier to discover and use the attributes, especially with the temperatures which can have multiple values. The child devices can be automatically created if the relevant data is received. The new child devices and their attributes are described in detail in the README.md.

Very nice @xap, thanks. Works nicely but when I put Miele to start at certain time (later today), it started to fill up my Log. It seem like character issue to me, but then again I'm not a that smart with the coding :wink:

HI @Harjuipa. Sorry to hear you're having issues. The problem is occurring when the app is trying to parse the JSON received for device events from Miele. The log is happening once a minute as that is how often Miele sends events with updates when an appliance is set to start at a future time. I'm not sure if the JSON being received from Miele is invalid or if somehow it's getting corrupted or possibly interrupted. Or possibly it contains a special character which is causing problems for the JSON parsing.
If you update the Miele Integration, I have added better logging around this issue, so you should see the JSON that's causing the problem in the logs when this happens. If you post back here the text of the JSON so I can have a look that would be helpful.

Thanks @xap, here is the Log after update.

1 Like

Got it, looks like the JSON is missing some closing brackets at the end. Very strange, I haven't had that issue. I will see what I can do to handle that.

1 Like

@Harjuipa I have released an update to the integration app. I've switched from the default JSON parsing to a more forgiving type of parsing (JsonSlurper with type LAX) . Hopefully this will stop the JSON you're seeing from not being processed. BUT it's kind of odd that you're not getting the full JSON from Miele, it's possible I guess that some attribute values might get missed from the end of the JSON. So if you see any other issues like not seeing values update that you expect then let me know.

(I wonder if it's something to do with the SSE stream processing in Hubitat as I've seen similar behaviour from another app I use. But in truth, I don't know, and I can't find more information on the problem.)

Anyway, hope this version works better for you :+1:

Thanks @xap, now it works and Logs are not showing any Errors. This is perfect now :star_struck:

1 Like

Miele's API is down for me at the moment. Gave me the opportunity to test the error handling in the app and fix it. Version 1.0.4 of the app handles communication failures better now. Silver lining to every cloud :slight_smile:

Before I decide what to do next with my spare time... are many folk using this integration? and is there interest in me implementing support for device actions? what about specific support for the Miele Robovacuum? Is there any functionality missing that someone would value?

1 Like

Hey folks. I'm migrating from Hubitat to Home Assistant so I won't be maintaining this code any more. Please feel free to fork, if someone else wants to take the code over I can remove the details from HPM so they can publish it but otherwise I'll leave the code on github and in HPM so you can still use this.

Hi Author. Ive been trying top get this to work with no joy.
I have Miele@Home setup. I have registered with the API and received Client and Secret but they fail to autheticate.
I have used the same email addy as used with the app which I assume is important and thats how the API links to the machine?
Is the App name important. ie does it matter that it is?
*** edit*** solved. I changed the App name and got a new set of credentials and now its working!