Config example
This commit is contained in:
		
							
								
								
									
										58
									
								
								config.yaml
									
									
									
									
									
								
							
							
						
						
									
										58
									
								
								config.yaml
									
									
									
									
									
								
							@@ -3,10 +3,10 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
# MQTT Broker Configuration
 | 
					# MQTT Broker Configuration
 | 
				
			||||||
mqtt:
 | 
					mqtt:
 | 
				
			||||||
  broker: "192.168.10.202"
 | 
					  broker: "IP or FQDN"
 | 
				
			||||||
  port: 1883
 | 
					  port: 1883
 | 
				
			||||||
  user: "snmp2mqtt"
 | 
					  user: "USER"
 | 
				
			||||||
  password: "snmp_2_MQTT"
 | 
					  password: "PASSWORD"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Optional: Sleep interval between SNMP polls (default: 2 seconds)
 | 
					# Optional: Sleep interval between SNMP polls (default: 2 seconds)
 | 
				
			||||||
sleep_interval: 2
 | 
					sleep_interval: 2
 | 
				
			||||||
@@ -16,67 +16,25 @@ sleep_interval: 2
 | 
				
			|||||||
devices:
 | 
					devices:
 | 
				
			||||||
  # Device name (used for MQTT topics and Home Assistant device identification)
 | 
					  # Device name (used for MQTT topics and Home Assistant device identification)
 | 
				
			||||||
  mikrotik_hex:
 | 
					  mikrotik_hex:
 | 
				
			||||||
    ip: "192.168.10.2"
 | 
					    ip: "IP"
 | 
				
			||||||
    snmp_community: "public"
 | 
					    snmp_community: "public"
 | 
				
			||||||
    oids:
 | 
					    oids:
 | 
				
			||||||
      # Starlink VPN interface (interface index 12)
 | 
					      # example interface index 1
 | 
				
			||||||
      - name: "stln_vpn_in"
 | 
					      - name: "if1_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"
 | 
					 | 
				
			||||||
        oid: ".1.3.6.1.2.1.2.2.1.10.1"
 | 
					        oid: ".1.3.6.1.2.1.2.2.1.10.1"
 | 
				
			||||||
        type: "int"
 | 
					        type: "int"
 | 
				
			||||||
        HA_device_class: "data_size"
 | 
					        HA_device_class: "data_size"
 | 
				
			||||||
        HA_platform: "sensor"
 | 
					        HA_platform: "sensor"
 | 
				
			||||||
        HA_unit: "bit"
 | 
					        HA_unit: "bit"
 | 
				
			||||||
      
 | 
					      
 | 
				
			||||||
      - name: "starlink_out"
 | 
					      - name: "if1_out"
 | 
				
			||||||
        oid: ".1.3.6.1.2.1.2.2.1.16.1"
 | 
					        oid: ".1.3.6.1.2.1.2.2.1.16.1"
 | 
				
			||||||
        type: "int"
 | 
					        type: "int"
 | 
				
			||||||
        HA_device_class: "data_size"
 | 
					        HA_device_class: "data_size"
 | 
				
			||||||
        HA_platform: "sensor"
 | 
					        HA_platform: "sensor"
 | 
				
			||||||
        HA_unit: "bit"
 | 
					        HA_unit: "bit"
 | 
				
			||||||
      
 | 
					      
 | 
				
			||||||
      - name: "starlink_status"
 | 
					      - name: "if1_status"
 | 
				
			||||||
        oid: ".1.3.6.1.2.1.2.2.1.8.1"
 | 
					        oid: ".1.3.6.1.2.1.2.2.1.8.1"
 | 
				
			||||||
        type: "bool"
 | 
					        type: "bool"
 | 
				
			||||||
        HA_device_class: "connectivity"
 | 
					        HA_device_class: "connectivity"
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user