GithubHelp home page GithubHelp logo

mwittig / pimatic-nut Goto Github PK

View Code? Open in Web Editor NEW

This project forked from skarcha/pimatic-nut

0.0 2.0 0.0 8 KB

Provides NUT (Network UPS Tools) info to Pimatic

License: MIT License

CoffeeScript 100.00%

pimatic-nut's Introduction

pimatic-nut

A pimatic plugin for displaying info from a NUT (Network UPS Tools) server.

Supported values:

There are four predefined values:

  • Status of the UPS: "status"
  • Input Voltage: "inputVoltage"
  • Charge of the battery: "batteryCharge"
  • Load supported by the UPS: "load"

But you can define your own, using a variable name returned by de NUT server. In that case, the attribute should be defined using this params:

  • Attribute name: "name"
  • Variable name: "var"
  • Type of the attribute: "type"
  • Unit: "unit"
  • Acronym: "acronym"
  • Discrete: "discrete"

NUT variables

If you want to define your own attribute using a NUT variable, you should do this to get the list of available variables for your UPS:

$ echo "LIST VAR myups" | nc localhost 3493
BEGIN LIST VAR myups
VAR misai battery.charge "100"
VAR misai battery.voltage "13.50"
VAR misai battery.voltage.high "13.00"
VAR misai battery.voltage.low "10.40"
VAR misai battery.voltage.nominal "12.0"
VAR misai device.type "ups"
VAR misai driver.name "blazer_usb"
VAR misai driver.parameter.pollinterval "2"
VAR misai driver.parameter.port "auto"
VAR misai driver.version "2.7.1"
VAR misai driver.version.internal "0.10"
VAR misai input.current.nominal "1.0"
VAR misai input.frequency "50.1"
VAR misai input.frequency.nominal "50"
VAR misai input.voltage "212.6"
VAR misai input.voltage.fault "212.2"
VAR misai input.voltage.nominal "230"
VAR misai output.voltage "212.6"
VAR misai ups.beeper.status "enabled"
VAR misai ups.delay.shutdown "30"
VAR misai ups.delay.start "180"
VAR misai ups.load "5"
VAR misai ups.productid "5161"
VAR misai ups.status "OL"
VAR misai ups.type "offline / line interactive"
VAR misai ups.vendorid "0665"
END LIST VAR myups

Configuration

Add this to your config.json:

{
    "plugin": "nut"
}

Examples:

{
    "class": "NutSensor",
    "id": "nutsensor1",
    "name": "UPS 1",
    "nuthost": "localhost",
    "nutport": 3493,
    "upsid": "myups1",
    "attributes": [
        {
          "name": "status"
        },
        {
          "name": "inputVoltage",
          "interval": 30000
        },
        {
          "name": "batteryCharge"
        },
        {
          "name": "load"
        },
        {
          "name": "batteryVoltage",
          "var": "battery.voltage",
          "type": "number",
          "unit": "V",
          "acronym": "B.Volt",
        }
    ]
}
{
    "class": "NutSensor",
    "id": "nutsensor 2",
    "name": "UPS 2",
    "nuthost": "localhost",
    "nutport": 3493,
    "upsid": "myups2",
    "attributes": [
        {
          "name": "status"
        },
        {
          "name": "inputVoltage"
        }
    ]
}

pimatic-nut's People

Contributors

mwittig avatar skarcha avatar

Watchers

 avatar  avatar

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.