Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help with setup #2

Open
pascalmtts opened this issue Sep 11, 2020 · 4 comments
Open

Help with setup #2

pascalmtts opened this issue Sep 11, 2020 · 4 comments

Comments

@pascalmtts
Copy link

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.

@pascalmtts
Copy link
Author

pascalmtts commented Sep 15, 2020

It looks like there is a problem with the VL53l1x on ESP32. I will try with a ESP8266 when i get it.

@RomanKlein777
Copy link

did it work? I am doing the same ESP32. wondering if my 160MHz CPU was problem, I have used standard 240Mhz. I will test ESP32 and i2c anyway with other board so will see if all works. by the way, are you using D21 SDA and D22 SCK? also do not forget to remove protective foil from sensor (yellowish).

enabled verbose logging - something should be in logs saying that i2c is OK/NOK: in my case i see "invalid state sda"


rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:1044
load:0x40078000,len:8896
load:0x40080400,len:5828
entry 0x400806ac
[E][esp32-hal-cpu.c:159] setCpuFrequencyMhz(): Can not switch to 240 MH▒▒▒▒CPU frequency rated for 160MHz.
[D][esp32-hal-cpu.c:178] setCpuFrequencyMhz(): PLL: 320 / 2 = 160 Mhz, APB: 80000000 Hz
ets Jun 8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:1044
load:0x40078000,len:8896
load:0x40080400,len:5828
entry 0x400806ac
[E][esp32-hal-cpu.c:159] setCpuFrequencyMhz(): Can not switch to 240 MH▒▒▒▒CPU frequency rated for 160MHz.
[D][esp32-hal-cpu.c:178] setCpuFrequencyMhz(): PLL: 320 / 2 = 160 Mhz, APB: 80000000 Hz
[I][logger:166]: Log initialized
[C][status_led:014]: Setting up Status LED...
[C][ota:366]: There have been 0 suspected unsuccessful boot attempts.
[I][app:029]: Running through setup()...
[V][app:030]: Sorting components by setup priority...
[D][main:113]: ***RK: sme po nabootovani
[D][binary_sensor:034]: 'tof sensor Status': Sending initial state OFF
[D][VL53L1X custom sensor:061]: Getting Device data
[D][VL53L1X custom sensor:065]: DevAddr: 0x52 VL53L1X: 0xEACC
[D][VL53L1X custom sensor:077]: Autonomous Ranging Test
[I][VL53L1X custom sensor:090]: Starting measurements
[D][text_sensor:015]: 'ESPHome Version': Sending state '1.15.3 Nov 28 2020, 17:35:48'
[D][text_sensor:015]: 'ESP Mac Wifi Address': Sending state '84:0D:8E:08:99:A4'
[V][preferences:260]: nvs_get_blob('1'): ESP_ERR_NVS_NOT_FOUND - the key might not be set yet
[C][wifi:033]: Setting up WiFi...
[V][wifi_esp32:036]: Enabling STA.
[V][esp-idf:000]: I (1240) wifi: wifi driver task: 3ffb6210, prio:23, stack:3584, core=0

[V][esp-idf:000]: I (2848) wifi: wifi firmware version: 7997e4b

[V][esp-idf:000]: I (2849) wifi: config NVS flash: enabled

[V][esp-idf:000]: I (2851) wifi: config nano formating: disabled

[V][esp-idf:000]: I (2858) wifi: Init dynamic tx buffer num: 32

[V][esp-idf:000]: I (2864) wifi: Init data frame dynamic rx buffer num: 32

[V][esp-idf:000]: I (2872) wifi: Init management frame dynamic rx buffer num: 32

[V][esp-idf:000]: I (2880) wifi: Init management short buffer num: 32

[V][esp-idf:000]: I (2887) wifi: Init static rx buffer size: 1600

[V][esp-idf:000]: I (2894) wifi: Init static rx buffer num: 16

[V][esp-idf:000]: I (2900) wifi: Init dynamic rx buffer num: 32

