Comments (15)
👋 Thanks for opening your first issue here! If you're reporting a 🐛 bug, please make sure you include steps to reproduce it. Also, logs, error messages and information about your hardware might be useful.
from addon-nut.
As I'm sure you can appreciate, we can't test and validate every UPS config out there. Although in theory it should work from what I can see, is there a chance you could validate using SNMP v1/2 rather than V3?
from addon-nut.
Yep, I and understand not having the ability to test all configurations. I just wanted to check if you might know how SNMP can be configured. I also tried v1 with the same result. I also set logging to debug level and other then giving me some debug statements on Pwned database
calls, it did not provide any additional information as to why snmp-ups
is failing.
Is there any way to send/add "-DD" argument to snmp-ups
executable to show detailed debug info? E.g., snmp-ups -DD
SNMP v1 config:
devices:
- name: apcups
driver: snmp-ups
port: 172.20.0.55
config:
community: public
snmp_version: v1
mibs: apcc
pollfreq: 15
from addon-nut.
To get the addon to start, you can set the config to be something like:
devices:
- name: myups
driver: dummy-ups
port: dummy.dev
config: []
This would start using the dummy driver, you could then possibly exec into the container and run the nut executables from there.
from addon-nut.
Does the plugin create the ups.conf
file similar to below and run the below command? I'll give the dummy command a shot.
The contents of the ups.conf file
[APC_UPS]
driver = snmp-ups
port = 172.20.0.55
snmp_version = v3
secLevel = authPriv
secName = snmpprofile1
authPassword = *********
authProtocol = MD5
privPassword = *********
privProtocol = DES
desc = "APC UPS"
Command:
$ sudo /lib/nut/snmp-ups -DD -a APC_UPS
from addon-nut.
We generate the ups.conf
Only run the -D on debug being set today, we could change this if needed:
addon-nut/nut/rootfs/etc/cont-init.d/nut.sh
Line 113 in 5715820
from addon-nut.
I was able to exec into the container.... Editing the /etc/nut/ups.conf
and running /usr/lib/nut/snmp-ups -DD -a myups
worked fine.
Looks like the config
param values are not getting set.
This is what I have in the config (for devices):
devices:
- name: myups
driver: dummy-ups
port: dummy.dev
config: []
- name: apcups
driver: snmp-ups
port: 172.20.0.55
config:
snmp_version: v3
secLevel: authPriv
secName: snmpprofile1
authPassword: myauthenticationpassphrase
authProtocol: MD5
privPassword: myprivatepassphrase
privProtocol: DES
desc: APC UPS
And here is what is in the /etc/nut/ups.conf
file:
from addon-nut.
@kkellner Try an array of strings for the config
option, like so:
Documentation for config
option: https://github.com/hassio-addons/addon-nut/blob/master/README.md#sub-option-config
devices:
- name: myups
driver: dummy-ups
port: dummy.dev
config: []
- name: apcups
driver: snmp-ups
port: 172.20.0.55
config:
- snmp_version = v3
- secLevel = authPriv
- secName = snmpprofile1
- authPassword = myauthenticationpassphrase
- authProtocol = MD5
- privPassword = myprivatepassphrase
- privProtocol = DES
- desc = APC UPS
I believe I originally set it up this way due to validation restraints when using nested arrays in add-on config files.
from addon-nut.
So when I type this config section in the plugin config text box:
config:
snmp_version = v3
secLevel = authPriv
secName = snmpprofile1
authPassword = myauthenticationpassphrase
authProtocol = MD5
privPassword = myprivatepassphrase
privProtocol = DES
desc = APC UPS
then click save, it turns to this in the config text box:
config: >-
snmp_version = v3 secLevel = authPriv secName = snmpprofile1 authPassword
= myauthenticationpassphrase authProtocol = MD5 privPassword =
myprivatepassphrase privProtocol = DES desc = APC UPS
The ups.conf ends up looking like this:
from addon-nut.
Please review my sample config again carefully. The hyphens at the beginning of each line are required.
from addon-nut.
Sorry, too many cut/paste/edits. Your version with hyphens worked. I'm going to add the sensor next to see if I have real data.
from addon-nut.
That is great news! Please report back your findings so that we can close this issue if nothing further needs to be implemented to get this to work without in-container modifications.
from addon-nut.
Looks like I've getting real data! Two questions:
-
Where does host
a0d7b954-nut
come from and when might it change? I saw in another issue the statementthis will change if the addon moves from the edge repo.
but I don't know what that means. -
Is there a way to get additional attributes? E.g., current
in voltage
andout voltage
,ups temperature
?
from addon-nut.
Awesome, even more great news!
-
The host is derived from the name of the container, which I believe is generated based on the hash of the add-on repo and the name of the add-on. In this case
a0d7b954
is the repo hash (Community Edge repo) andnut
is the add-on slug. -
In a normal install, the available sensors are specific to each model of UPS device and what it exposes. I am not 100% sure on how to expose that same data via SNMP, as I have never before used SNMP.
from addon-nut.
This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.
from addon-nut.
Related Issues (20)
- NUT fails to start reporting insufficient permissions on libusb HOT 41
- upsd high cpu usage on rpi4 (0.12.0) and causes HA to crash HOT 2
- SNMP not working - Add on not starting HOT 2
- Fails to start with HAOS 11.1 HOT 3
- The HOST is rebooted after the add-on is launched HOT 12
- NUT fails to start using SNMP. HOT 8
- Only one BX1500M is seen HOT 18
- Missing MIB HOT 4
- NUT not starting (No such file or directory)
- Fails with 2 UPSes HOT 11
- UPS monitoring fails randomly with "Poll UPS [myups@localhost] failed - Data stale" HOT 2
- Manufacturer details missing HOT 1
- Manufacturer details missing HOT 1
- Option 'pollonly' does not exist HOT 4
- NUT fails to start: Can't claim USB device: Other error / Driver failed to start HOT 21
- Server not listening on port 3943 HOT 1
- Two identical Cyberpower UPS's HOT 3
- Data stale error HOT 2
- Unstable experience with APC UPs HOT 5
- driver: snmp-ups - 2 devices - no data for second device HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from addon-nut.