Did anybody ever get this sensor working in esphome ?
I have tried the following that was posted on github but it just returns 65535 and never changes values
File: veml6070_custom_sensor.h
#include "esphome.h"
#include "Adafruit_VEML6070.h"
class VEML6070CustomSensor : public PollingComponent, public Sensor {
public:
Adafruit_VEML6070 uv = Adafruit_VEML6070();
VEML6070CustomSensor() : PollingComponent(15000) {}
void setup() override {
Wire.begin();
uv.begin(VEML6070_1_T);
}
void update() override {
uint16_t cur_uv = uv.readUV();
ESP_LOGD("custom", "The value of sensor is: %i", cur_uv);
publish_state(cur_uv);
}
};
Espconfig:
esphome:
name: wetterstation
platform: ESP8266
board: esp01_1m
includes:
- veml6070_custom_sensor.h
libraries:
- "https://github.com/adafruit/Adafruit_VEML6070"
...
i2c:
sda: GPIO5
scl: GPIO4
...
sensor:
- platform: custom
lambda: |-
auto veml6070 = new VEML6070CustomSensor();
App.register_component(veml6070);
return {veml6070};
sensors:
name: "VEML6070 Custom Sensor"
The sensor i got is this one Sensor VEML6075 and on that page they state the library is the following “Library for sensor”
minsuke
(Minsuke)
May 3, 2020, 6:44am
2
I have same situation If you find something let me know please, have a nice day…
Using the same code you have here and it is working without problem. the only difference I have is these
board: nodemcuv2
...
i2c:
sda: GPIO4
scl: GPIO5
ronron261
(Ronron261)
April 16, 2021, 11:06am
4
Johan-Du-Preez:
veml6070_custom_sensor.h
Hi,
Any update about this sensor, VEML6075.
I also got, like you, a reading of 65535.
What I saw that in the header you mention the VEML6075, but in the code there is mention of the VEML6070.
There are library for the VEML6075, see GitHub - adafruit/Adafruit_VEML6075: Adafruit Arduino library for the VEML6075 UV Sensor
The only problem for me is that no programmer, so to change the code that it works whit that library, I don’t now where to start.
Also the difference between the VEML6070 and the VEML6075 is that the VEML6075 has three sensors.
I think that is the reason that we get 65535
greetings
Ronald
ronron261
(Ronron261)
April 19, 2021, 8:57am
5
While trying to create my own code, stumbled on this where there the needed code for the veml6075. This use the libary from SparkFun_VEML6075_Arduino_Library
opened 10:57AM - 08 May 19 UTC
Describe the problem you have/What new integration you would like
VEML6075 and VEML6070 Support. The VEML6075 is preferred as it's the successor...
Type: I2C
Type: UV
I got even the Index to show up.
greetings
Ronald