michalsternadel/zbx-esp-env

Questions about the environment with ESP32

Closed this issue · 4 comments

Good night, I'm using zabbix in version 5.0 with Raspberry PI and DHT22, the reading is already working for raspberry but I would like to know if it would be possible to use this same template created for ESP32?

Hello,

if you configure your Raspberry Pi to handle temperatures over http using the scheme:
For temperature sensor 0: http://RPIIPADDRESSS/t/0
For humidity sensor 9: http://RPIIPADDRESS/h/0
returning a floating point / integer value then yes but I think you need to add the parameter value manually.

If you additionally configure http://RPIIPADDRESS/discovery to return JSON data, e.x:

{
  "data":[
      {"{#NAME}":"City", "{#STATE}":"0", "{#INDEX}":"9", "{#AVERAGE_L}":"-20.00", "{#AVERAGE_H}":"35.00", "{#HIGH_L}":"-40.00", "{#HIGH_H}":"40.00", "{#DISASTER_L}":"-50.00", "{#DISASTER_H}":"60.00"},
      {"{#NAME}":"Sensor D0", "{#STATE}":"0", "{#INDEX}":"0", "{#AVERAGE_L}":"-0.50", "{#AVERAGE_H}":"30.00", "{#HIGH_L}":"-10.00", "{#HIGH_H}":"35.00", "{#DISASTER_L}":"-20.00", "{#DISASTER_H}":"45.00"},
      {"{#NAME}":"Ambient", "{#STATE}":"1", "{#INDEX}":"1", "{#AVERAGE_L}":"-0.50", "{#AVERAGE_H}":"30.50", "{#HIGH_L}":"-1.50", "{#HIGH_H}":"35.50", "{#DISASTER_L}":"-2.50", "{#DISASTER_H}":"40.50"},
      {"{#NAME}":"Servers inlet", "{#STATE}":"1", "{#INDEX}":"2", "{#AVERAGE_L}":"-0.50", "{#AVERAGE_H}":"31.50", "{#HIGH_L}":"-1.50", "{#HIGH_H}":"36.50", "{#DISASTER_L}":"-2.50", "{#DISASTER_H}":"41.50"},
      {"{#NAME}":"Servers outlet", "{#STATE}":"1", "{#INDEX}":"3", "{#AVERAGE_L}":"-0.50", "{#AVERAGE_H}":"45.50", "{#HIGH_L}":"-1.50", "{#HIGH_H}":"50.50", "{#DISASTER_L}":"-2.50", "{#DISASTER_H}":"55.50"},
      {"{#NAME}":"Outside", "{#STATE}":"1", "{#INDEX}":"4", "{#AVERAGE_L}":"-20.50", "{#AVERAGE_H}":"40.50", "{#HIGH_L}":"-30.50", "{#HIGH_H}":"45.50", "{#DISASTER_L}":"-40.50", "{#DISASTER_H}":"55.50"},
      {"{#NAME}":"Hall", "{#STATE}":"1", "{#INDEX}":"5", "{#AVERAGE_L}":"-0.50", "{#AVERAGE_H}":"33.50", "{#HIGH_L}":"-1.50", "{#HIGH_H}":"35.50", "{#DISASTER_L}":"-2.50", "{#DISASTER_H}":"40.50"},
      {"{#NAME}":"Air conditioner outlet", "{#STATE}":"1", "{#INDEX}":"6", "{#AVERAGE_L}":"-0.50", "{#AVERAGE_H}":"20.50", "{#HIGH_L}":"-1.50", "{#HIGH_H}":"22.50", "{#DISASTER_L}":"-2.50", "{#DISASTER_H}":"27.50"},
      {"{#NAME}":"Sensor D7", "{#STATE}":"0", "{#INDEX}":"7", "{#AVERAGE_L}":"-0.50", "{#AVERAGE_H}":"30.50", "{#HIGH_L}":"-1.50", "{#HIGH_H}":"35.50", "{#DISASTER_L}":"-2.50", "{#DISASTER_H}":"40.50"},
      {"{#NAME}":"Sensor D8", "{#STATE}":"0", "{#INDEX}":"8", "{#AVERAGE_L}":"-0.50", "{#AVERAGE_H}":"30.50", "{#HIGH_L}":"-1.50", "{#HIGH_H}":"35.50", "{#DISASTER_L}":"-2.50", "{#DISASTER_H}":"40.50"}
    ]
  }

then I think it is enough to auto-detect sensors (#STATE = 0 meens disabled).

Thank you. I will do a test first by importing the template in zabbix with esp32, if it works, I will do the test with the raspberry

Good Morning
After adding the host along with the template, I monitored the recent data but the data is not appearing in zabbix.
When accessing via IP, everything is ok the temperature and humidity data, but in zabbix it is not receiving the sensor data. Any details that might have occurred?
My zabbix is 6.0 on Raspberry pi 3

I managed to do the discovery procedure and zabbix started to receive the data

thanks