[V][esp-idf:000]: I (2975) wifi: mode : sta (84:0d:8e:08:99:a4)

[D][WiFiGeneric.cpp:337] _eventCallback(): Event: 0 - WIFI_READY
[D][WiFiGeneric.cpp:337] _eventCallback(): Event: 2 - STA_START
[V][wifi_esp32:361]: Event: WiFi STA start
[V][wifi_esp32:352]: Event: WiFi ready
[V][esp-idf:000]: I (3002) wifi: Set ps type: 1

[D][wifi:324]: Starting scan...
[V][sensor:013]: 'tof sensor Uptime': Received new state 1.434000
[D][sensor:092]: 'tof sensor Uptime': Sending state 1.43400 s with 0 decimals of accuracy
[V][sensor:013]: 'tof distance': Received new state 0.000000

I][esp32-hal-i2c.c:1130] i2cProcQueue(): Bus busy, reinit
[W][esp32-hal-i2c.c:1411] i2cCheckLineState(): invalid state sda(21)=0, scl(22)=1
[D][esp32-hal-i2c.c:1419] i2cCheckLineState(): Recovered after 1 Cycles
[E][Wire.cpp:186] requestFrom(): rxBuff overflow 134
[E][Wire.cpp:186] requestFrom(): rxBuff overflow 134
[E][Wire.cpp:186] requestFrom(): rxBuff overflow 134
[V][sensor:013]: 'tof distance avg': Received new state 0.000000

@sanderlv
Copy link

sanderlv commented May 8, 2021

Think I have the same... ESP32. Please help?

[13:55:14][C][i2c:028]: I2C Bus:
[13:55:14][C][i2c:029]:   SDA Pin: GPIO21
[13:55:14][C][i2c:030]:   SCL Pin: GPIO22
[13:55:14][C][i2c:031]:   Frequency: 50000 Hz
[13:55:14][I][i2c:033]: Scanning i2c bus for active devices...
[13:55:14][I][i2c:040]: Found i2c device at address 0x29
[13:55:14][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:14][C][template.binary_sensor:018]: Template Binary Sensor 'Door sensor'
[13:55:14][C][uptime.sensor:030]: Uptime Sensor 'tof sensor Uptime'
[13:55:14][C][uptime.sensor:030]:   Unit of Measurement: 's'
[13:55:14][C][uptime.sensor:030]:   Accuracy Decimals: 0
[13:55:14][C][uptime.sensor:030]:   Icon: 'mdi:timer-outline'
[13:55:14][V][uptime.sensor:030]:   Unique ID: '3c61051223dc-uptime'
[13:55:14][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:14][C][template.sensor:021]: Template Sensor 'tof distance'
[13:55:14][C][template.sensor:021]:   Unit of Measurement: 'mm'
[13:55:14][C][template.sensor:021]:   Accuracy Decimals: 0
[13:55:14][C][template.sensor:021]:   Icon: 'mdi:ruler'
[13:55:14][C][template.sensor:022]:   Update Interval: 1.0s
[13:55:14][V][sensor:013]: 'tof distance': Received new state 0.000000
[13:55:14][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:14][D][sensor:099]: 'tof distance avg': Sending state 0.00000 mm with 0 decimals of accuracy
[13:55:14][C][template.sensor:021]: Template Sensor 'tof distance avg'
[13:55:14][C][template.sensor:021]:   Unit of Measurement: 'mm'
[13:55:14][C][template.sensor:021]:   Accuracy Decimals: 0
[13:55:14][C][template.sensor:021]:   Icon: 'mdi:ruler'
[13:55:14][C][template.sensor:022]:   Update Interval: 0.1s
[13:55:14][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:14][C][logger:185]: Logger:
[13:55:14][C][logger:186]:   Level: VERBOSE
[13:55:14][C][logger:187]:   Log Baud Rate: 115200
[13:55:14][C][logger:188]:   Hardware UART: UART0
[13:55:14][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:14][C][esp32_touch:029]: Config for ESP32 Touch Hub:
[13:55:14][C][esp32_touch:030]:   Meas cycle: 8.19ms
[13:55:14][C][esp32_touch:031]:   Sleep cycle: 27.31ms
[13:55:14][C][esp32_touch:051]:   Low Voltage Reference: 0.5V
[13:55:14][C][esp32_touch:071]:   High Voltage Reference: 2.7V
[13:55:14][C][esp32_touch:091]:   Voltage Attenuation: 0V
[13:55:14][C][esp32_touch:097]:   IIR Filter DISABLED
[13:55:14][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:14][C][restart:021]: Restart Switch 'tof sensor Restart'
[13:55:14][C][restart:021]:   Icon: 'mdi:restart'
[13:55:14][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:14][C][status:034]: Status Binary Sensor 'tof sensor Status'
[13:55:14][C][status:034]:   Device Class: 'connectivity'
[13:55:14][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:14][C][captive_portal:169]: Captive Portal:
[13:55:14][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:15][C][web_server:136]: Web Server:
[13:55:15][C][web_server:137]:   Address: 192.168.30.109:80
[13:55:15][C][ota:029]: Over-The-Air Updates:
[13:55:15][C][ota:030]:   Address: 192.168.30.109:3232
[13:55:15][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:15][C][mqtt:051]: MQTT:
[13:55:15][C][mqtt:053]:   Server Address: 192.168.30.10:1883 (192.168.30.10)
[13:55:15][C][mqtt:054]:   Username: 

