krahabb / meross_lan

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

Update to 5.0.3 changed almost every IP-Adress - now I cant add MSH300HK anymore #423

Open XAequitasX opened 5 months ago

XAequitasX commented 5 months ago

After Update to 5.0.3 almost every device had an unknown IP adress configured and couldnt be used anymore, I changed them manually / Settings -> Integrations -> Meross_LAN -> Configure -> Configure -> Device Host adress / back to what the supposed to be. All lightbulbs werent effected by this issue.

Before any questions occur, yes they have a static reservation and I checked my firewall, dhcp, my documentation and the last 2 dhcp configs to make sure that nothing has changed on my side.

But it seems to be impossible to change the ip adress back to the "normal" adress for MSH300HK because I get the same error every time im trying it. Error message: Expecting ',' delimiter: line 1 column 4046 (char 4045)

Updated to 5.0.4 -> no change

So, all 16 devices added to this Hub arent reachable via HA at the moment. Via Merossapp,everything is fine.

Screenshot 2024-04-18 171522

krahabb commented 5 months ago

Hello @XAequitasX, Could you try and see if the 'Device configuration' works by trying to force the protocol to HTTP and to MQTT ? Does the error change between the 2 different approaches ?

The error itself is generated when meross_lan tries to json decode the device configuration reply (which is truncated and so leads to a malformed json message) due to your hub hosting 16 devices which leads to a very 'bulk' query response...sadly enough I cannot figure out how to overcome this limitation since it appears as if the device itself is unable to manage the buffer needed to send the reply (this happens in my tests when the response size roughly exceeds 4K - even less for non-hub Meross devices like plugs or so)

Moreover the query cannot be split since it is just a single message query the carries the whole device configuration.

As for why the device works on the App this leads me to thinking that this limitation could be bypassed in some way..I'll think about it.

Also, I remember another user with 16 devices (all thermostatic valves: a mix of mts100 and mts150) connected to the hub which wasn't hit by this specific issue (even though the bulky messages led to other issues in normal operations of the device which were then fixed).

The issue appeared when upgrading to 5.0.3: which version were you using before? downgrading to that same old version does fix the issue? If any, I expect you where using a pre 5.x.x since nothing particular has changed since 5.0.0 on this side while many things changed from 4.x.x to 5.xx

browetd commented 5 months ago

Same here (4 devices changed IP address out of 13)... This problem is not new, I had some IP changes in the past when upgrading but it is easy to restore the correct IP address in the configuration parameters of Meross LAN... Everything is working well in Meross App !!! My devices are most MSS310... Thanks

XAequitasX commented 5 months ago

Thanks @krahabb for the long answer....and sorry for my belated answer, i was not feeling well and had to take care of myself first.

with MQTT: No MQTT broker (either Meross cloud or HA local broker) available to connect with HTTP: Expecting ',' delimiter: line 1 column 4046 (char 4045)

Connected devices: 1x MS400 Waterleak sensor 8x MTS150 Thermostatic valve 7x GS559 Smoke detector

I could try to split the devices onto different hubs, tried to avoid that, but if this would be the only solution, I would do that -still having 3 hubs sitting around unused

What verison I had before? no idea,...tried to downgrade to other verions, but didnt work and then i got sick....

Ok - just downgraded to v4.5.3 and everything is working again