Giter VIP home page Giter VIP logo

pimatic-snmp's Introduction

pimatic-snmp

npm version dependencies status Build Status

A pimatic plugin to make snmp get request. The Oid can be found in the device mib file provided by the manufacture or using Oidview.

Plugin Configuration

{ "plugin": "snmp" }

The plugin has the following configuration properties:

Property Default Type Description
debug false Boolean Debug mode. Writes debug messages to the pimatic log, if set to true

Device Configuration

The plugin supports auto discover of snmp devices on your connected networks. As default the community "public" and the oid '.1.3.6.1.2.1.1.5.0' for sysname property are used.

The oids must be provied using this format: .x.xx.x.x.x.xxx - for example: .1.2.840.10006.300.43.1.3.0

The following device can also be created manually:

SnmpSensor

The SnmpSensor displays the output of your specified command to the gui.

{ "id": "snmp1", "class": "SnmpSensor", "name": "Snmp Sensor", "host": "", "oids": [ { "label": "SysName", "oid": ".1.3.6.1.2.1.1.5.0" } ] }

Property Default Type Description
host - String Hostname or IP address of target device
port 161 Number Port used by snmp
oids - Array An array of oid objects.See device configuration schema for details
community "public" String snmp community for read and/or write access
interval 60000 Number The time interval in milliseconds at which the oid is queried
attributes - Object Attributes are automatical saved to config for later support for rules

If you already created a SnmpSensor device and you change the oids later, all attributes from this device need to be deleted manually, before the new attributes are shown.

SnmpPresenceSensor

The SnmpSensor displays the output of your specified command to the gui.

{ "id": "snmp2", "class": "SnmpPresenceSensor", "name": "Snmp Presence Sensor", "host": "", "oids": [ { "label": "State", "oid": ".1.3.6.1.2.1.1.5.0" } ] }

Property Default Type Description
host - String Hostname or IP address of target device
port 161 Number Port used by snmp
oids - Array An array of oid objects. Only one object is supported!
community "public" String snmp community for read and/or write access
interval 60000 Number The time interval in milliseconds at which the oid is queried

Only one oid object is supported at the moment!

ToDo

  • Add automatic clearing of attributes if oids were changed
  • Add set funtion for rule usage
  • Add support for multiple presence sensors in one device

History

See Release History.

License

Copyright (c) thost96 and contributors. All rights reserved.

License: GPL-2.0.

pimatic-snmp's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar thost96 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

mwittig

pimatic-snmp's Issues

Grandstream OID not working

Hi... The following snmp call for firmware status works with my Grandstream IP phones for smnp v 1, 2c and 3:

$ snmpwalk -v 2c -a SHA -x AES -A test1234 -X test1234 -u admin -c public 192.168.1.10 iso.3.6.1.4.1.42397.1.3.3.4.0.0

-->
iso.3.6.1.4.1.42397.1.3.3.4.0.0 = STRING: "1.0.9.127"

but in PiMatic plugin, the same oid results in "No Such Object"

Regards

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.