[redacted]
[13:55:15][C][mqtt:055]:   Client ID: 

[redacted]
[13:55:15][C][mqtt:057]:   Discovery prefix: 'homeassistantconf'
[13:55:15][C][mqtt:058]:   Discovery retain: YES
[13:55:15][C][mqtt:060]:   Topic Prefix: 'tof_sensor'
[13:55:15][C][mqtt:062]:   Log Topic: 'tof_sensor/debug'
[13:55:15][C][mqtt:065]:   Availability: 'tof_sensor/status'
[13:55:15][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:15][C][api:095]: API Server:
[13:55:15][C][api:096]:   Address: 192.168.30.109:6053
[13:55:15][C][sntp:039]: SNTP Time:
[13:55:15][C][sntp:040]:   Server 1: '0.pool.ntp.org'
[13:55:15][C][sntp:041]:   Server 2: '1.pool.ntp.org'
[13:55:15][C][sntp:042]:   Server 3: '2.pool.ntp.org'
[13:55:15][C][sntp:043]:   Timezone: 'CET-1CEST-2,M3.4.0/2,M10.5.0/3'
[13:55:15][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:15][C][wifi_signal.sensor:009]: WiFi Signal 'tof sensor RSSI'
[13:55:15][C][wifi_signal.sensor:009]:   Device Class: 'signal_strength'
[13:55:15][C][wifi_signal.sensor:009]:   Unit of Measurement: 'dB'
[13:55:15][C][wifi_signal.sensor:009]:   Accuracy Decimals: 0
[13:55:15][V][wifi_signal.sensor:009]:   Unique ID: '3c61051223dc-wifisignal'
[13:55:15][V][sensor:013]: 'tof distance': Received new state 0.000000
[13:55:15][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:15][D][sensor:099]: 'tof distance avg': Sending state 0.00000 mm with 0 decimals of accuracy
[13:55:15][C][mqtt_subscribe.sensor:027]: MQTT Subscribe 'People reset'
[13:55:15][C][mqtt_subscribe.sensor:027]:   Unit of Measurement: ''
[13:55:15][C][mqtt_subscribe.sensor:027]:   Accuracy Decimals: 1
[13:55:15][C][mqtt_subscribe.sensor:028]:   Topic: tof_sensor/sensor/people/reset
[13:55:15][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:15][C][mqtt.switch:038]: MQTT Switch 'tof sensor Restart': 
[13:55:15][C][mqtt.switch:039]:   State Topic: 'tof_sensor/switch/tof_sensor_restart/state'
[13:55:15][C][mqtt.switch:039]:   Command Topic: 'tof_sensor/switch/tof_sensor_restart/command'
[13:55:15][C][mqtt.binary_sensor:018]: MQTT Binary Sensor 'tof sensor Status':
[13:55:15][C][mqtt.binary_sensor:019]:   State Topic: 'tof_sensor/status'
[13:55:15][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:15][C][mqtt.sensor:024]: MQTT Sensor 'tof sensor RSSI':
[13:55:15][C][mqtt.sensor:028]:   State Topic: 'tof_sensor/sensor/tof_sensor_rssi/state'
[13:55:15][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:15][C][mqtt.sensor:024]: MQTT Sensor 'tof sensor Uptime':
[13:55:15][C][mqtt.sensor:028]:   State Topic: 'tof_sensor/sensor/tof_sensor_uptime/state'
[13:55:15][C][mqtt.sensor:024]: MQTT Sensor 'People':
[13:55:15][C][mqtt.sensor:028]:   State Topic: 'tof_sensor/sensor/people/state'
[13:55:15][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:15][C][mqtt.sensor:024]: MQTT Sensor 'tof distance':
[13:55:15][C][mqtt.sensor:028]:   State Topic: 'tof_sensor/sensor/tof_distance/state'
[13:55:15][C][mqtt.sensor:024]: MQTT Sensor 'tof distance avg':
[13:55:15][C][mqtt.sensor:028]:   State Topic: 'tof_sensor/sensor/tof_distance_avg/state'
[13:55:15][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:15][C][mqtt.binary_sensor:018]: MQTT Binary Sensor 'Door sensor':
[13:55:15][C][mqtt.binary_sensor:019]:   State Topic: 'tof_sensor/binary_sensor/door_sensor/state'
[13:55:15][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:16][C][mqtt.sensor:024]: MQTT Sensor 'People reset':
[13:55:16][C][mqtt.sensor:028]:   State Topic: 'tof_sensor/sensor/people_reset/state'
[13:55:16][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:16][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:16][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:16][V][sensor:013]: 'tof distance': Received new state 0.000000
[13:55:16][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:16][D][sensor:099]: 'tof distance avg': Sending state 0.00000 mm with 0 decimals of accuracy
[13:55:16][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:16][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:16][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:16][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:16][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:17][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:17][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:17][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:17][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:17][V][sensor:013]: 'tof distance': Received new state 0.000000
[13:55:17][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:17][D][sensor:099]: 'tof distance avg': Sending state 0.00000 mm with 0 decimals of accuracy
[13:55:17][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:17][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:17][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:17][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:17][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:17][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:18][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:18][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:18][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:18][V][sensor:013]: 'tof distance': Received new state 0.000000
[13:55:18][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:18][D][sensor:099]: 'tof distance avg': Sending state 0.00000 mm with 0 decimals of accuracy
[13:55:18][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:18][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:18][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:18][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:18][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:18][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:19][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:19][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:19][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:19][V][sensor:013]: 'tof distance': Received new state 0.000000
[13:55:19][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:19][D][sensor:099]: 'tof distance avg': Sending state 0.00000 mm with 0 decimals of accuracy
[13:55:19][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:19][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:19][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:19][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:19][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:19][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:20][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:20][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:20][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:20][V][sensor:013]: 'tof distance': Received new state 0.000000
[13:55:20][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:20][D][sensor:099]: 'tof distance avg': Sending state 0.00000 mm with 0 decimals of accuracy
[13:55:20][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:20][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:20][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:20][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:20][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:21][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:21][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:21][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:21][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:21][V][sensor:013]: 'tof distance': Received new state 0.000000
[13:55:21][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:21][D][sensor:099]: 'tof distance avg': Sending state 0.00000 mm with 0 decimals of accuracy
[13:55:21][V][sensor:013]: 'tof distance avg': Received new state 0.000000
[13:55:21][V][sensor:013]: 'tof distance avg': Received new state 0.000000

@sanderlv
Copy link

Is this dead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants