I have a router that supports SNMP and I currently get the uptime with this code:
- platform: snmp
name: 'DDWRT1 Uptime'
host: 192.168.1.1
community: xxx
baseoid: 1.3.6.1.2.1.25.1.1.0
accept_errors: true
unit_of_measurement: 'days'
value_template: '{{((value | int) / 8640000) | round(1)}}'
scan_interval: 60
I am trying to use the following to get my external IP address and post it to a tab on the front end. I have use iReasonings MIB browser to verify that the IP address is the response and that it is just a normal format. When I ask with the following code, I get 3 garbage characters on the tab display.
- platform: snmp
name: 'DDWRT external'
host: 192.168.1.1
community: xxx
baseoid: .1.3.6.1.2.1.4.21.1.7.0.0.0.0
value_template: '{{ value }}'
scan_interval: 60
data_sets:
name: Other data sets
icon: mdi:router-wireless
view: no
entities:
- sensor.ddwrt1_uptime
- sensor.ddwrt_external
The output on screen whith the above display is b followed by an a with 2 dots above it and an 8.
Any idea what I am doing wrong?
Forgot to mention, running the lastest Hass.io update on an RPi2.