Hello,
I want to let you know that for my device, the IDs (Product ID and usagePage) are different to the IDs Listed in this Repo. So the script cannot find my device.
After changing the Ids, everything (expected the charging status) works.
My PRODUCT_ID: 5923
My usagePage: 65424
If someone has the same problem, some console.log statements are helpful.
For finding the Product Id in Line 21. This prinkts every connected device:
const devices = HID.devices().filter((d) => {
console.log(d)
return d.vendorId === VENDOR_ID && d.productId === PRODUCT_ID;
});
And in line 37, than you have to find the entry with the usage = 771
const bootstrapDeviceInfo = devices.find((d) => {
console.log(d)
return d.usagePage === 65363 && d.usage === 771;
});