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

Programm name not fully transfered #31

Open Loxfreek opened 3 years ago

Loxfreek commented 3 years ago

I found another problem of the script - transfer of entire program name not given In this example, an oven: If an automatic program is selected (e.g. chicken) and then further selection is possible (e.g. whole), then only "whole" is transferred from the script. Of course, this makes the display unusable. Same issue I found on steam oven. Remedy: the entire program String must be transferred.

oklona commented 3 years ago

Interesting! I only have a dishwasher from Miele, so this is not a known scenario for me :-) Could you send me the "dump" output (-d) from your oven while such a program is running?

christianTF commented 3 years ago

Imho, some of the variables collected as strings return (or may return) an array. An implode would do the job, but I also only have the Dishwasher, and only saw php warnings for that as I was connected remotely to @Loxfreek .

oklona commented 3 years ago

Ok, we will have to wait for the dump, then, so we can see exactly how the JSON looks :-)

Loxfreek commented 3 years ago

I will try to send you the data on weekend

Viele Grüße Winterholler Jürgen

Am 02.08.2021 um 15:16 schrieb oklona @.***>:

 Ok, we will have to wait for the dump, then, so we can see exactly how the JSON looks :-)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

Loxfreek commented 3 years ago

I have produced the Dump file. I have used the "Backofen" (oven) and switched to Automatic Program "Hähnchen" -> "ganz". Again I can see only "ganz". First level of program name is not shown Miele Backofen DUMP datei.txt

oklona commented 3 years ago

Perfect, thanks! I will look into it while you cook your chicken ;-)

oklona commented 3 years ago

Hmmm... I am afraid I have bad news... The values that we are given in the JSON from Miele is this:

["state"]=>
array(21) {
  ["ProgramID"]=>
  array(3) {
    ["value_raw"]=>
    int(396)
    ["value_localized"]=>
    string(4) "ganz"
    ["key_localized"]=>
    string(19) "Programmbezeichnung"
  }

There simply is no information on the rest of the program name. Maybe the value "value_raw" points to a more specific program name, but in order to use it, we would have to build a table of all possible "value_raw" and their corresponding program name. -And obviously, we risk this being different from oven to oven, although I would expect Miele to keep the same codes across all ovens.

Loxfreek commented 3 years ago

Should we contact Miele App developer to request an update on Miele API?

oklona commented 3 years ago

That could be done. I haven't really had any response from them the last few times I have contacted them, but I can try.

christianTF commented 3 years ago

I tried two weeks ago to get the api endpoint for all available programs on a device (in Miele‘s App I am sure an api call is done to select the program) - no response. From my perspective, only a small piece of the full api is documented.

oklona commented 3 years ago

Yes, definitely. And I have a feeling "our" API is not really the same as the app's API, but I haven't tried to intercept messages and stuff.

Loxfreek commented 3 years ago

I have sent another email to Miele developer. Maybe it would be helpful if you can contact them parallel.