Git Product home page Git Product logo

webnut's Introduction

webNUT

A simple web interface for NUT (Network UPS Tools) servers, built on Pyramid, Bootstrap, and python-nut2.

Setup

Rename webnut/config.example.py to webnut/config.py and set the variables in that file to reflect your NUT server configuration. Then serve webNUT as you would any Pyramid app, using pserve or through your production-ready server of choice.

Screenshots

The index lists available UPS devices, along with their description, status, and battery charge:

Index

Clicking on a UPS's name takes you to a details view that shows a quick status indicator, as well as the values of all variables set on the device:

UPS View

webnut's People

Contributors

rshipp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

webnut's Issues

SyntaxError: invalid syntax

DietPi with nut-server=2.7.4

wget https://bootstrap.pypa.io/ez_setup.py
wget https://pypi.io/packages/source/s/setuptools/setuptools-33.1.1.zip
python ez_setup.py
git clone https://github.com/rshipp/webNUT.git
cd webNUT
vim webNUT/webnut/config.py
python setup.py build
python setup.py install

then:
pserve development.ini

get some errer:
Traceback (most recent call last):
File "/usr/local/bin/pserve", line 11, in
load_entry_point('pyramid==1.9.2', 'console_scripts', 'pserve')()
File "/usr/local/lib/python2.7/dist-packages/pyramid-1.9.2-py2.7.egg/pyramid/scripts/pserve.py", line 32, in main
return command.run()
File "/usr/local/lib/python2.7/dist-packages/pyramid-1.9.2-py2.7.egg/pyramid/scripts/pserve.py", line 229, in run
app = loader.get_wsgi_app(app_name, config_vars)
File "/usr/local/lib/python2.7/dist-packages/plaster_pastedeploy-0.6-py2.7.egg/plaster_pastedeploy/init.py", line 131, in get_wsgi_app
global_conf=defaults)
File "/usr/local/lib/python2.7/dist-packages/PasteDeploy-1.5.2-py2.7.egg/paste/deploy/loadwsgi.py", line 247, in loadapp
return loadobj(APP, uri, name=name, **kw)
File "/usr/local/lib/python2.7/dist-packages/PasteDeploy-1.5.2-py2.7.egg/paste/deploy/loadwsgi.py", line 272, in loadobj
return context.create()
File "/usr/local/lib/python2.7/dist-packages/PasteDeploy-1.5.2-py2.7.egg/paste/deploy/loadwsgi.py", line 710, in create
return self.object_type.invoke(self)
File "/usr/local/lib/python2.7/dist-packages/PasteDeploy-1.5.2-py2.7.egg/paste/deploy/loadwsgi.py", line 146, in invoke
return fix_call(context.object, context.global_conf, **context.local_conf)
File "/usr/local/lib/python2.7/dist-packages/PasteDeploy-1.5.2-py2.7.egg/paste/deploy/util.py", line 55, in fix_call
val = callable(*args, **kw)
File "/usr/local/lib/python2.7/dist-packages/webNUT-0.0-py2.7.egg/webnut/init.py", line 15, in main
context='pyramid.exceptions.NotFound')
File "/usr/local/lib/python2.7/dist-packages/pyramid-1.9.2-py2.7.egg/pyramid/util.py", line 540, in wrapper
view = self.maybe_dotted(view)
File "/usr/local/lib/python2.7/dist-packages/pyramid-1.9.2-py2.7.egg/pyramid/config/init.py", line 912, in maybe_dotted
return self.name_resolver.maybe_resolve(dotted)
File "/usr/local/lib/python2.7/dist-packages/pyramid-1.9.2-py2.7.egg/pyramid/path.py", line 320, in maybe_resolve
return self._resolve(dotted, package)
File "/usr/local/lib/python2.7/dist-packages/pyramid-1.9.2-py2.7.egg/pyramid/path.py", line 327, in _resolve
return self._zope_dottedname_style(dotted, package)
File "/usr/local/lib/python2.7/dist-packages/pyramid-1.9.2-py2.7.egg/pyramid/path.py", line 382, in _zope_dottedname_style
import(used)
File "/usr/local/lib/python2.7/dist-packages/webNUT-0.0-py2.7.egg/webnut/views.py", line 6, in
import config
File "/usr/local/lib/python2.7/dist-packages/webNUT-0.0-py2.7.egg/webnut/config.py", line 6
password = removed
^
SyntaxError: invalid syntax

how can i do ?

webnut crashing with `internal server error` when receiving an `ERR` message from the nut-server

@TechaNima reached out to me with a problem using webNUT in combination with my apcupsd NUT wrapper script i wrote a while ago.

gitmachtl/various#5 (comment)

webNUT is requesting descriptions from the NUT-Server. if the server responds with a valid ERR UNKNOW-COMMAND, webNUT crashes with an internal server error.

meanwhile, i have added the GET UPSDESC <upsname> command and also the GET DESC <upsname> <varname> command.
but webNUT should not crash at any point when receiving an error message ERR ... from a NUT-Server.

best regards,
martin

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.