Giter Club home page Giter Club logo

esphome-customisations's Introduction

ESPHome customisations

  • mlx90614 - infrared thermometer providing object and ambient temperature.
  • veml6075 - uv light sensor (source code and sample configuration collated from esphome/feature-requests#217).
  • vl6180x - time of flight distance ranging sensor.

esphome-customisations's People

Contributors

exxamalte avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

esphome-customisations's Issues

vl6180x missing Adafruit_I2CDevice.h

Hi,
the vl6180x is not working. I get this on compile:

`
In file included from .piolibdeps/klimaanlage/Adafruit_VL6180X/Adafruit_VL6180X.cpp:29:
.piolibdeps/klimaanlage/Adafruit_VL6180X/Adafruit_VL6180X.h:25:10: fatal error: Adafruit_I2CDevice.h: No such file or directory



25 | #include <Adafruit_I2CDevice.h>
| ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
*** [.pioenvs/klimaanlage/lib1a8/Adafruit_VL6180X/Adafruit_VL6180X.cpp.o] Error 1
`

VEML6075 sensor: sensor.h:14:19: error: 'TAG' was not declared in this scope

When using just the VEML6075 custom code on its own, compiling the code fails with the following error:

In file included from src/esphome/components/sensor/sensor.h:3:0,
                 from src/esphome/core/application.h:15,
                 from src/esphome/components/api/api_connection.h:4,
                 from src/esphome.h:2,
                 from src/main.cpp:3:
src/veml6075_sensor.h: In member function 'virtual void VEML6075Sensor::setup()':
src/esphome/components/sensor/sensor.h:14:19: error: 'TAG' was not declared in this scope
     ESP_LOGCONFIG(TAG, "%s%s '%s'", prefix, LOG_STR_LITERAL(type), (obj)->get_name().c_str()); \
                   ^
src/esphome/core/log.h:97:45: note: in definition of macro 'esph_log_config'
   esp_log_printf_(ESPHOME_LOG_LEVEL_CONFIG, tag, __LINE__, ESPHOME_LOG_FORMAT(format), ##__VA_ARGS__)
                                             ^
src/esphome/components/sensor/sensor.h:14:5: note: in expansion of macro 'ESP_LOGCONFIG'
     ESP_LOGCONFIG(TAG, "%s%s '%s'", prefix, LOG_STR_LITERAL(type), (obj)->get_name().c_str()); \
     ^
src/veml6075_sensor.h:21:7: note: in expansion of macro 'LOG_SENSOR'
       LOG_SENSOR("  ", "UVA", this->uva_sensor);
       ^
src/esphome/components/sensor/sensor.h:14:19: error: 'TAG' was not declared in this scope
     ESP_LOGCONFIG(TAG, "%s%s '%s'", prefix, LOG_STR_LITERAL(type), (obj)->get_name().c_str()); \
                   ^
src/esphome/core/log.h:97:45: note: in definition of macro 'esph_log_config'
   esp_log_printf_(ESPHOME_LOG_LEVEL_CONFIG, tag, __LINE__, ESPHOME_LOG_FORMAT(format), ##__VA_ARGS__)
                                             ^
src/esphome/components/sensor/sensor.h:14:5: note: in expansion of macro 'ESP_LOGCONFIG'
     ESP_LOGCONFIG(TAG, "%s%s '%s'", prefix, LOG_STR_LITERAL(type), (obj)->get_name().c_str()); \
     ^
src/veml6075_sensor.h:22:7: note: in expansion of macro 'LOG_SENSOR'
       LOG_SENSOR("  ", "UVB", this->uvb_sensor);
       ^
src/esphome/components/sensor/sensor.h:14:19: error: 'TAG' was not declared in this scope
     ESP_LOGCONFIG(TAG, "%s%s '%s'", prefix, LOG_STR_LITERAL(type), (obj)->get_name().c_str()); \
                   ^
src/esphome/core/log.h:97:45: note: in definition of macro 'esph_log_config'
   esp_log_printf_(ESPHOME_LOG_LEVEL_CONFIG, tag, __LINE__, ESPHOME_LOG_FORMAT(format), ##__VA_ARGS__)
                                             ^
src/esphome/components/sensor/sensor.h:14:5: note: in expansion of macro 'ESP_LOGCONFIG'
     ESP_LOGCONFIG(TAG, "%s%s '%s'", prefix, LOG_STR_LITERAL(type), (obj)->get_name().c_str()); \
     ^
src/veml6075_sensor.h:23:7: note: in expansion of macro 'LOG_SENSOR'
       LOG_SENSOR("  ", "UVI", this->uvi_sensor);
       ^
Compiling .pioenvs/esp_weather_station/lib0eb/WiFi/WiFiSTA.cpp.o
*** [.pioenvs/esp_weather_station/src/main.cpp.o] Error 1

The reason for this is that the component itself does not define TAG due to conflicts with other custom components. However, when used on its own, the TAG definition is missing.

fatal error: Adafruit_I2CDevice.h: No such file or directory

Hi,
I tried to follow your instructions, but something wrong happened. it shows "Adafruit_I2CDevice.h: No such file or directory" It has been a long since I have been stuck in. Can you help to tackle it? I'm running the ESPHome version(2021.12.4)
image

Changing emissivity, considering Voltage compensation?

Hi
The default emissivity of the MLX90614 is 1. https://www.melexis.com/-/media/files/documents/datasheets/mlx90614-datasheet-melexis.pdf
How to consider this factor in the code or other ways when measuring different stuff? In my case, the leaf(the emissivity is about 0.95). In the datasheet(page 37), the voltage is also affecting the object and sensor reading. How to deal with this? Also, when I tested the sensor, I found the distance affected the reading(all FOV is covered), any solution to how to improve this?

shows the maximum temperature +1037°C

Updated to the latest version, sensor readings are the maximum possible value...

Log:
[20:51:35][W][mlx90614:031]: Ambient temperature out of range: 1037.549927
[20:51:35][W][mlx90614:040]: Object temperature out of range: 1037.549927

Custom components are eventually being depreciated

Custom components are depreciated and will eventually in the distant future be gone. Any way you could make the vl6180 a proper external component?

https://esphome.io/components/external_components.html

https://github.com/esphome/esphome/tree/dev/esphome/components/vl53l0x
which was based on
https://github.com/pololu/vl53l0x-arduino

They have similar libraries for the other units as well

https://github.com/pololu/vl6180x-arduino

https://github.com/pololu/vl53l1x-arduino

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.