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

Failed to create Config File #15

Closed meteo88 closed 3 years ago

meteo88 commented 3 years ago

Hello,

i am writing because i tried to connect to miele API through you script, but cannot get it working.

I always get the message:

PHP Notice:  Undefined offset: 1 in /opt/loxberry/webfrontend/legacy/miele/miele                                                                 -MQTT.php on line 180
Notice: Undefined offset: 1 in /opt/loxberry/webfrontend/legacy/miele/miele-MQTT                                                                 .php on line 180
Failed to create config! Did you type the correct credentials?

I debugged the php a bit and found out, that the variable $data, in which the response should be stored is in my case NULL.

The weird thing is, that i can connect with the same credentials through the iobroker plugin mielecloudservices without ansy problems and i get all informations of my devices.

But when i try to connect through your script i only get this error above and no config File is ever created.

Do you know why this is happening?

Thank you for your support!

Best regards, Dominik

AleksCee commented 3 years ago

Hi @meteo88 try this https://github.com/oklona/Miele-MQTT/issues/9#issuecomment-717111995

  1. Go to https://www.miele.com/developer/swagger-ui/swagger.html
  2. Click Authorize
  3. Use the second form with your client_id and securekey
  4. On the same site call an api like devices and authorized the client-id/app to use the api. Use user/Passwort if ask for it.
  5. try to run the script again

Alex

meteo88 commented 3 years ago

Thank you so much, now it is working!!

But i only get this informations:

Appliance type Steam Oven is not defined. Please define it, or send information to have it added.
Appliance type Fridge-freezer is not defined. Please define it, or send information to have it added.
Appliance type Oven is not defined. Please define it, or send information to have it added.

Do you know what i have to do?

Thanks and best regards, Dominik

AleksCee commented 3 years ago

Ok, it seams you have only devices witch are not known by the script.

Take a look at the readme:

The code written currently covers Miele dishwashers, washing machines and dryers (thanks, Stoffi!). Run the script with parameter "-d" to retrieve all data about your appliances, send it to me, and I can add more appliance-support to the script. -Or you could add to the script through Github, and create a Pull Request (PR).

Or try the generic version in java witch only publish the infos to MQTT and you must parse the results by yourself: https://github.com/philipparndt/miele-to-mqtt-gw

I have try both but only without devices. We get our washing machine on 11.11. I hope.

oklona commented 3 years ago

Thanks, Alex! I will add your description to the Readme now :-)