Page 1 of 1

Add new sensor (Ambient Light Sensor - VEML6030)

Posted: 24 Apr 2024, 14:27
by knighToFdemonS
Can you add support for the VEML6030 Light Sensor?
You can find the library here: https://github.com/sparkfun/SparkFun_Am ... no_Library
(the lowpower/sleep-mode is not important)

I know its not as easy as the Adafruit-Sensor.

Thank you in advance!

Re: Add new sensor (Ambient Light Sensor - VEML6030)

Posted: 24 Apr 2024, 14:52
by Ath
What's special about this sensor that you can't get from either the already supported VEML6040, VEML6070 or VEML6075 ?

Re: Add new sensor (Ambient Light Sensor - VEML6030)

Posted: 25 Apr 2024, 10:33
by knighToFdemonS
Thank you, ive added the plugins to my build but after trying these sensor-configs, i noticed they only have address 0x10/0x11 available (i'd have to bridge the pins to change the address to 0x10, default is 0x48).
And 2nd, one is a sensor for rgb-color and the other one is a UVA/UVB sensor...but my sensor is a luxmeter. they all return different values, so i guess i cannot use any of the suggested sensors.

Re: Add new sensor (Ambient Light Sensor - VEML6030)

Posted: 25 Apr 2024, 11:04
by Ath
Ah, I got the impression you could calculate the lux from available values, but that's not the case.

I've ordered a VEML7700, that appears to be compatible in lux range with the VEML6030 but is quite a bit cheaper :?, and have to check specs if they are also (fully) software-compatible.
Any reason for using a VEML6030 over a VEML7700? (At quick glance the specs seem quite compatible)

Don't understand what you are trying to say about I2C addresses, as that requirement is determined by the sensor, not by the driver, and the plugin usually supports what is available on the sensor side.

Re: Add new sensor (Ambient Light Sensor - VEML6030)

Posted: 25 Apr 2024, 11:15
by knighToFdemonS
Looks compatible, yeah. Just raw ambient light and lux.
No particular reason, just grabbed the first lux-sensor on a breakout board (by sparkfun) while i was ordering other stuff. Yes, i should have done more research in advance.

sorry, i was just saying that the default-address was not available from any of the other sensor-plugins.

(im trying to create a new sensor and do it myself :? but ive just managed to create my own build, so dont bank on me)

thank you for your help!

Re: Add new sensor (Ambient Light Sensor - VEML6030)

Posted: 25 Apr 2024, 22:55
by Ath
We already have 3 Light/Lux sensors supported, P010 - BH1750, P015 - TSL2561 and P074 - TSL2591. Only P015 has RTD documentation available, and P010 has the old Wiki docs available.
They don't have a max. lux range comparable to the VEML6030/VEML7700 but are fine sensors, and are available in nearly all ESPEasy builds.

Re: Add new sensor (Ambient Light Sensor - VEML6030)

Posted: 13 May 2024, 11:44
by knighToFdemonS
Thank you for your help. Ive ordered and switched in the TSL2591, works out of the box. Ive taken a deeper dive into the lux-calculation and noticed some flaws with this sensor.
So if I could. i'd rather still use the VEML6030/VEML7700, if you can manage to add them. Thank you for all this help so far!! Really appreciate all the helps and developement you guys are doing. I will show my whole project when its kindof done, none of would be possible without the flexibility of ESPEasy <3

Re: Add new sensor (Ambient Light Sensor - VEML6030)

Posted: 13 May 2024, 12:04
by TD-er
What kind of flaws?
Is it something we can work around in software?

For some sensors I added some "overdrive" mode where I detect 'clipping' of the IR channel and then just assume the same ratio as before the clipping and then extend the calculations for high Lux values like today.
Today it is > 120'000 Lux where some sensors start clipping before or around 65k.

You can also add some cheap ND filter in front of the sensor.
Those typically are sold with an "attenuation" or "darkening" factor on them like 2x.
This means you simply need to multiply the measured values in the formula field with this factor (e.g. %value%*2 for 2x ND filter)

Re: Add new sensor (Ambient Light Sensor - VEML6030)

Posted: 14 May 2024, 20:04
by knighToFdemonS
There seems to be some discrepancies in the library from some years ago and problems with max- and min-range producing negative values (so far ive not encountered that).
See these threads for references:
https://github.com/adafruit/Adafruit_TS ... /issues/14
https://forums.adafruit.com/viewtopic.p ... c&start=15
https://github.com/adafruit/Adafruit_Ci ... 1/issues/7
So switching to a better model might be not a bad idea for reliable measurements (i want to calculate the exact μmol/m² from lux), so i dont want to add a filter and rather have clipping values but precise measurements in the lower ends.
No worries, if implementing a whole new library for that is too much, then i will try to look into it myself as soon as I can. The TSL2591 works good enough so far and thanks again for the soil moisture sensors!
But iam glad to test stuff if somebody wants to try without getting the hardware.

Re: Add new sensor (Ambient Light Sensor - VEML6030)

Posted: 18 May 2024, 17:04
by Ath
@knighToFdemonS I've created Pull Request #5055 to add support for VEML6030 and VEML7700. I've tested locally using a VEML7700, but don't have a VEML6030 available, so if you have one, please (also) test using that sensor.
A build is running from this GH Actions run. Please report your findings here or in the PR.