Closed grego1981 closed 2 years ago
Thanks for reporting this. I currently only use ESP32 boards but I will check my 8266 later today.
What power supply do you use?
I used both the usb port of my PC and a wall plug 2Amp adapter. Same behaviour.
Thank you for your help!
The usb Port does Not deliver enough power, i faced this issue in the past as well. At least sometimes... Ill get back to you later after i checked the Template on my esp8266.
Can you share your exact hardware information? e.g.: ESP model: Wemos D1 Mini VL53L1X: Pololu Wiring: All pins
ESP model Wemos with ESP8266EX chip
VL53L1X form Aliexpress (the black one)
D1 --> SCL
D2 --> SDA
3V3 --> VIN used 3v3 & GND both next to the D1D2 pins as well the one of the opposite side.
GND --> GND
And this is my ESPHome config file:
substitutions: devicename: bathprsensor friendly_name: $devicename
external_components: refresh: always source: type: git url: https://github.com/Lyr3x/Roode ref: master
esphome: name: $devicename platform: ESP8266 board: d1_mini libraries:
wifi: networks:
api: password: admin reboot_timeout: 60min services:
ota: password: admin
web_server: port: 80 auth: username: admin password: admin
logger: level: DEBUG
i2c: sda: 4 scl: 5
roode: id: roode_platform address: 0x29 update_interval: 100ms calibration: true roi_height: 16 roi_width: 6 max_threshold_percentage: 80 roi_calibration: false invert_direction: true restore_values: true
switch:
sensor:
platform: roode id: hallway people_counter_sensor: id: peopleCounter name: $friendly_name people counter distance_sensor: name: $friendly_name distance filters:
platform: wifi_signal name: $friendly_name RSSI update_interval: 60s
platform: uptime name: Uptime Sensor id: uptime_sensor update_interval: 60s internal: true on_raw_value: then:
platform: roode version: name: $friendly_name version
platform: roode entry_exit_event: name: $friendly_name last direction
platform: template name: $friendly_name Uptime Human Readable id: uptime_human icon: mdi:clock-start
Tested with another ESP8266EX with the same results. Do you have any other suggested board you have tested it with to try?
Had a busy weekend. Will report back tomorrow. I will test it with a wemos d1 mini.
So I uploaded the latest example configuration to my wemos d1 mini with an attached Chinese (black) sensor. All is working fine.
Can you change your board type from board: d1_mini
to board: nodemcuv2
? It seems you are using that board
I've already made that change to nao avail.... I'll try to trace a D1 mini to test as well, it seems that something interferes with WiFi when using i2C..
I cant reproduce that with my wemos d1 mini and different sensors
Sorry for the delayed answer, the same code on a wemos D1 mini works fine ( I received 2 minis one with shield and one without), but on the wemos nodemcu with esp8266ex as well doesn't work. I double checked the WiFi works with other sensors without issues on the same ESPs that dont work with the VL53L1X...
To conclude: Your VL53L1X sensor works with the wemos d1 Mini but not with the nodemcu ? They use the exact same ESP on board so it has nothing to do with the chip itself.
Other sensors do not help to debug as they do not share the same code. That's not a good test😅
Yes, VL53L1X sensor works with the wemos d1 Mini but not with the nodemcu. Is there any example code to test the VL53L1X with WiFi using another library? I'm willing to help find a solution. To be clear the 2nd nodemcu was new and tested that it works fine witho other sensons and code.
I think that it has nothing do do with my code, but with esphome itself. I am not available till tomorrow evening. May you join the discord and well built Test code and debug this?
We can post the results here afterwards.
No problem I can do it, just tell me when and where to connect!
I had the same problem with my esp8266. This was the error in the logs.
: Event: Disconnected ssid='***' bssid=B0:**:**:**:FB:** reason='Auth Expired'
Leaving out starting from use address until domain helped for me after a bit of patience.
wifi:
networks:
- ssid: !secret wifi_ssid
password: !secret wifi_passsword
# use_address: $devicename
# fast_connect: True
# power_save_mode: none
# domain: .local
Could it be that fast_connect is the issue here? Can you check if you enable all other options again but leave fast_connect disabled?
I think it's an issue of my wifi router. The wifi connection is working fine now as is. Thanks for helping out!
So it has to do with fast connect ? @grego1981 may you also check?
Will close the issue as it is most likely not an issue with the RooDe code.
Describe the bug Used the latest yaml example, the firmware is compiled just fine, I upload it without an issue and restart the module. On restart if the sensor is not connected the WiFi is connected properly after attempting to find the sensor. If the sensor is connected Wifi fails to connect.
To Reproduce Connect the sensor to SDA & SCL
Expected behavior The ESP8266 should connect to WiFi with sensor connected
Additional context Attached 2 log files one with sensor online and one offline. with_sensor.txt without_sensor.txt