Compare commits
2 Commits
update-pah
...
v1.0.0
Author | SHA1 | Date | |
---|---|---|---|
3875f4501f
|
|||
7fec5c5049
|
58
config.yaml
58
config.yaml
@@ -3,10 +3,10 @@
|
||||
|
||||
# MQTT Broker Configuration
|
||||
mqtt:
|
||||
broker: "192.168.10.202"
|
||||
broker: "IP or FQDN"
|
||||
port: 1883
|
||||
user: "snmp2mqtt"
|
||||
password: "snmp_2_MQTT"
|
||||
user: "USER"
|
||||
password: "PASSWORD"
|
||||
|
||||
# Optional: Sleep interval between SNMP polls (default: 2 seconds)
|
||||
sleep_interval: 2
|
||||
@@ -16,67 +16,25 @@ sleep_interval: 2
|
||||
devices:
|
||||
# Device name (used for MQTT topics and Home Assistant device identification)
|
||||
mikrotik_hex:
|
||||
ip: "192.168.10.2"
|
||||
ip: "IP"
|
||||
snmp_community: "public"
|
||||
oids:
|
||||
# Starlink VPN interface (interface index 12)
|
||||
- name: "stln_vpn_in"
|
||||
oid: ".1.3.6.1.2.1.2.2.1.10.12"
|
||||
type: "int"
|
||||
HA_device_class: "data_size"
|
||||
HA_platform: "sensor"
|
||||
HA_unit: "bit"
|
||||
|
||||
- name: "stlon_vpn_out"
|
||||
oid: ".1.3.6.1.2.1.2.2.1.16.12"
|
||||
type: "int"
|
||||
HA_device_class: "data_size"
|
||||
HA_platform: "sensor"
|
||||
HA_unit: "bit"
|
||||
|
||||
- name: "stln_vpn_status"
|
||||
oid: ".1.3.6.1.2.1.2.2.1.8.12"
|
||||
type: "bool"
|
||||
HA_device_class: "connectivity"
|
||||
HA_platform: "binary_sensor"
|
||||
|
||||
# LAN Bridge interface (interface index 6)
|
||||
- name: "lan_bridge_in"
|
||||
oid: ".1.3.6.1.2.1.2.2.1.10.6"
|
||||
type: "int"
|
||||
HA_device_class: "data_size"
|
||||
HA_platform: "sensor"
|
||||
HA_unit: "bit"
|
||||
|
||||
- name: "lan_bridge_out"
|
||||
oid: ".1.3.6.1.2.1.2.2.1.16.6"
|
||||
type: "int"
|
||||
HA_device_class: "data_size"
|
||||
HA_platform: "sensor"
|
||||
HA_unit: "bit"
|
||||
|
||||
- name: "lan_bridge_status"
|
||||
oid: ".1.3.6.1.2.1.2.2.1.8.6"
|
||||
type: "bool"
|
||||
HA_device_class: "connectivity"
|
||||
HA_platform: "binary_sensor"
|
||||
|
||||
# Starlink interface (interface index 1)
|
||||
- name: "starlink_in"
|
||||
# example interface index 1
|
||||
- name: "if1_in"
|
||||
oid: ".1.3.6.1.2.1.2.2.1.10.1"
|
||||
type: "int"
|
||||
HA_device_class: "data_size"
|
||||
HA_platform: "sensor"
|
||||
HA_unit: "bit"
|
||||
|
||||
- name: "starlink_out"
|
||||
- name: "if1_out"
|
||||
oid: ".1.3.6.1.2.1.2.2.1.16.1"
|
||||
type: "int"
|
||||
HA_device_class: "data_size"
|
||||
HA_platform: "sensor"
|
||||
HA_unit: "bit"
|
||||
|
||||
- name: "starlink_status"
|
||||
- name: "if1_status"
|
||||
oid: ".1.3.6.1.2.1.2.2.1.8.1"
|
||||
type: "bool"
|
||||
HA_device_class: "connectivity"
|
||||
|
@@ -19,7 +19,7 @@ import time
|
||||
|
||||
logging.basicConfig(
|
||||
format='(%(levelname)s) [%(threadName)s] %(message)s',
|
||||
level=logging.DEBUG
|
||||
level=logging.INFO
|
||||
)
|
||||
|
||||
# Global shutdown flag
|
||||
|
Reference in New Issue
Block a user