Sdahl1234 / Sunseeker-lawn-mower

10 stars 4 forks source link

MQTT not working for multiple devices #5

Closed kanttti closed 4 months ago

kanttti commented 4 months ago

I have 2 Sunseeker mowers. Both "Brücke" brand, but different models. Older: "deviceModelName": "RMA500M20V" "sn": "210316800__" Newer: "deviceModelName": "RMA501M20V" "sn": "2212168000__"

For the newer one updates to HA seems to be working, but not for the older one. Enabled debugging in HA, and I guess this problem is somehow related to identifying the correct device from MQTT messages as the debug messages show that the wrong SN data is updated.

2024-05-10 22:32:07.261 DEBUG (Thread-101 (_thread_main)) [custom_components.sunseeker.sunseeker] MQTT message: /app/1234____/get {"mode":1,"cur_min":11,"cur_area":415,"wifi_lv":1,"on_min":372418,"station":false,"cmd":501,"power":74,"total_min":372418,"on_area":10687,"deviceSn":"210316800__________"} 2024-05-10 22:32:07.261 DEBUG (Thread-101 (_thread_main)) [custom_components.sunseeker] callback - Sunseeker 2212168000__________ data updated

By reloading the integration the data updates for the older one, but I guess in reloading it takes the data from the HTTP messages not the MQTT.

Sdahl1234 commented 4 months ago

I have traced the error. The last robot added is the one getting all the updates. I need to send the updates to all coordinators. I will try to fix it as soon as possible.

Sdahl1234 commented 4 months ago

Fixed in release v1.0.13

egiljohns commented 4 months ago

Niced work! I noticed that just one of my two (RMA301 & RMA801) getting updates in HA, in the app everything is normal. Trying to update and hope that brings some magic :-)

Edit: Working as a sharm 👌