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
blazer_usb:how display battery.runtime on NUT #2389
Comments
If the device does not serve this information (or not in a way the NUT driver can interpret it), but serves the battery voltage or charge - please explore the |
Thanks for your reply,forgive me not good at English.I`m a development of UPS,the device can show the battery runtime in our software.But,it does not show the information in NUT.What correct protocols should I use to display on NUT? |
Aha, great to see vendors paying interest! :) In NUT, we have many drivers supporting different protocols and dialects (usually with a For USB devices, it depends on the vendor's choice of OEM firmware roots, ideally it would be standard USB HID (likely with vendor/model specific mappings - see Previously several separate drivers handled different Megatec variants, including blazer ser/usb drivers, but these are now absorbed into and deprecated in favor of For starters, I'd suggest to read these docs:
In case of USB HID, you would likely need to provide a new mapping from USB report IDs to NUT standard data point names; possibly some data conversion helper methods if scaling etc. is needed. In case of nutdrv_qx, some One point of contention for hardware design (may be too late for you if the product already exists) is using USB vendorid/productid licensed from USB-IF organization and not a random mix of |
Dear jimklimov,Thank`s for your support. Now,NAS manufacturers have used the nutdrv_qx driver,which has resulted in some information not being available in NUT(such as ups.mfr、ups.model...).Unfortunately,many of my machines still use old drivers(blazer_usb),which I want to continue using it!The protocol I`m currently using is Voltronic Power - ‘QS’ Protocols,which can only be used on blazer_usb drivers instead of nutdrv_qx?Can I understand it this way? What can I do to get the information(such as ups.mfr、ups.model、battery.runtime) in NUT?Use the protocol of "Voltronic Power UPS Protocol - unofficial decoding work"? |
Well,
|
Fine,I have checked the information,it seems to have used an older version - Voltronic-QS 0.07!! :( |
Regarding an older version - for new development it is recommended to start from current NUT sources (fork this github repository, make a branch in your copy for the new feature, tinker there, post PRs back). With Regarding "which command to send", from cursory reading "I" may be correct to get information (some drivers do it and get a long string that is chopped into several sub-strings for mfr, model, serial(?) and firmware number, IIRC). Unfortunately, I am not deeply involved in Qx drivers and protocols, and mostly supervise the general architecture of the project, so am not able to answer such specific questions. On your side, are you involved in developing the device itself (can you change the hardware/firmware; do you have specs and protocols from a team who does?) or are you trying to develop/update a driver for a "black box" device as it sits on your desk? Actually, is the early assumption that you are in some aspect related to the "vendor" of a device correct? Or are you "just a curious user" like most of us? :) |
Aha,I `m indeed involved in developing the device itself ,but I just a newguy in our team. :) Actually, we encountered a strange problem: In NUT,when we configure the blazer_usb(our UPS driver) UPS driver in ups.conf,we can get the information,such as:ups.mfr/ups.model/device.model/device.model.However,when we modify the nut ups.conf file to nutdrv_qx,these information will not be displayed in NUT(ups.mfr/ups.model/device.model/device.model). We want to modify our code(UPS protocols or UPS driver for nutdrv_qx?) without modifying the NUT sources.Besides,I want to know that NUT wants to obtain data from UPS(like battery.runtime,ups.model...),I just need to choose the correct protocol format? |
Well, that gets a bit complicated then :) Usually it is HW vendors using/dictating the protocol, and programs like NUT adapting to it - I'm not sure adapting new HW releases to 8-year old software (NUT 2.7.4) is viable long-term... maybe while you would be teaching the HW/FW capabilities, the NAS vendor would just upgrade to a base OS with newer NUT packages :\ So I must worry a bit if your team's investment is placed correctly. Still, if the device would cover all bases, old and new, it would be great :) Another aspect is to maybe work with the NAS vendors (their documentation at least) to suggest using the driver which works better for your device, at least for that older release. Usually changing docs is the most quick and cheap solution. Finally, looking forward to the time when your customers WOULD be using newer NUT versions, be sure to test against git master branch and recent releases, so you would know the device and NUT programs work together out of the box - at least starting from some release (which you can document - e.g. "NUT v2.8.3 or newer is recommended" and that could also poke NAS vendors to update their OS).
As I mentioned, unfortunately the specific protocol knowledge is not my strong side. Speaking from methodology point of view:
|
If I want to show the battery.runtime on NUT,what should I do?How should I write the communication protocol of UPS?
The text was updated successfully, but these errors were encountered: