Closed Oberchefe closed 3 years ago
Thank you! This is a very good point. I will make sure to incoroprate this (or something similar) into the script! -But you are basically saying that Status = 255 when it is disconnected? That sounds like a perfect way to check for it! -And if that is the case, we could return "Disconnected" in the MQTT publishings.
as you can see in the official documentation https://www.miele.com/developer/swagger-ui/swagger.html Status 255: NOT_CONNECTED
and this is what I get in this case:
["status"]=>
array(3) {
["value_raw"]=>
int(255)
["value_localized"]=>
string(13) "Not Connected"
["key_localized"]=>
string(5) "State"
}
Hehe, thanks. I guess I read the documentation before this was even there, and haven't really checked back since :-)
-But this is absolutely perfect! I will add it to the script ASAP!
Tnank you for this suggestion. It has now been added as part of the "Development" branch.
I'm using a modified script based on an older version of this Miele-MQTT. Thanks for this script! I just had one issue. In case my Miele devices had problems connecting to the Miele server(Miele App shows "Device not connected"), the script stopped with errors due to the server doesn't send all of the informations used in the script in that case. At the end I added some lines for each device to skip these informations in this case:
switch ($appliance_type) {
existing code here
$programStatus=$appliance['state']['status']['value_localized']; //working also in case not connected $programTypeRaw=''; //not working in case not connected $programPhaseRaw=''; //not working in case not connected .... ... ... }
Based on my experience with devices not connected, only 4 things are working all the time:
$appliance['state']['ProgramID']['value_raw']; $appliance['state']['ProgramID']['value_localized']; $appliance['state']['status']['value_raw']; $appliance['state']['status']['value_localized'];
I hope this helps.