-
Notifications
You must be signed in to change notification settings - Fork 21
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
python 3.5 #2
Comments
Thanks for the issue! I don't have access to NUT+UPSs right now, but I think I have a solution for this anyway. I've published version 2.1.1 to PyPI, could you install it and let me know if it works for you? |
Python 3.5.3 (default, Sep 27 2018, 17:25:39)
[GCC 6.3.0 20170516] on linux
Type "help", "copyright", "credits" or "license" for more information.
>> from nut2 import PyNUTClient
>> client = PyNUTClient
>> client.help()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: help() missing 1 required positional argument: 'self'
>> client.list_ups()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: list_ups() missing 1 required positional argument: 'self'
From: Ryan Shipp <notifications@github.com>
Reply-To: rshipp/python-nut2 <reply@reply.github.com>
Date: Friday, April 19, 2019 at 6:49 PM
To: rshipp/python-nut2 <python-nut2@noreply.github.com>
Cc: Chip Cox <chip.cox@coxdogs.com>, Author <author@noreply.github.com>
Subject: Re: [rshipp/python-nut2] python 3.5 (#2)
Thanks for the issue! I don't have access to NUT+UPSs right now, but I think I have a solution for this anyway. I've published version 2.1.1 to PyPI, could you install it and let me know if it works for you?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#2 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AAOQAU4POLIGVBNLKGB7WLDPRJK6ZANCNFSM4HHIIXDA>.
|
Make sure you're using parentheses after the client = PyNUTClient() |
Duuuh. LOL
Thanks
From: Ryan Shipp <notifications@github.com>
Reply-To: rshipp/python-nut2 <reply@reply.github.com>
Date: Friday, April 19, 2019 at 7:49 PM
To: rshipp/python-nut2 <python-nut2@noreply.github.com>
Cc: Chip Cox <chip.cox@coxdogs.com>, Author <author@noreply.github.com>
Subject: Re: [rshipp/python-nut2] python 3.5 (#2)
Make sure you're using parentheses after the PyNUTClient to instantiate the object:
client = PyNUTClient()
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#2 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AAOQAU7WGJF7N2SCKNY27VLPRJSCZANCNFSM4HHIIXDA>.
|
Awesome, if that works I'll close this issue. Let me know if you run into anything else. :) |
I’m writing a webapp service to feed data to home assistant. Does the UPS send anytype of event that the API could respond to that tells when it a power outage of some type occurs rather than just polling it?
From: Ryan Shipp <notifications@github.com>
Reply-To: rshipp/python-nut2 <reply@reply.github.com>
Date: Friday, April 19, 2019 at 8:03 PM
To: rshipp/python-nut2 <python-nut2@noreply.github.com>
Cc: Chip Cox <chip.cox@coxdogs.com>, Author <author@noreply.github.com>
Subject: Re: [rshipp/python-nut2] python 3.5 (#2)
Awesome, if that works I'll close this issue. Let me know if you run into anything else. :)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#2 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AAOQAU7RN3XGBORODNU45QLPRJTWDANCNFSM4HHIIXDA>.
|
I'm not sure, I know you can configure NUT to alert on certain things (going on battery, low battery, etc) and take actions on a server, but I don't know if that is just polling battery.status behind the scenes or what. You'll have better luck going through the NUT docs as I'm not that familiar with anything beyond polling the UPS variables - this seems relevant https://networkupstools.org/docs/user-manual.chunked/ar01s06.html#UPS_shutdown, but I don't know what those events it's mentioning are. Maybe you can figure something out with that? |
Errors under Python3.5.3 when trying to run the example on the GIT README
Python 3.5.3 (default, Sep 27 2018, 17:25:39)
[GCC 6.3.0 20170516] on linux
Type "help", "copyright", "credits" or "license" for more information.
The text was updated successfully, but these errors were encountered: