Closed canadaohcanada closed 4 years ago
I found that adding a simple if check around the line in question solves my issue. Could we please wire this up as an config option or make it a permanent part of the source?
From /lib/litter-robot-connect.js
line 105
response.data.forEach(robot => {
if (robot.isOnboarded) {
let device = new LitterRobotDevice(connect, platform, robot);
connect.devices.push(device);
}
});
Sorry, didn’t get the notification for this. Thanks for reporting - I didn’t realize they had this. I’ll put together a fix tomorrow.
I pushed 1.1.0 which should resolve this. By the way - do you happen to know how/why your deviceType is UDP? Mine is IOT which I assume is why I have to go through their REST API. If there is really a UDP mode, this could be much more efficient and accurate instead of having to poll remotely.
First, thank you for this plugin, it is exactly what I was looking for! In the call seen in
lib/litter-robot-connect.js
around whereconnect.log('Syncing robots');
is printed my API returns TWO robots instead of one. I believe there are two robots on my account as I am on my second device after returning the first one for repairs. Would it be possible to exclude (or make a config option to exclude) any device with aisOnboarded
value offalse
?Here is my current response from the API call you're using to determine the number of robots:
Finally, having two robots in the Home app is really confusing without a means to tell them apart. In my instance both devices have the same name. If this occurs it might be nice to have two devices
Shitty Kitty 1
andShitty Kitty 2
in case the names are otherwise identical.Thanks again for this wonderful plugin, it's really great!