krahabb / meross_lan

Home Assistant integration for Meross devices
MIT License
423 stars 47 forks source link

MTS150 pairing with MSH300HK #228

Closed andreground closed 1 year ago

andreground commented 1 year ago

Hello

I managed to integrate practically everything needed to control the thermostatic valves locally, with the exception of this single message that the MSH300HK keeps sending because it doesn't receive the adequate response.

Have you ever come across a similar message? Can you direct me on what the correct answer would be?

Thank you

{ "header": { "messageId": "b58cd1cadba3eb43ae01481cab47XXXX", "namespace": "Appliance.Hub.SubdeviceList", "method": "PUSH", "payloadVersion": 1, "from": "/appliance/XXX/publish", "timestamp": 1669216809, "timestampMs": 592, "sign": "de62fe92ac87f005ea0d4db9822eXXXX" }, "payload": { "subdeviceList": { "subdevice": [ { "id": "0300XXXX", "status": 1, "time": 1669216199, "hardware": "1.1.5", "firmware": "6.1.7" } ], "needReply": 1 } } }

krahabb commented 1 year ago

Hello @andreground, Yes, my own Hub too pushes these messages now and then, but silently ignoring them should be no harm (in my opinion).

To my knowledge, a 'PUSH' transaction started from the device needs a 'PUSH' response on the same namespace (in meross_lan the only tested and implemented is the one regarding the 'Appliance.System.Clock' PUSH message sent when the device wants to synchronize its own timestamp)

Other PUSH messages are usually sent when something happens (toggle switch or so) but I agree the 'needReply' field here points to a kind of needed reply

I don't remember if I ever tried to investigate the SubdeviceList transaction either by replaying the received payload with the same 'PUSH' verb or any but the most likely namespace candidates for the reply should be:

as for the payload structure I have no clue of course

andreground commented 1 year ago

Thanks @krahabb

To answer PUSH request, do you send the response on subscribe or publish channel? And, as a general question, is there any way to do MTM between the Meross gateway and the Meross MQTT server?

krahabb commented 1 year ago

Meross client devices always listen to 'subscribe' channel and publish to 'publish' so you send to the subscribe for the proper device id

You can find a bunch of useful info here (maybe you already found these):

As for the MTM it should work since meross devices don't check the identity of the mqtt broker they connect to so you could use https://github.com/bytespider/mqtt-debug. You'll need to manually reconfigure the device to use your fake broker and you'll find teh utilities to do so in https://github.com/bytespider/Meross