normen / homebridge-landroid

Homebridge plugin to control Worx Landroid robo mowers through the Worx Cloud
25 stars 8 forks source link

"Connection lost" error... #51

Closed tobihoby closed 1 year ago

tobihoby commented 1 year ago

Hi,

since version 0.10.3 I get the following message regularly after the displayed timer:

using websockets custom auth, will connect to 'wss://iot.eu-west-1.worxlandroid.com/mqtt'... connection lost - will attempt reconnection in 128 seconds...

Log: [2.4.2023, 06:33:04] [homebridge-landroid] Restarting child bridge... [2.4.2023, 06:33:09] [homebridge-landroid] Child bridge process ended [2.4.2023, 06:33:09] [homebridge-landroid] Process Ended. Code: 143, Signal: null [2.4.2023, 06:33:16] [homebridge-landroid] Restarting Process... [2.4.2023, 06:33:26] [homebridge-landroid] Launched child bridge with PID 8861 [2.4.2023, 06:33:31] Registering platform 'homebridge-landroid.Landroid' [2.4.2023, 06:33:31] [homebridge-landroid] Loaded homebridge-landroid v0.10.3 child bridge successfully [2.4.2023, 06:33:31] [homebridge-landroid] Restoring Landroid Landroid Scooter from HomeKit [2.4.2023, 06:33:31] [homebridge-landroid] Fallback for On/Off switch [2.4.2023, 06:33:33] [homebridge-landroid] DidFinishLaunching [2.4.2023, 06:33:33] [homebridge-landroid] Login to worx [2.4.2023, 06:33:33] Homebridge v1.6.0 (HAP v0.11.0) (homebridge-landroid) is running on port 33458. [2.4.2023, 06:33:35] [homebridge-landroid] Connected to worx server [2.4.2023, 06:33:35] [homebridge-landroid] Found 1 devices [2.4.2023, 06:33:35] [homebridge-landroid] Found device Scooter with id xxx [2.4.2023, 06:33:35] [homebridge-landroid] [DEBUG] MOWER: Scooter (xxx) [2.4.2023, 06:33:35] [homebridge-landroid] found DoubleShedule, create states... [2.4.2023, 06:33:35] [homebridge-landroid] found OneTimeShedule, create states... [2.4.2023, 06:33:35] [homebridge-landroid] found available firmware, create states... ... [2.4.2023, 06:33:35] [homebridge-landroid] found PartyModus, create states... [2.4.2023, 06:33:35] [homebridge-landroid] Create product folder and states for WR141E [2.4.2023, 06:33:36] [homebridge-landroid] [DEBUG] DATA: totalTime: 1154.8 [2.4.2023, 06:33:36] [homebridge-landroid] [DEBUG] DATA: totalDistance: 1140.7 [2.4.2023, 06:33:36] [homebridge-landroid] [DEBUG] DATA: totalBladeTime: 1130.43 [2.4.2023, 06:33:36] [homebridge-landroid] [DEBUG] DATA: gradient: -0.5 [2.4.2023, 06:33:36] [homebridge-landroid] [DEBUG] DATA: inclination: -2.2 [2.4.2023, 06:33:36] [homebridge-landroid] [DEBUG] DATA: direction: 359.9 [2.4.2023, 06:33:36] [homebridge-landroid] [DEBUG] DATA: batteryChargeCycle: 430 [2.4.2023, 06:33:36] [homebridge-landroid] [DEBUG] DATA: batteryVoltage: 20.44 [2.4.2023, 06:33:36] [homebridge-landroid] [DEBUG] DATA: batteryTemperature: 23.1 [2.4.2023, 06:33:36] [homebridge-landroid] [DEBUG] DATA: mowerActive: true [2.4.2023, 06:33:36] [homebridge-landroid] [DEBUG] DATA: firmware: 3.2800000000000002 [2.4.2023, 06:33:36] [homebridge-landroid] [DEBUG] DATA: waitRain: 180 [2.4.2023, 06:33:36] [homebridge-landroid] [DEBUG] DATA: batteryState: 100 [2.4.2023, 06:33:36] [homebridge-landroid] [DEBUG] DATA: oneTimeJson: "{\"wtm\":0,\"bc\":0}" [2.4.2023, 06:33:36] [homebridge-landroid] [DEBUG] DATA: partyModus: true [2.4.2023, 06:33:36] [homebridge-landroid] found torque control, create states... [2.4.2023, 06:33:36] [homebridge-landroid] Autolock found! Create State : AutoLock [2.4.2023, 06:33:36] [homebridge-landroid] Autolock found! Create State : AutoLockTimer [2.4.2023, 06:33:36] [homebridge-landroid] [DEBUG] DATA: AutoLockTimer: 300 [2.4.2023, 06:33:36] [homebridge-landroid] Start MQTT connection host: 'iot.eu-west-1.worxlandroid.com', 'x-amz-customauthorizer-name': 'com-worxlandroid-customer', servername: 'iot.eu-west-1.worxlandroid.com', 'x-amz-customauthorizer-name': 'com-worxlandroid-customer', using websockets custom auth, will connect to 'wss://iot.eu-west-1.worxlandroid.com/mqtt'... using websockets custom auth, will connect to 'wss://iot.eu-west-1.worxlandroid.com/mqtt'... using websockets custom auth, will connect to 'wss://iot.eu-west-1.worxlandroid.com/mqtt'... using websockets custom auth, will connect to 'wss://iot.eu-west-1.worxlandroid.com/mqtt'... using websockets custom auth, will connect to 'wss://iot.eu-west-1.worxlandroid.com/mqtt'...

Greetings Tobi

normen commented 1 year ago

Yeah I get those too but a) the mower seems to work and b) I am having issues with the official app too right now. Possible I am not doing something the new library expects though, gonna keep an eye on this.

normen commented 1 year ago

It seems this issue is also appearing in the original plugin: https://github.com/iobroker-community-adapters/ioBroker.worx/issues/656

Edit: I think this might happen if you log in too many times during the day (i.e. reboot your homebridge), you might get a 24h ban on sending (not receiving) data.

normen commented 1 year ago

Looks like its a good idea to log out of the Phone App for a while when this happens, I am able to log back in normally now.

t0mmey commented 1 year ago

I have the same issue too, I am getting Error: Connection Timeout in the App. Though the time plan is letting the mower mow, just can't control it via the app anymore. I assume Worx implemented a security feature which will block/ban your account for a certain time if there are too many connection attempts (from different/non-Worx applications). I'll try disabling the Homebridge plug in for now to see if it fixes it. If so we need something to prevent the home bridge plugin from connecting too often to the Worx Cloud. Is that doable?

normen commented 1 year ago

Theres new code that at least keeps the session in the latest version(s) of this plugin, its not really possible to keep the connection over homebridge restarts though, outside of implementing a standalone server only for this connection which IMO is overblown. The guys over at the iobroker project are in contact with worx and I guess a solution will pop up some time soon.

t0mmey commented 1 year ago

Theres new code that at least keeps the session in the latest version(s) of this plugin, its not really possible to keep the connection over homebridge restarts though, outside of implementing a standalone server only for this connection which IMO is overblown. The guys over at the iobroker project are in contact with worx and I guess a solution will pop up some time soon.

Thank you Normen, will wait for it

normen commented 1 year ago

Just as an update, I just got unblocked again and restarted homebridge with the latest version that keeps the session - no issues for now.

t0mmey commented 1 year ago

Hi Normen, I can confirm, after the plug-in update yesterday it’s working fine. Danke dir 😊

normen commented 1 year ago

Just now the worx server was down for a few hours, should be good again.. As if it wasn't hard enough already finding out whats going on 😆 But my connection is still going strong, the app also stays logged in and works.

normen commented 1 year ago

Closing this as the main issue seems to be solved, please open a new issue with new logs in case something goes wrong again. Thanks for testing & reporting!