-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
404 and TypeError during startup from request to devices/__ #213
Comments
Thank you so much for the timely solution !!! 😀 By the way, the same change is also needed in private getCommandIds(id: string): Promise<string[]> {
const req = this.request(HTTPMethod.GET, this.uri.commands(id));
return req.then(json =>
Object.keys(json).filter(x => {
// Ignore anything that is an empty string or '_'
- return x.length > 0 && x !== '_';
+ return x.length > 0 && !/^_{1,2}$/.test(x);
}),
);
} |
Thanks @XueningXu, good catch. I’ve created a PR that hopefully @aarons22 will be able to merge soon. |
The replacement of the line fixed the issue for me as well - Thanks y'all! I did have some confusion finding the file. On my Mac running Homebridge the file was titled BondApi.js - not .ts as stated in earlier posts. You will need to turn off hidden files to find it in /usr/local/lib/node_modules/homebridge-bond/dist/BondApi.js I performed a find and replace function with the red and green lines and that worked out great. |
Describe the bug
When homebridge-bond is starting up, it makes a request to
devices/__
, and the following errors occur:As far as I can tell, this doesn't seem to affect the functionality of existing devices (my ceiling fan works in HomeKit), but as pointed out by @XueningXu it prevents new devices from being added.
Making the same request manually via curl also 404s:
I think this is related to the v3 firmware "local hash" (although I'm 99% sure I was getting a 404 error even before upgrading to v3, but don't have the logs to prove it).
The solution is hopefully as simple as adjusting the filter in
getDeviceIds
andgetCommandIds
fromBondApi.ts
to remove both _ and __; something along the lines of:Information (please complete the following information):
Logs
Homebridge debug mode logs:
The text was updated successfully, but these errors were encountered: