virtualzone/landroid-bridge

Timeout when no mower is online

Opened this issue · 3 comments

When both of my mowers are turned off the landroid bridge never boots up completely, it doesn't seem to get the "first update". This causes the bridge to repeatedly try to log in and after some time use a lot of CPU and RAM for some reason.

I never noticed this when the mowers were running but now it's winter here and I have them turned off, still the bridge is embedded in my HomeKit system and so I'd like to have it running despite the mowers not being active.

Any idea would be appreciated, thanks for this software!

log output when this happens:
Dez 22 19:39:54 homebridge node[3244]: [2018-12-22T19:39:54.765] [WARN] IoBrokerAdapter - landroid-cloud-2.js will be replaced in next version by mqttCloud.js and worxConfig.js. Reason: better handling of models and mqttCloud supports more brands by a diffent config see also: https://www.npmjs.com/package/iobroker.kress Dez 22 19:39:55 homebridge node[3244]: [2018-12-22T19:39:55.204] [INFO] IoBrokerAdapter - Logged in as xxx@xxx API Token Set to : xxxxxxx Dez 22 19:39:57 homebridge node[3244]: [2018-12-22T19:39:57.046] [INFO] IoBrokerAdapter - mower 0 selected Dez 22 19:39:57 homebridge node[3244]: [2018-12-22T19:39:57.047] [INFO] IoBrokerAdapter - DB510 Dez 22 19:40:54 homebridge node[3244]: [2018-12-22T19:40:54.773] [INFO] LandroidS - Could not finish initialization, retrying... Dez 22 19:40:54 homebridge node[3244]: [2018-12-22T19:40:54.774] [WARN] IoBrokerAdapter - landroid-cloud-2.js will be replaced in next version by mqttCloud.js and worxConfig.js. Reason: better handling of models and mqttCloud supports more brands by a diffent config see also: https://www.npmjs.com/package/iobroker.kress Dez 22 19:40:55 homebridge node[3244]: [2018-12-22T19:40:55.316] [INFO] IoBrokerAdapter - Logged in as xxx@xxx API Token Set to : xxxxxxx Dez 22 19:40:55 homebridge node[3244]: [2018-12-22T19:40:55.839] [INFO] IoBrokerAdapter - mower 0 selected Dez 22 19:40:55 homebridge node[3244]: [2018-12-22T19:40:55.844] [INFO] IoBrokerAdapter - DB510

Just checked in on my system running this, to find it using nearly 100% CPU - same thing, my mower is offline for the winter.

I guess the issue is that an update from a mower is assumed as a signal for a correct login - but I guess a correct login can just be assumed, I am having no issues sending commands when I change this in LandroidS.ts

                 //changes:
                  this.log.info("Could not finish initialization, finishing anyway...");
                  clearInterval(retryInterval);
                  resolve();
                  return;
                    //this.log.info("Could not finish initialization, retrying...");
                    //this.landroidCloud.updateListener = null;
                    //delete this.landroidCloud;