Forum Discussion
Hi Jeff
I was wondering if you can assist me in configuring/ extending SNMPv3 on my raspberry pi to get temperature readings from a DHT22 sensor.
- I have written a python program / script that returns temperature and humidity as follows:
import sys
import Adafruit_DHT
sensor = 22
pin = 4
humidity, temprature =Adafruit_DHT.read_retry(sensor, pin)
if humidity is not None and temprature is not None:
print ('{0:0f}* {1:0.1f}%'.format(temperature, humidity ))
else
print ('Failed to get reading')
sys.exit()
- in my snmpd.conf file I have put the line below
extend-sh test1 /usr/bin/python3 /home/pi/Adafruit_Python_DHT/examples/Final_AdafruitDHT.py
I tried running snmpwalk but I don't get an OID for the temp and humidity.
Related Content
- 3 months ago
- 2 years ago
- 26 days ago