Sensirion / arduino-ble-gadget

Create your own Do-It-Yourself BLE enabled sensor gadget on the ESP32 platform.
BSD 3-Clause "New" or "Revised" License
63 stars 20 forks source link

RAK AirQuality Node #26

Closed ckuehnel closed 1 year ago

ckuehnel commented 1 year ago

Hi dev team I build an air quality node base in RAKWireless Wisblock modules. The serial output is as follows: RAK_Output.pdf My program is based on your library examples. Screenshot_20221119_183151 Due to the use of SGP40, I have no CO2 value but a VOC index. I used the T_RH_CO2_ALT datatype and hoped that ALT could be used for dimensionless values. But this was not possible. The screenshot shows the mismatch between CO2 in ppm and my index value. What can I do in this case? The next issue, battery voltage, is on your list already. BR Claus

psachs commented 1 year ago

You have to chose the appropriate data type so that MyAmbience knows what sensor signals it can expects. Please find below the code you need to change: This data type expects: vocIndex in ppm (as float) humidity in percent RH (as float) temperature in degree Celsius (as float)

DataProvider provider(lib, DataType::T_RH_VOC);

provider.writeValueToCurrentSample(vocIndex), Unit::VOC);
provider.writeValueToCurrentSample(humidity, Unit::RH);
provider.writeValueToCurrentSample(temperature, Unit::T);

Please let me know if you need more help

ckuehnel commented 1 year ago

I understand,  but VOC Index is dimensionless 0 to 500.I believe what you mean is eCO2 in ppm. Dr. Claus Kühnel - Talstr. 13b - CH-8852 AltendorfMobile +41-76-3960801 -------- Ursprüngliche Nachricht --------Von: Pascal Sachs @.> Datum: 28.11.22 16:47 (GMT+01:00) An: Sensirion/arduino-ble-gadget @.> Cc: Claus Kühnel @.>, Author @.> Betreff: Re: [Sensirion/arduino-ble-gadget] RAK AirQuality Node (Issue #26) You have to chose the appropriate data type so that MyAmbience knows what sensor signals it can expects. Please find below the code you need to change: This data type expects: vocIndex in ppm (as float) humidity in percent RH (as float) temperature in degree Celsius (as float) DataProvider provider(lib, DataType::T_RH_VOC);

provider.writeValueToCurrentSample(vocIndex), Unit::VOC); provider.writeValueToCurrentSample(humidity, Unit::RH); provider.writeValueToCurrentSample(temperature, Unit::T); Please let me know if you need more help

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

psachs commented 1 year ago

Sorry about the confusion. Of course I meant VOC Index as unit less value between 0-500. Seems my brain was not fully functional when I answered you 😉

ckuehnel commented 1 year ago

And how can I handle such a value?Dr. Claus Kühnel - Talstr. 13b - CH-8852 AltendorfMobile +41-76-3960801 -------- Ursprüngliche Nachricht --------Von: Pascal Sachs @.> Datum: 28.11.22 20:27 (GMT+01:00) An: Sensirion/arduino-ble-gadget @.> Cc: Claus Kühnel @.>, Author @.> Betreff: Re: [Sensirion/arduino-ble-gadget] RAK AirQuality Node (Issue #26)

Sorry about the confusion. Of course I meant VOC Index as unit less value between 0-500.

Seems my brain was not fully functional when I answered you 😉

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

psachs commented 1 year ago

Hi

the VOC Index is a unit less value where 100 is an average and higher index references higher VOC levels. The VOC Index should mainly be used to detect events.

Please find detailed information here: https://sensirion.com/media/documents/02232963/6294E043/Info_Note_VOC_Index.pdf

ckuehnel commented 1 year ago

I know this all and use the Index.The question was how to handle VOC in the MyAmbience app.Dr. Claus Kühnel - Talstr. 13b - CH-8852 AltendorfMobile +41-76-3960801 -------- Ursprüngliche Nachricht --------Von: Pascal Sachs @.> Datum: 07.12.22 16:48 (GMT+01:00) An: Sensirion/arduino-ble-gadget @.> Cc: Claus Kühnel @.>, Author @.> Betreff: Re: [Sensirion/arduino-ble-gadget] RAK AirQuality Node (Issue #26) Hi the VOC Index is a unit less value where 100 is an average and higher index references higher VOC levels. The VOC Index should mainly be used to detect events. Please find detailed information here: https://sensirion.com/media/documents/02232963/6294E043/Info_Note_VOC_Index.pdf

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

ckuehnel commented 1 year ago

As addition to my mail yesterday here is a screenshot.I used the CO2 slot to visualize iVOC. I know that not correct, but I did not find a slot to  visualize a number w/o a unit. A slot for battery voltage is missed too.BR Claus Dr. Claus Kühnel - Talstr. 13b - CH-8852 AltendorfMobile +41-76-3960801 -------- Ursprüngliche Nachricht --------Von: Pascal Sachs @.> Datum: 07.12.22 16:48 (GMT+01:00) An: Sensirion/arduino-ble-gadget @.> Cc: Claus Kühnel @.>, Author @.> Betreff: Re: [Sensirion/arduino-ble-gadget] RAK AirQuality Node (Issue #26) Hi the VOC Index is a unit less value where 100 is an average and higher index references higher VOC levels. The VOC Index should mainly be used to detect events. Please find detailed information here: https://sensirion.com/media/documents/02232963/6294E043/Info_Note_VOC_Index.pdf

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

psachs commented 1 year ago

Please check my previous respond. You have to send the VOC index (0-500) using the correct sample type. I accidentally added a unit there. It is of course a unit less index and is also shown as such if you initialize the data provider with the correct sample type. If you send the VOC index using the CO2 example it will show up as CO2.

DataProvider provider(lib, DataType::T_RH_VOC);

The battery level interface is not released yet as we still have to fully support it in MyAmbience. This will be an interface to send battery in percentage and not in voltage. You can however already use this feature if you take the library from the master branch. The MyAmbience release will take us until end of February, beginning of March

ckuehnel commented 1 year ago

Now it works as expected. Thanks for the support. Looking forward to battery support in March. If you are interested, see my blog post https://ckarduino.wordpress.com/2023/01/16/air-quality-visualization/. BR Claus

Am 28.11.2022 16:47:06 schrieb Pascal Sachs @.>: You have to chose the appropriate data type so that MyAmbience knows what sensor signals it can expects. Please find below the code you need to change: This data type expects: vocIndex in ppm (as float) humidity in percent RH (as float) temperature in degree Celsius (as float) DataProvider provider(lib, DataType::T_RH_VOC); provider.writeValueToCurrentSample(vocIndex), Unit::VOC); provider.writeValueToCurrentSample(humidity, Unit::RH); provider.writeValueToCurrentSample(temperature, Unit::T); Please let me know if you need more help — Reply to this email directly, view it on GitHub [https://github.com/Sensirion/arduino-ble-gadget/issues/26#issuecomment-1329326668], or unsubscribe [https://github.com/notifications/unsubscribe-auth/AABPZTH6HV3VMJ3RMDSM55LWKTHXPANCNFSM6AAAAAASFNNPEI]. You are receiving this because you authored the thread.Message ID: @.> [8341a3e8-2799-41fa-8ecf-e6bd0ba87eca]

psachs commented 1 year ago

thanks, good to hear that you got things working