Tasmota SGP40 wrong value received in Domoticz

Everything about esp8266 and more.

Moderator: leecollings

Post Reply
ChrisH
Posts: 4
Joined: Saturday 19 May 2018 20:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Tasmota SGP40 wrong value received in Domoticz

Post by ChrisH »

I recently a custom sensor based on an ESP32S2, with connected to it via I2C a BME280 temperature/humidity/pressure sensor and a SGP40 VOC sensor. On a separate pin, I've got an Ikea VINDRIKTNING PM2.5 sensor connected.

With a custom Tasmota firmware (required for the VINDRIKTNING and SGP40), the ESP32 operates as expected, and I can see sensor values nicely:

Code: Select all

BME280 Temperature	21.1 °C
BME280 Humidity		45.6 %
BME280 Dew point	8.9 °C
BME280 Pressure		1003.3 hPa
VINDRIKTNING PM 2.5 µm	13 µg/m³
SGP40 Raw		30370
SGP40 Air quality	102
SGP40 Abs Humidity	8.5053 g/m3
To get everything into Domoticz, I've created 3 dummy sensors in Domoticz (one for Temperature + Humidity + Barometric pressure for the BME280, a custom sensor for PM2.5, and Air Quality for the SGP40) and entered the corresponding Idx numbers in Tasmota:

Code: Select all

Sensor idx 1 Temp   		0
Sensor idx 2 Temp,Hum		0
Sensor idx 3 Temp,Hum,Baro	249
Sensor idx 4 Power,Energy	0
Sensor idx 5 Illuminance	0
Sensor idx 6 Count/PM1		0
Sensor idx 7 Voltage/PM2.5	248
Sensor idx 8 Current/PM10	0
Sensor idx 9 AirQuality		246
Sensor idx 10 P1SmartMeter	0
Sensor idx 11 Shutter		0
Update timer (0)		0
This allows me to receive data neatly in Domoticz. Temp + Humidity + Baro and PM2.5 are displayed correctly, however, AirQuality is incorrect. I only receive the SGP40 RAW data for it, not the corrected SGP40 Air Quality, which is sensible value.

When I look in the console, I see the correct data in the string:

Code: Select all

09:18:22.599 MQT: tele/tasmota_E07EC6/SENSOR = [...]"SGP40":{"Raw":30380,"AirQuality":102,"aHumidity":8.4549},[...]
How can I get the AirQuality value instead of the Raw value?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest