Giter Site home page Giter Site logo

esphome-configuration's People

Contributors

diplix avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

esphome-configuration's Issues

Over counting and feedback

Hi,

First of all: Thanks for the code! I love the idea of this project.
I have implemented your code on an ESP like 3 month ago. After a little time of reviewing what you did there - all worked fine. Little more documentation would be nice, but it was ok anyway. So, I am "testing" since then.

First, I mounted the TOF in the doorframe (1.95m), facing down the frame. In many cases, it worked fine. Biggest problem is the "over counting" so that I sometime have up to 15 imaginary people around me ;)
Then I remounted the sensor over a door (2m) with the door opening to the other side. But in my opinion it made things worse.
For example: when you leaving the room by opening the door and closing it in the same move, the counter do not decrease. And if you are entering again, you have a new imaginary friend.

After encountering the “door issue” I mounted it over a frame with no door in it. I would say it works better, but after all not perfect. I have tried different angles and positions on the frame, but nothing seems to be optimal.

Ideas as feedback: A little more doc, like ports and maybe a “how to install” with steps. For better understanding, an image or schema of your real world hardware setup/installation (like sensor position) would be a wonderful extension.
Anyway thanks for your work.
Have a nice day :)

Ready to try, config ready, but 1 question

Hi, probably a stupid question...

I am on the stop of trying out this cool thing. But where and how do I configure the connection for vl53l1x time of flight sensor? I can not find it in your yaml. May be it is substituted and before I accidentally double the config, better safe than sorry (trouble)

You only have i2c in the yaml...

Is it just a simple as only like this:

i2c:
  sda: 21
  scl: 22
  scan: True

EDIT: please confirm only
i2c:
is enough.

I have compiled like this (only i2c) on ESP32 D1 Mini and that gives me output:

[14:03:58][C][i2c:028]: I2C Bus:
[14:03:58][C][i2c:029]:   SDA Pin: GPIO21
[14:03:58][C][i2c:030]:   SCL Pin: GPIO22
[14:03:58][C][i2c:031]:   Frequency: 50000 Hz
[14:03:58][I][i2c:033]: Scanning i2c bus for active devices...
[14:03:58][I][i2c:040]: Found i2c device at address 0x29

But no readings (like mentioned in the other thread): #2

I also posted my complete debug output there.

I am very much wanting this to work. Please assist.

Thank you!

ESP8266 Compiling

@diplix great implementation together with @Lyr3x!
I am trying to implement on a esp8266 without the esphome. Could you tell me the reason for this error?

In file included from /Users/vb/Downloads/esphome-configuration-master/principal_tof/principal_tof.ino:1:0:
/var/folders/q_/j2ttxrls3_14_95cbhm1wvmm0000gn/T/arduino_build_815024/sketch/tof_people_counter/tof_vl53l1x_api.h:40:43: error: expected class-name before ',' token
 class PeopleCountSensor : public Component, public Sensor {
                                           ^
/var/folders/q_/j2ttxrls3_14_95cbhm1wvmm0000gn/T/arduino_build_815024/sketch/tof_people_counter/tof_vl53l1x_api.h:40:59: error: expected class-name before '{' token
 class PeopleCountSensor : public Component, public Sensor {
                                                           ^
/var/folders/q_/j2ttxrls3_14_95cbhm1wvmm0000gn/T/arduino_build_815024/sketch/tof_people_counter/tof_vl53l1x_api.h:45:3: error: 'Sensor' does not name a type
   Sensor *people_sensor = new Sensor();
   ^
/var/folders/q_/j2ttxrls3_14_95cbhm1wvmm0000gn/T/arduino_build_815024/sketch/tof_people_counter/tof_vl53l1x_api.h:46:3: error: 'Sensor' does not name a type
   Sensor *distance_sensor = new Sensor();
   ^
/var/folders/q_/j2ttxrls3_14_95cbhm1wvmm0000gn/T/arduino_build_815024/sketch/tof_people_counter/tof_vl53l1x_api.h:48:8: error: 'void PeopleCountSensor::setup()' marked override, but does not override
   void setup() override {
        ^
/var/folders/q_/j2ttxrls3_14_95cbhm1wvmm0000gn/T/arduino_build_815024/sketch/tof_people_counter/tof_vl53l1x_api.h:115:8: error: 'void PeopleCountSensor::loop()' marked override, but does not override
   void loop() override {
        ^
/var/folders/q_/j2ttxrls3_14_95cbhm1wvmm0000gn/T/arduino_build_815024/sketch/tof_people_counter/tof_vl53l1x_api.h: In member function 'void PeopleCountSensor::setup()':

Help with setup

Hi, i tried to use this configuration but i am not able to make it work. Is there anything I am missing? I only get this line in the logs:
[19:53:51][D][sensor:092]: 'tof distance avg': Sending state 0.00000 mm with 0 decimals of accuracy

I am using an ESP32. Is there any special wiring I have to note? I am able to get distances with other libraries on the ESP32 with this sensor so I think my setup should work basically.

Unknown error at address

Thanks for sharing the code. I use “Lolin D32” to connect vl53l1x,
vcc--3v
GND--GND
SLC--SLC (22)
SDA--SDA (21)
After power on, the log is displayed like this. What should I do?
Thanks again。

log:
[C][wifi:298]: DNS1: 192.168.2.1�
[C][wifi:298]: DNS1: 192.168.2.1�
[C][wifi:299]: DNS2: 0.0.0.0�
[C][i2c:028]: I2C Bus:�
[C][i2c:029]: SDA Pin: GPIO21�
[C][i2c:029]: SDA Pin: GPIO21�
[C][i2c:030]: SCL Pin: GPIO22�
[C][i2c:031]: Frequency: 50000 Hz�
[I][i2c:033]: Scanning i2c bus for active devices...�
[I][i2c:033]: Scanning i2c bus for active devices...�
[I][i2c:040]: Found i2c device at address 0x24�
[I][i2c:043]: Unknown error at address 0x25�
[I][i2c:043]: Unknown error at address 0x26�
[I][i2c:043]: Unknown error at address 0x30�
[I][i2c:043]: Unknown error at address 0x31�
[I][i2c:043]: Unknown error at address 0x32�
[I][i2c:043]: Unknown error at address 0x3E�
[I][i2c:040]: Found i2c device at address 0x40�
[I][i2c:043]: Unknown error at address 0x42�
[I][i2c:043]: Unknown error at address 0x43�
[I][i2c:043]: Unknown error at address 0x44�
[I][i2c:040]: Found i2c device at address 0x45�
[I][i2c:040]: Found i2c device at address 0x45�
[I][i2c:043]: Unknown error at address 0x46�
[I][i2c:043]: Unknown error at address 0x4A�
[I][i2c:043]: Unknown error at address 0x4B�
[I][i2c:043]: Unknown error at address 0x4D�
[I][i2c:043]: Unknown error at address 0x4E�
[I][i2c:043]: Unknown error at address 0x4F�
[I][i2c:043]: Unknown error at address 0x50�
[I][i2c:043]: Unknown error at address 0x51�
[I][i2c:043]: Unknown error at address 0x52�
[I][i2c:043]: Unknown error at address 0x52�
[I][i2c:043]: Unknown error at address 0x53�
[I][i2c:043]: Unknown error at address 0x54�
[I][i2c:043]: Unknown error at address 0x56�
[I][i2c:043]: Unknown error at address 0x57�
[C][template.binary_sensor:018]: Template Binary Sensor 'Door sensor'�
[C][uptime.sensor:030]: Uptime Sensor 'tof sensor Uptime'�
[C][uptime.sensor:030]: Unit of Measurement: 's'�
[C][uptime.sensor:030]: Accuracy Decimals: 0�
[C][uptime.sensor:030]: Accuracy Decimals: 0�
[C][uptime.sensor:030]: Icon: 'mdi:timer'�
[C][uptime.sensor:030]: Icon: 'mdi:timer'�
[C][template.sensor:021]: Template Sensor 'tof distance'�
[C][template.sensor:021]: Unit of Measurement: 'mm'�
[C][template.sensor:021]: Accuracy Decimals: 0�
[C][template.sensor:021]: Icon: 'mdi:ruler'�
[C][template.sensor:022]: Update Interval: 1.0s�
[C][template.sensor:021]: Template Sensor 'tof distance avg'�
[C][template.sensor:021]: Unit of Measurement: 'mm'�
[C][template.sensor:021]: Accuracy Decimals: 0�
[C][template.sensor:021]: Icon: 'mdi:ruler'�
[C][template.sensor:022]: Update Interval: 0.1s�
[C][logger:175]: Logger:�
[C][logger:176]: Level: DEBUG�
[C][logger:177]: Log Baud Rate: 115200�
[C][logger:178]: Hardware UART: UART0�
[C][restart:021]: Restart Switch 'tof sensor Restart'�
[C][restart:021]: Icon: 'mdi:restart'�
[C][status:034]: Status Binary Sensor 'tof sensor Status'�
[C][status:034]: Device Class: 'connectivity'�
[C][captive_portal:169]: Captive Portal:�
[C][web_server:122]: Web Server:�
[C][web_server:123]: Address: tof_sensor.local:80�
[C][ota:029]: Over-The-Air Updates:�
[C][ota:030]: Address: tof_sensor.local:3232�
[C][mqtt:051]: MQTT:�
[C][mqtt:053]: Server Address: 192.168.2.201:1883 (192.168.2.201)�
[C][mqtt:054]: Username: �[5m'mqtt'�[6m�
[C][mqtt:055]: Client ID: �[5m'tof_sensor-7c9ebdf1f9e4'�[6m�
[C][mqtt:055]: Client ID: �[5m'tof_sensor-7c9ebdf1f9e4'�[6m�
[C][mqtt:057]: Discovery prefix: 'homeassistantconf'�
[C][mqtt:058]: Discovery retain: YES�
[C][mqtt:058]: Discovery retain: YES�
[C][mqtt:060]: Topic Prefix: 'tof_sensor'�
[C][mqtt:062]: Log Topic: 'tof_sensor/debug'�
[C][mqtt:065]: Availability: 'tof_sensor/status'�
[C][api:095]: API Server:�
[C][api:096]: Address: tof_sensor.local:6053�
[C][wifi_signal.sensor:009]: WiFi Signal 'tof sensor RSSI'�
[C][wifi_signal.sensor:009]: Unit of Measurement: 'dB'�
[C][wifi_signal.sensor:009]: Accuracy Decimals: 0�
[C][wifi_signal.sensor:009]: Accuracy Decimals: 0�
[C][wifi_signal.sensor:009]: Icon: 'mdi:wifi'�
[D][sensor:092]: 'tof distance avg': Sending state 0.00000 mm with 0 decimals of accuracy�
[C][mqtt_subscribe.sensor:027]: MQTT Subscribe 'People reset'�
[C][mqtt_subscribe.sensor:027]: Unit of Measurement: ''�
[C][mqtt_subscribe.sensor:027]: Accuracy Decimals: 1�
[C][mqtt_subscribe.sensor:027]: Accuracy Decimals: 1�
[C][mqtt_subscribe.sensor:028]: Topic: tof_sensor/sensor/people/reset�
[C][mqtt.switch:038]: MQTT Switch 'tof sensor Restart': �
[C][mqtt.switch:039]: State Topic: 'tof_sensor/switch/tof_sensor_restart/state'�
[C][mqtt.switch:039]: State Topic: 'tof_sensor/switch/tof_sensor_restart/state'�
[C][mqtt.switch:039]: Command Topic: 'tof_sensor/switch/tof_sensor_restart/command'�
[C][mqtt.binary_sensor:018]: MQTT Binary Sensor 'tof sensor Status':�
[C][mqtt.binary_sensor:019]: State Topic: 'tof_sensor/status'�
[C][mqtt.sensor:024]: MQTT Sensor 'tof sensor RSSI':�
[C][mqtt.sensor:028]: State Topic: 'tof_sensor/sensor/tof_sensor_rssi/state'�
[C][mqtt.sensor:028]: State Topic: 'tof_sensor/sensor/tof_sensor_rssi/state'�
[C][mqtt.sensor:024]: MQTT Sensor 'tof sensor Uptime':�
[C][mqtt.sensor:028]: State Topic: 'tof_sensor/sensor/tof_sensor_uptime/state'�
[C][mqtt.sensor:028]: State Topic: 'tof_sensor/sensor/tof_sensor_uptime/state'�
[C][mqtt.sensor:024]: MQTT Sensor 'People':�
[C][mqtt.sensor:028]: State Topic: 'tof_sensor/sensor/people/state'�
[C][mqtt.sensor:024]: MQTT Sensor 'tof distance':�
[C][mqtt.sensor:028]: State Topic: 'tof_sensor/sensor/tof_distance/state'�
[C][mqtt.sensor:028]: State Topic: 'tof_sensor/sensor/tof_distance/state'�
[C][mqtt.sensor:024]: MQTT Sensor 'tof distance avg':�
[C][mqtt.sensor:028]: State Topic: 'tof_sensor/sensor/tof_distance_avg/state'�
[C][mqtt.binary_sensor:018]: MQTT Binary Sensor 'Door sensor':�
[C][mqtt.binary_sensor:019]: State Topic: 'tof_sensor/binary_sensor/door_sensor/state'�
[C][mqtt.sensor:024]: MQTT Sensor 'People reset':�
[C][mqtt.sensor:028]: State Topic: 'tof_sensor/sensor/people_reset/state'�
[D][sensor:092]: 'tof distance avg': Sending state 0.00000 mm with 0 decimals of accuracy�
[D][sensor:092]: 'tof distance avg': Sending state 0.00000 mm with 0 decimals of accuracy�
[D][sensor:092]: 'tof distance avg': Sending state 0.00000 mm with 0 decimals of accuracy�
[D][sensor:092]: 'tof distance avg': Sending state 0.00000 mm with 0 decimals of accuracy�
[D][sensor:092]: 'tof distance avg': Sending state 0.00000 mm with 0 decimals of accuracy�
[D][sensor:092]: 'tof distance avg': Sending state 0.00000 mm with 0 decimals of accuracy�
[D][sensor:092]: 'tof distance avg': Sending state 0.00000 mm with 0 decimals of accuracy�
[D][sensor:092]: 'tof distance avg': Sending state 0.00000 mm with 0 decimals of accuracy�
[D][sensor:092]: 'tof distance avg': Sending state 0.00000 mm with 0 decimals of accuracy�
[D][sensor:092]: 'tof distance avg': Sending state 0.00000 mm with 0 decimals of accuracy�
[D][sensor:092]: 'tof distance avg': Sending state 0.00000 mm with 0 decimals of accuracy�
[D][sensor:092]: 'tof distance avg': Sending state 0.00000 mm with 0 decimals of accuracy�

distance over 1400mm

Hi!

I'm trying to monitor a distance of about 3m. the vl53l1x should be able to handle 4m.
but it gives me wrong measurements around 1400mm.

can this be changed in config, or is it a hardware problem?

Danke im Voraus, Jens

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.