MQTT message to restart Meross devices #115
Replies: 4 comments 11 replies
-
Hello @Pierremenard , If you can share that thread link I would be happy to look at it since I had to guess and try and still I don't have a clear picture of it but. This is what happens in meross_lan and is actually working fine (at least on the 2 mss310 I have):
meross_lan replies immediately by resending the same message structure with the correct timestamp (note it uses PUSH method)
I've discovered (in a random test) that I could also send that PUSH message with the correct timestamp at any time in order to restart the procedure/reset the time. So now meross_lan does exactly this: when it detects a wrong timestamp (timestamp assumed wrong when more than 5 secs away from HA epoch) it pushes a "PUSH" - "Appliance.System.Clock" with the correct timestamp. I've not tested that as I'm writing but it worked good at the time I implemented it. |
Beta Was this translation helpful? Give feedback.
-
Hi @krahabb , thank you for your reply. I read deeply the thread on time setting and I've already implemented it in my script (I don't use HA). It perfectly works: at the boot the plug ask for time and the script sets the correct timestamp. Thank you F.V. |
Beta Was this translation helpful? Give feedback.
-
I've finally checked the 'transaction' I suggested you and found that the message to trigger the clock synchronization is not what I told you :( The scheme is the same but the payload need to be empty like this: {
"header": {
"from": "/app/6549264-3512a18a5hf5c7354d00f250d5bd09ba/subscribe",
"messageId": "122e3e47835fefcd8aaf22d13ce21859",
"method": "PUSH",
"namespace": "Appliance.System.Clock",
"payloadVersion": 1,
"sign": "5715a129e24c0cee7858ac17f7b028ff",
"timestamp": 1637245187
},
"payload": {
}
} Of course the subsequent 'pushes' from the device will be sent to the topic you set in the 'from' field here My code in meross_lan was actually sending the payload as previously stated...I don't know what I was thinking at the time but it is likely not working.
|
Beta Was this translation helpful? Give feedback.
-
@Pierremenard, The ConsumptionX payload instead is being pushed on mines too. I've never investigated its properties like if its on a timer or maybe some value changes triggering the PUSH. If I'm not wrong, the 'Appliance.Control.Electricity' too is being PUSHED sometimes but I'm not really sure. |
Beta Was this translation helpful? Give feedback.
-
Hello, my Meross mss310 (on a local broker) sometimes stop sending power readings, randomly (reading are zeroes). They are firewalled and time is set at the boot through MQTT (there's a full thread on this topic).
The only way to make the power readings work again is by power cycle them. They reboot and time is set again.
I was wondering if there is a known NameSpace/Method/Whatever to make them reboot with a MQTT message.
Thank you
Francesco
Beta Was this translation helpful? Give feedback.
All reactions