-
-
Notifications
You must be signed in to change notification settings - Fork 359
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
Cannot setup battery.charge and temperature sensor for Green Cell PowerProof 2000VA UPS05 #2727
Comments
Cheers, and welcome to the NUT community! Regarding the custom build, check the https://github.com/networkupstools/nut/wiki/Building-NUT-for-in%E2%80%90place-upgrades-or-non%E2%80%90disruptive-tests instructions (you probably have build prerequisites already, but better revise the linked documentation too). This should take care of using same configuration paths and account names as packaged NUT, although not all binaries may land into same locations (maybe good or bad, depending on how eager you want to "forget" the packaged variant). Note you can probe the device by calling the driver program from the build workspace (possibly via If nothing else, newer NUT codebase should be more inclined to troubleshooting and debugging, see also https://github.com/networkupstools/nut/wiki/Changing-NUT-daemon-debug-verbosity -- this might help you trace the actual queries to and replies from the device. There are many dialects of Megatec Qx (where X is a number) protocol family, you might want to pick and try other values of |
Thank you, Jim. Great to be part of the community. Hopefully my quest to solve above challenges will also be useful to others. Regarding the link you shared, I have actually tried to follow it previously, but got lost through the maze of many steps and things to consider. When building I used configure --with-all, so I guess all prerequisites are already in place. I use root user and there is no sudo command on my Linux. Make install is successful too. But then how to move all that newly built 2.8.2 package over 2.8.0 is a mystery. They definitely do not install into the same folders as the packaged NUT. I also tried to run the driver program from my build workspace (I don't have sudo, running using root account directly), but strangely that fails using all kinds of permissions errors, which seems odd to me given that I am doing everything running a root account. The only way to overcome this is by using -u root, then things launch. But then I cannot get upsc to give me any readings always failing with "Error: Connection failure: Connection refused". I really thought compiling it will be the biggest challenge, and then after make install everything will land nicely. But seems I was wrong. It is from make install where all the insurmountable issues really start to pop up... Is there perhaps a particular section in the file I should follow more closely in your view? I am suspecting it must be the "Replacing a NUT deployment" but then it is referring to some many things that I don't quite understand or issues like use of sudo while I don't have sudo, that I am worried that I may damage my proxmox setup in the end if I keep poking at it without really knowing what I am doing... |
You can look at packaging recipes in your distro, they will have a wall-long list of The default build deliberately avoids conflict with packaging, but may be unwieldy in some other aspects (if both exist) as you've found. The "in-place" build support tries to guess the critical ones from available system files and path-name existence, such as using same user accounts that packaging provided permissions for, and same config files so you can test same driver/device definitions. |
Ok, so where do I even start? Do I have to start all the way with git command, getting source and starting compiling all over again, or is there a way to do something with the tar.gz package which I already downloaded and built? |
Ok, I have tried all protocols and subdrivers and here are my findings:
Any clues or further suggestions what to try? |
The |
Further suggestions were to enable debug so you'd see what the device says to queries used. |
how do I enable debug and what should I look for and where when I enable it?
Upgrading to 2.8.2 seems too complicated right now. If not strictly required, I’d leave it until packaged releases have 2.8.2. Not sure why years went by and they are still on 2.8.0...
… On 18 Dec 2024, at 21:47, Jim Klimov ***@***.***> wrote:
Further suggestions were to enable debug so you'd see what the device says to queries used.
—
Reply to this email directly, view it on GitHub <#2727 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AD2QG7XQYO4PTZYMVJY2UWD2GHNMVAVCNFSM6AAAAABT3AWYZKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNJSGIZTQMJTGI>.
You are receiving this because you authored the thread.
|
Thank you, will take a look and report back. In the meantime, do you have a suggestion how I should change my settings above in order to be able to specify battery.pack=2 and have battery.charge correctly estimated? If I enable battery.pack=2 now then my battery.charge estimation goes to permanent 100%.On 19 Dec 2024, at 08:51, Jim Klimov ***@***.***> wrote:
https://github.com/networkupstools/nut/wiki/Changing-NUT-daemon-debug-verbosity
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Double-checking with https://networkupstools.org/docs/release-notes.chunked/NUT_Release_Notes.html#_release_notes_for_nut_2_8_2_what_8217_s_new_since_2_8_1 - there were fixes to battery charge accounting in different releases after 2.8.0, e.g.: |
Well, some distros are still on 2.7.4 that is nearing 8 years old (facepalm). To their moderate defence, it was the latest official NUT release till April 2022, but... still... Many long-term lines of Debian/Ubuntu based distros pick a version of a delivered project to package, and patch it ad nauseam with minor fixes or bugfix backports. On one hand, it does improve stability for end users (few interim surprises as major changes only when you go up to newer distro major version), on another they are left behind as the project upstream gets improved. You might have better chances of newer packaged code with "experimental" or "sid" rolling package repositories, at the cost of potentially being the first to discover new bugs too. Also, I think Proxmox ISOs are based on Debian proper (7.x was on bullseye/11; not sure OTOH what 8.x is based on). So if you really have Ubuntu, that was via added packages that you installed into a somewhat independent of distro of your choice and obligation to manage ;) |
Eh sorry, my mistake. You're absolutely right. I am on latest Proxmox 8.3.2 with Debian GNU/Linux 12 (bookworm). It is absolutely not Ubuntu. I had too many Ubuntu Linuxes in the past and totally mixed it up. Do you know if there is an experimental packages for Debian 12, such that I could find and install latest NUT 2.8.2? Or if not, do you if there is a simple way to fix the nightmare issues on Debian that simple make install is giving me vs the prepackaged version? |
Well, part of the fix can be to Otherwise, I mostly have practice with git-originated builds and automation that ended up as "in-place" build logic, and that path was walked by many others since. So I suggest to not go about inventing new wheels where we have one, and complete the instructions from that wiki page :) |
Ok, I’ll see when I can find another full day to pick that fight up. Already spend a day on it, just not prepared to invest as much again. My main issue is not walking the path. My main issue that each step of the way is faced with problems and as I try to resolve them I am worried that I may make a permanent damage to the proxmox setup. To avoid it I then first need to create a VM to safely walk that path and in case I break something I don’t damage all other months long configurations I did. So one thing requires another and another and it all adds up to requiring too much time. apt-git install nut is so much more straightforward compared to this. Anyway… Would you have any suggestions how to address the battery.packs question from above? |
Just recently the matter of packs was raised and solved in issue #2730 - take a look there. But it may rely on the newer code... |
Thanks, that helped. I got around running debug at level 6. Below is output. It seems what NUT can read gets "--.-" for temperature. So I guess there is no temperature from this device then? Anything else relevant that catches your eye and you recommend to do or set some specific NUT settings?
|
Here is my current output from upsc:
|
I wonder if the UPS USB interface also presebts as a serial port like /dev/ttyUSB0? Then you can try to connect to it with e.g. There are many queries listed in https://networkupstools.org/protocols/megatec.html or https://networkupstools.org/protocols/voltronic.html or https://networkupstools.org/protocols/voltronic-qs.html that can result in temperature reports; maybe the vendor tool uses one of those. That might point us better towards which |
Seems it doesn't have a serial port. This is what I get when I run dmesg | grep tty
If I run screen /dev/ttyUSB0 I get: Cannot exec '/dev/ttyUSB0': No such file or directory. So I guess no luck there either? |
In a remote-console use I have literally that usage, optionally followed by baud rate number. Maybe you have some other version of Does Just in case you type - it is a zero in the end, not letter "Oh" ;) |
Not sure what happens at 16s in your dmesg - perhaps the UPS controller repurposes the connection (assuming FTDI converter is it's part)? Or a NUT driver startup attempt detaches it (try to start with NUT disabled while probing it as a serial port)?.. |
I completely removed NUT, rebooted and tried I also tried |
I see. Then, it indeed does not seem to create a serial port (or not for long). With custom NUT builds, you can probably edit a subdriver source file to add tested operation calls, but I won't be able to assist with that, at least not this year. |
I see. Well, no big deal. I am happy with the basic info I can get for now. One question, when power is connected I get voltage of 27.40V. So I set battery.high to 27.40 and it shows battery.charge at 100%. But as soon as I remove power, that voltage immediately drops to 25V and hence my battery.charge also immediately drops from 100% to 60%. Should I set battery.high to 25V in order to avoid that sudden drop in estimated battery.charge when power goes off, or should this be handled somehow differently? |
Not sure, I think set it to 25V, and the driver should truncate at 100% when on wall power. |
Got it, will do. I think I have finalised my list of settings for my UPS, as shown below. Many thanks for your kind support. How can I record my UPS in the list of supported ones by NUT, so other users may find it when they are searching?
|
Thanks, a pull request to NUT DDL would be great, the syntax has a place for configuration like above, as well as "layman" comments. Please see https://github.com/networkupstools/nut/wiki/NUT-HCL-and-DDL for a starting point. |
Hi Jim, I did submit 2 pull requests. Hopefully everything is correct there. But happy to fix if not. Thank you. On 22 Dec 2024, at 10:42, Jim Klimov ***@***.***> wrote:
Thanks, a pull request to NUT DDL would be great, the syntax has a place for configuration like above, as well as "layman" comments. Please see https://github.com/networkupstools/nut/wiki/NUT-HCL-and-DDL for a starting point.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Thanks! I'll take a closer look after the New Years festivities I guess, traveling mostly offline before then. |
In the table of supported UPSs GreenCell only has 1 listed with poor support. I am happy to provide any data and do thorough testing for mine one to make it work with NUT.
With the configuration below I got most of the features going, but with some still significant limitations, which I would like to overcome:
So my main questions are:
Any help would be hugely appreciated.
My current ups.conf file:
The text was updated successfully, but these errors were encountered: