/hass-component-snmp-device

Printer-agnostic SNMP discovery and polling

Primary LanguagePython

hass-component-snmp-device

hacs_badge

Add device-related sensors for SNMP-supporting devices with ease.

Installation

  1. Using the tool of choice open the directory (folder) for your HA configuration (where you find configuration.yaml).
  2. If you do not have a custom_components directory (folder) there, you need to create it.
  3. In the custom_components directory (folder) create a new folder called snmp_device.
  4. Download all the files from the custom_components/snmp_device/ directory (folder) in this repository.
  5. Place the files you downloaded in the new directory (folder) you created.

GUI configuration (with autodiscovery!)

To add devices via HomeAssistant's user interface, navigate to Integrations submenu of Settings, and search for SNMP Device. Follow the wizard to set up your device.

YAML configuration via platform

sensor:
- platform: snmp_device
  # Prefix name for added sensors (optional)
  name: Test Printer
  # Device host (required)
  host: test-printer.lan
  # Device type (required, available: 'printer', 'computer')
  type: 'printer'
  # SNMP port (optional, default: 161)
  port: 161
  # SNMP community (optional, default: 'public')
  community: public
  # SNMP version (optional, default: '2c')
  version: '1'
  # Timeout to get values (optional, default: '1')
  timeout: 1

YAML configuration via domain

snmp_device:
  # Prefix name for added sensors (optional)
  name: Test Printer
  # Device host (required)
  host: test-printer.lan
  # Device type (required, available: 'printer', 'computer')
  type: 'printer'
  # SNMP port (optional, default: 161)
  port: 161
  # SNMP community (optional, default: 'public')
  community: public
  # SNMP version (optional, default: '2c')
  version: '1'
  # Timeout to get values (optional, default: '1')
  timeout: 1

Supported device types

  • printer: supports the following sensors: Status, Mileage, Paper Inputs (a separate sensor for each), and Supplies (a separate sensor for each)
  • computer: supports the following sensors: Status

Roadmap

  • Port more options to configure SNMP requests
  • Better offline printer handling