Skip to content
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

More information #8

Open
pczolee opened this issue May 7, 2021 · 4 comments
Open

More information #8

pczolee opened this issue May 7, 2021 · 4 comments

Comments

@pczolee
Copy link

pczolee commented May 7, 2021

Hello.

This plugin is great, thanks for it! Everything working fine, just I need more information. My ups have this:

battery.charge: 100
battery.runtime: 1584
battery.type: PbAc
device.mfr: EATON
device.model: 5E 850i
device.type: ups
driver.name: usbhid-ups
driver.parameter.pollfreq: 30
driver.parameter.pollinterval: 2
driver.parameter.port: auto
driver.parameter.synchronous: no
driver.version: 2.7.4
driver.version.data: MGE HID 1.39
driver.version.internal: 0.41
input.voltage: 231.0
outlet.1.status: on
outlet.desc: Main Outlet
outlet.id: 1
outlet.switchable: no
output.frequency: 49.9
output.frequency.nominal: 50
output.voltage: 230.0
output.voltage.nominal: 230
ups.beeper.status: enabled
ups.delay.shutdown: 20
ups.firmware: 03.08.0018
ups.load: 21
ups.mfr: EATON
ups.model: 5E 850i
ups.power.nominal: 850
ups.productid: ffff
ups.start.battery: yes
ups.status: OL
ups.timer.shutdown: -1
ups.vendorid: 0463

Can the plugin support more virtual meter, and put all the information to domoticz?

Thanks

@999LV
Copy link
Owner

999LV commented May 8, 2021

Thanks for your appreciation.
Yes, it is really easy to add more variables to the plugin… you just need to add these to the dictionary self.variables in line 50 and following… feel free to submit a pull request when you are done, so that others can benefit as well.

@pczolee
Copy link
Author

pczolee commented May 9, 2021

Thanks for your reply. I made the changes, but something wrong with output frequency.

2021-05-09 08:26:47.230 Error: (NUT_UPS) failed to load 'plugin.py', Python Path used was '/config/plugins/NUT_UPS-master/:/usr/lib/python38.zip:/usr/lib/python3.8:/usr/lib/python3.8/lib-dynload:/usr/local/lib/python3.8/dist-packages:/usr/lib/python3/dist-packages:/usr/lib/python3.8/dist-packages'.
2021-05-09 08:26:47.230 Error: (Eaton 5E 850i) Module Import failed, exception: 'SyntaxError'
2021-05-09 08:26:47.230 Error: (Eaton 5E 850i) Import detail: File: /config/plugins/NUT_UPS-master/plugin.py, Line: 61, offset: 13
2021-05-09 08:26:47.230 Error: (Eaton 5E 850i) Error Line ' "output.frequency": ["UPS AC Output Frequency", "Hz", None, 10, 0]
2021-05-09 08:26:47.230 '

The section looks like:

        # key:              [device label,         unit, value, device number, used by default]
        "ups.status":       ["UPS Status",          "",  0,     1, 1],
        "ups.beeper.status":       ["UPS Beeper Status",          "",  0,     2, 0],
        "battery.charge":   ["UPS Charge",          "%", None,  3, 1],
        "battery.runtime":  ["UPS Backup Time",     "s", None,  4, 1],
        "input.voltage":    ["UPS AC Input",        "V", None,  5, 0],
        "output.voltage":    ["UPS AC Output",        "V", None,  6, 0],
        "ups.load":         ["UPS Load",            "%", None,  7, 0],
        "ups.realpower":    ["UPS Power",           "W", None,  8, 0],
        "input.frequency":  ["UPS AC Input Frequency",   "Hz", None,  9, 0]
        "output.frequency":  ["UPS AC Output Frequency",   "Hz", None,  10, 0]

Without the last line it is working fine. Have you any idea why the output frequency not working?

Thanks

@999LV
Copy link
Owner

999LV commented May 9, 2021

Check your python syntax as the error message suggests… just in what you shared I can see a comma missing…

@pczolee
Copy link
Author

pczolee commented May 9, 2021

OMG, my eyes are not the best :( , I missed the comma... Now looks good ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants