Closed cvc90 closed 1 year ago
Hi @cvc90 in my log are errors since 1 am today but I have just restart the container and itβs seams to work right now:
16:33:02.609 INFO - Info enabled 16:33:02.627 INFO - Connecting MQTT client 16:33:04.159 INFO - MQTT client connected 16:33:06.582 INFO - Using Miele polling api
Alex
Hi @cvc90 in my log are errors since 1 am today but I have just restart the container and itβs seams to work right now:
16:33:02.609 INFO - Info enabled 16:33:02.627 INFO - Connecting MQTT client 16:33:04.159 INFO - MQTT client connected 16:33:06.582 INFO - Using Miele polling api
Alex
Would you be so kind hiding your personal values, show the .json file? I can't get it to work, I even tried to change the api and password of the account and it still doesn't work...
I have the Token Bearer and as I show in the photos it is working. Is it possible to add it to the .json manually?
@cvc90 Do you like to test pharndt/mielemqtt:3.0.0-pre
?
my full config.json:
{
"mqtt": {
"url": "tcp://mosquitto:1883",
"retain": true,
"topic": "home/miele",
"qos": 2,
"bridge-info": true,
"autoPublish": true,
"deduplicate": true
},
"miele": {
"client-id": "12345678-abcd-1234-1234-123456789abc",
"client-secret": "01234567890123456789012345678901",
"username": "some@other.de",
"password": "password",
"mode": "sse",
"polling-interval": 30,
"token": {
"access": "DE_5c...",
"refresh": "DE_f6...",
"validUntil": "2022-08-30T11:32:40.434+02:00[Europe/Berlin]"
}
}
}
my docker-compose.yml snipped
...
mielemqtt:
environment:
TZ: "Europe/Berlin"
hostname: mielemqtt
image: pharndt/mielemqtt:3.0.0-pre
volumes:
- ./config/miele:/var/lib/miele-to-mqtt-gw:rw
restart: always
depends_on:
- mosquitto
cpus: 0.1
mem_reservation: "50M"
mem_limit: "50M"
...
Thanks @philipparndt, for the copy of your .json file, of course I see differences since in mine I don't have the token section, but first I'm going to try the docker version that pharndt/mielemqtt:3.0.0-pre comments, in As soon as I try the new version, I'll comment if I was able to solve it.
I have updated the docker to version pharndt/mielemqtt:3.0.0-pre, now the same error appears but with another explanation, I attach an image with the current error.
Could I manually get the Tokens (Access,refresh,valid) and manually add them to the configuration file?
Yo can try version pharndt/mielemqtt:3.0.1-pre
with the following configuration:
{
"mqtt": {
"url": "tcp://192.168.2.2:1883",
"client-id": "miele-mqtt-gw",
"username": "username",
"password": "password",
"retain": true,
"topic": "home/miele",
"deduplicate": true
},
"miele": {
"client-id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"client-secret": "12345678901234567890123456789012",
"mode": "sse",
"token": {
"access": "access_token",
"refresh": "refresh_token"
}
}
}
Hello, I updated the docker to version "pharndt/mielemqtt:3.0.1-pre" using the configuration from config-example.json but changing the client id, client-secret, username, password, I can say that it doesn't work as I show in the photo, it keeps giving error 401 without authorization.
Using the configuration that you comment and accessing Miele Developer to get the access_token and refresh_token (Thanks to Chrome development mode seeing the request ) I can say that it works correctly as I show in the photo.
After starting it, all the tokens have been updated again and I have new values for the tokens (access,refresh,validUntil) and it continues to work on the following starts perfectly.
@philipparndt Thanks for getting it to work!! π― π
@cvc90 I think I have found the root cause for the problem. The country-code was hard-coded to de-DE
.
Can you test this version: pharndt/mielemqtt:3.1.0
With this config (based on your GitHub profile I guess the country code could es-ES
:wink:):
{
...
"miele": {
"client-id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"client-secret": "12345678901234567890123456789012",
"polling-interval": 30,
"username": "miele_at_home_user@example.com",
"password": "miele_at_home_password",
"country-code": "es-ES",
"mode": "sse"
}
}
Hi, I just tried the version of Docker (pharndt/mielemqtt:3.1.0), I can say that now introducing the new "country-code" which in my case would be "country-code": "es-ES", it works perfectly, the only thing I see is when starting it shows an error in token because it should not find the tokens and it connects to update it, I attach a screenshot of the Docker registry.
The option in config "timezone": "GMT+1" does not seem to work correctly either, since the photo shows that the time is 8 o'clock and it is 10 o'clock.
On the main page of Github you do not have the "country-code" located in the example configuration by username /password and in the example of access token it is located wrongly, you have it inside "mqtt": instead of in the "miele": section.
Taking advantage of the situation, I volunteer to translate these outgoing messages or any other text into Spanish.
pharndt/mielemqtt:3.1.1
I do not plan to provide other languages in error messages, as this is hard to maintain. Nevertheless, thank you for the offer to help π.
Thanks for the hint with the wrong position of the country code in the documentation π.
Hi! I just updated Docker to version pharndt/mielemqtt:3.1.1 and these are my impressions after trying it.
Log messages now showing without having the token in the .json file have been removed and no longer show the error.
The container correctly collects the "TZ" variable as shown in the attached image correctly shows the date and time. Although the displayed date format is YYYY/MM/DD and the correct format would be DD/MM/YYYY.
I have added the new variable "loglevel": "info" and "loglevel": "debug" to the .json file and everything seems to work correctly.
Would it be possible to add the MQTT autodiscovery option? I can't sync with Home Assistant/Domoticz, but I see the topic "miele" from MQTT Explorer.
Would it be possible to add the MQTT autodiscovery option? I can't sync with Home Assistant/Domoticz, but I see the topic "miele" from MQTT Explorer.
@cvc90 I add this to an separate issue: https://github.com/mqtt-home/miele-to-mqtt-gw/issues/136
Hello, could you help me to get miele-to-mqtt-gw? For some reason I can't get the Docker version to work, it doesn't get the token to work and looking at the log it gives me a 401 error (invalid credentials) and that's why it doesn't receive the token (I attach an image showing what I'm saying).
The configuration is the same as config-example.json but changing client-id, client -secret, username, password and I checked the credentials both on the page and in the miele app and I can say that it works correctly.
From the page https://www.miele.com/developer/swagger-ui/swagger.html everything seems to work correctly and I can see my devices without problems.
Could it be that today miele-to-mqtt-gw doesn't work? or the credentials written in the .json file containing special characters do not read them correctly?