openhab / openhab-addons

Add-ons for openHAB
https://www.openhab.org/
Eclipse Public License 2.0
1.86k stars 3.57k forks source link

[miele] RPC-Requests to Bridge return 404 #1947

Closed tobyS closed 5 years ago

tobyS commented 7 years ago

Hi,

I discovered my Miele Gateway quite fine, but discovery of subsequent devices does not work at all. Maybe Miele has changed the API significantly?

2017-02-22 19:09:17.593 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'miele:xgw3000:Miele_WMG823' to inbox.
2017-02-22 19:09:29.347 [DEBUG] [org.openhab.binding.miele           ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.discovery.DiscoveryService}={service.id=357, service.bundleid=219, service.scope=singleton} - org.openhab.binding.miele
2017-02-22 19:09:29.375 [DEBUG] [ing.miele.handler.MieleBridgeHandler] - Initializing the Miele bridge handler.
2017-02-22 19:09:29.377 [DEBUG] [ing.miele.handler.MieleBridgeHandler] - Scheduling the Miele polling job
2017-02-22 19:09:29.379 [DEBUG] [ing.miele.handler.MieleBridgeHandler] - Scheduling the Miele event listener job
2017-02-22 19:09:29.397 [ERROR] [ing.miele.handler.MieleBridgeHandler] - An unexpected status code was returned : '404'
2017-02-22 19:09:29.399 [ERROR] [ing.miele.handler.MieleBridgeHandler] - An exception occurred while posting data : 'http://192.168.0.113/remote/json-rpc'
2017-02-22 19:09:29.400 [DEBUG] [ing.miele.handler.MieleBridgeHandler] - 192.168.0.113 is not reachable

Regards Toby

kgoderis commented 7 years ago

@tobyS That could be very well the case indeed. What firmware is your XGW3000 running on?

We do know that the json-rpc API will be phased out in favour of a REST based API. If you are familiar with Wireshark you could try to snoop your LAN to detect how the smartphone app is talking to the XGW

tobyS commented 7 years ago

@kgoderis: OK, while sniffing the traffic using Wireshark I discovered that the gateway here is actually "XKM 3100 W" and not XGW3000. It seems that this device only communicates with the Miele servers using HTTPS, but does not directly communicate with the App. :( I guess this gateway is not supported by the binding?

kgoderis commented 7 years ago

@tobyS Ah....Miele finally switched to WiFi. Beware this is not a gateway, but a module you insert in your appliance. These are new modules that are not supported by the binding. The binding supports the ZigBee based modules through the XGW3000. The fact that everything goes through their servers (that was always an option before) is surprising. I can not image that there is not a direct connection between the module and the app.

tobyS commented 7 years ago

@kgoderis: I see. Seems this is the way Miele wants to go in the future. I took my network offline and tried to access the machine using the app (while sniffing with Wireshark) but it did not get a connection. Therefore I assume that Miele realizes communication now purely through their servers (a "Miele Cloud"?).

I can offer to give you access to the PCAPNG-Files of my sniffing sessions, but I don't want to upload them somewhere publically to avoid disclosing sensitive information. Would that be of any help? AFAICS there is a large amount of TLS encrypted traffic in there, but still … Please email me at "tobias ((at)) schlitt ((dot)) info" so I can send you the dump in private.