oklona / Miele-MQTT

A very simple script to read data from Miele@home cloud services, and publish using Mosquitto MQTT
21 stars 10 forks source link

Miele renamed devices #19

Closed Oberchefe closed 3 years ago

Oberchefe commented 3 years ago

Miele renamed some devices (at least the "Washing Machine" and "Clothes Dryer". Therefor:

Line 451 has to be changed from case "Washing Machine": into case "Washing machine":

Line 686 from case "Clothes Dryer": into case "Tumble dryer":

The "Dishwasher" wasn't changed, the other devices I don't know.

christianTF commented 3 years ago

I can confirm this for the "Washing machine". After changing the casing in the script, the script matched the device. Possibly the Miele app itself is not case-sensitive on the device type, but the script is.

oklona commented 3 years ago

Hi guys! Thanks. I think this is about the time when we should move over to just reporting all the data available, regardless of what device it is. Miele seems to report the same parameters for all devices, regardless of whether they actually make sense. -So "Time running", for instance, would be reported regardless of whether it is a refrigerator or a dish washer. (I believe the value for Time running for a refrigerator is set to an invalid value or something.)

This would allow for the data consumer to determine what data is relevant for your use case, and you can choose to subscribe to what you want.

I have planned to test this soon, but I am a bit short on time at the moment. It should be a very easy fix, but at the same time, I also want to rewrite the login-parts, and add refresh_token (and time when the access_token expires), so that we can have automatic updating of tokens.

skyrop commented 3 years ago

"Combi Steam Oven" is also renamed. After changing it to "Steam combination oven" in the script, it matched and worked again. Unfortunately by starting the script manualy i get the notice: Any Idea to fix it?

PHP Notice: Undefined offset: 1 in /opt/loxberry/webfrontend/legacy/miele/miele-MQTT.php on line 599 Notice: Undefined offset: 1 in /opt/loxberry/webfrontend/legacy/miele/miele-MQTT.php on line 599 PHP Notice: Undefined offset: 2 in /opt/loxberry/webfrontend/legacy/miele/miele-MQTT.php on line 600 Notice: Undefined offset: 2 in /opt/loxberry/webfrontend/legacy/miele/miele-MQTT.php on line 600 PHP Notice: Undefined offset: 1 in /opt/loxberry/webfrontend/legacy/miele/miele-MQTT.php on line 599

oklona commented 3 years ago

Thank you, everyone! To make sure we avoid this issue, I have now rewritten the script so that everything is returned, regardless of the device name. Please test this release (under the Development branch during Easter), and raise new issues if there is something that needs to be improved :-)