albertogeniola / ha-meross-local-broker

HomeAssistant addon that handles LAN-local MQTT and API service for Meross Devices.
Apache License 2.0
33 stars 14 forks source link

MSH300HK PUSH request #26

Closed andreground closed 1 year ago

andreground commented 1 year ago

Ciao Alberto,

Grazie per aver condiviso il bellissimo lavoro fatto per rendere Local i device Meross. Ho preso spunto dai tuoi contributi e dalla tua libreria per integrare via MQTT questi dispositivi su Openhab.

Sono riuscito ad integrare praticamente tutto ciò che serve per governare in locale le valvole termostatiche, ad eccezione di questo singolo messaggio che l'MSH300HK continua ad inviare perchè non riceve la risposta adeguata.

Ti è mai capitato di imbatterti in un messaggio simile? Sai indirizzarmi su quale sarebbe la risposta corretta?

Grazie

{ "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 } } }

albertogeniola commented 1 year ago

Hi @andreground ,

please, for the next time, write your messages in English, so that also other people might benefit from the thread.

Regarding the issue, the Appliance.Hub.SubdeviceList PUSH notification is sent to notify the mobile app that some sub-device has been added or removed from that HUB device. I don't think this message requires a response. From my experience, the PUSH notifications do not require any response. They just notify some change to the app.

andreground commented 1 year ago

Hi Alberto,

That's wrong unfortunately. I finally managed to make it working by reverse-engineering the Meross APP<>Server dialogue.

The pairing between the valves and the hub must be confirmed and the structure of the message is as follows:

"header": { "messageId": "xxxxxxxxxxxxxxx", "namespace": "Appliance.Hub.SubdeviceList", "method": "PUSH", "payloadVersion": 1, "from": "cloud\/sub\/xxxxxxxxxxxxxxx\/xxxxxxxxxxxxxxx", "timestamp": 1669657790, "sign": "f433d4aa478454ba722355bea76ae677" }, "payload": { "subdeviceList": { "subdevice": [ { "id": "0300XYZC", "status": 0, "time": 1669657789 } ], "needReply": 0 } } }