normen / homebridge-landroid

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

More logging info regarding mowing #23

Closed andy-dinger closed 4 years ago

andy-dinger commented 4 years ago

I have added a few extra lines to the log to give some more info on what logging the mower is actually doing. I also have a problem with connectivity in my garden so I'm logging when the updates occur and at what signal strength so I can spot drop-outs. I'd be happy for you to use this code in the main release but if not I'll keep it as a private add-on.

The updates are in the LandroidAccessory.prototype.landroidUpdate function as shown in the attached file: ABindex.js.txt

normen commented 4 years ago

Sure but a normal PR would be easier to review and integrate.

andy-dinger commented 4 years ago

Ok happy to do that (but never done one on public GitHub before so excuse the delay while I teach myself!).

normen commented 4 years ago

Looking at the code best make that whole output optional and maybe you want to activate the online/offline callbacks as well to get even more info?

andy-dinger commented 4 years ago

OK, I understood your 1st comment and I can add a configuration option by copying your schema for Debug. However, your 2nd suggestion might need a couple more lines of explanation.

normen commented 4 years ago

A line of code is worth a thousand words ;) https://github.com/normen/homebridge-landroid/blob/8a648d5a5ca3482ea47b8929a4f3573b69088884/index.js#L48

I think these get called when the mowers go online and offline (i.e. out of wifi range), but it might be it's just the cloud connection - which might be helpful as well.

andy-dinger commented 4 years ago

A line of code is worth a thousand words ;)

https://github.com/normen/homebridge-landroid/blob/8a648d5a5ca3482ea47b8929a4f3573b69088884/index.js#L48

I think these get called when the mowers go online and offline (i.e. out of wifi range), but it might be it's just the cloud connection - which might be helpful as well.

Tried that but it did some really weird stuff without giving me any more insights. So I have sent the USB log off to Worx to see if they have any suggestions.

andy-dinger commented 4 years ago

Looking at the code best make that whole output optional and maybe you want to activate the online/offline callbacks as well to get even more info?

So I have now made the code optional and it only outputs when the data changes on a state change. I'll test it for a bit on this fork https://github.com/andy-dinger/homebridge-landroid/tree/mowdata before sending the PR.