Not sure if I'm missing something but I can't find a way to retrieve the co2, humidity and temp data from the scd40 on domoticz.
Is there a way to send each of the data values to different idx values? Or any other tips?
Sending scd40 triple sensor to domoticz
Moderators: grovkillen, Stuntteam, TD-er
Re: Sending scd40 triple sensor to domoticz
You can do that using Rules. That feature has to be enabled in Tools/Advanced, and then you can create event handlers like this, assuming your task is named SCD40:
- You will have to fill in the <domoticz-ip>, possibly change the portnumber (8080), and fill the desired <CO2-idx>. (For some types of devices, Domoticz expects the value in nvalue instead of svalue, that is to be empirically determined)
- You will have to add similar code for Humidity and Temperature
- In the SCD40 Task the option to send all values in a single event (#All) should not be enabled! (default is off)
Code: Select all
on SCD40#CO2 do
SendToHTTP,<domoticz-ip>,8080,/json.htm?param=udevice&type=command&idx=<CO2-idx>&nvalue=0&svalue=%eventvalue1%
endon
// ditto for SCD#Humidity and SCD40#Temperature
- You will have to add similar code for Humidity and Temperature
- In the SCD40 Task the option to send all values in a single event (#All) should not be enabled! (default is off)
/Ton (PayPal.me)
Re: Sending scd40 triple sensor to domoticz
Domoticz doesn't have a sensor type for CO2, temp and hum.
However there is a type for temp/hum.
N.B. Domoticz does differentiate between "svalue" and "nvalue"
I know we are sending using the "wrong" type for the existing CO2 sensor plugins to Domoticz, so for those you need to use a "Custom" sensor type in Domoticz instead of CO2.
You can copy the temp/hum data to a dummy task and set its output type to some temp/hum type and call "taskrun" on that dummy task. This way you know the data for those is formatted correctly for Domoticz.
In the ESPEasy settings, there is only a single spot per controller for an IDX value, which makes it nearly impossible to allow a plugin to send using multiple different IDX values per task. So sending it via rules is probably the best option here.
However there is a type for temp/hum.
N.B. Domoticz does differentiate between "svalue" and "nvalue"
I know we are sending using the "wrong" type for the existing CO2 sensor plugins to Domoticz, so for those you need to use a "Custom" sensor type in Domoticz instead of CO2.
You can copy the temp/hum data to a dummy task and set its output type to some temp/hum type and call "taskrun" on that dummy task. This way you know the data for those is formatted correctly for Domoticz.
In the ESPEasy settings, there is only a single spot per controller for an IDX value, which makes it nearly impossible to allow a plugin to send using multiple different IDX values per task. So sending it via rules is probably the best option here.
Who is online
Users browsing this forum: No registered users and 27 guests