Hello,
I have an openups2 ups. It works very well with nut, except two things:
1) It keeps sending a 'libusb_get_string: invalid argument' message to the log;
2) It does not report any command.

Following http://nut-upsdev.alioth.debian.narkive.com/bmJyFFkO/libusb-get-string-invalid-argument, I was able to fix the error message using the attached patch.

I do not know how ot fix the second point, but it is not really important (it could be convenient).
Regards,
Alphonse.
diff -uNr nut-2.7.4/drivers/openups-hid.c nut-2.7.4.test/drivers/openups-hid.c
--- nut-2.7.4/drivers/openups-hid.c	2015-12-29 13:08:34.000000000 +0100
+++ nut-2.7.4.test/drivers/openups-hid.c	2017-07-21 20:14:21.376998720 +0200
@@ -303,7 +303,7 @@
 
 	/* Battery */
 	{"battery.type", 0, 0, "UPS.PowerSummary.iDeviceChemistry", NULL, "%s", HU_FLAG_STATIC, stringid_conversion},
-	{"battery.mfr.date", 0, 0, "UPS.PowerSummary.iOEMInformation", NULL, "%s", 0, stringid_conversion},
+	{"battery.mfr.date", 0, 0, "UPS.PowerSummary.iOEMInformation", NULL, "%s", HU_FLAG_STATIC, stringid_conversion},
 	{"battery.voltage", 0, 0, "UPS.PowerSummary.Voltage", NULL, "%.2f", HU_FLAG_QUICK_POLL, NULL},
 	/* { "battery.voltage.nominal", 0, 0, "UPS.PowerSummary.ConfigVoltage", NULL, NULL, HU_FLAG_QUICK_POLL, openups_vbat_info }, */
 	{"battery.current", 0, 0, "UPS.PowerSummary.Current", NULL, "%.3f", HU_FLAG_QUICK_POLL, NULL},
_______________________________________________
Nut-upsdev mailing list
Nut-upsdev@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsdev

Reply via email to