People counter passing through a door using VL53L0X or VL53L1X

If you increase that value, you just configure the interval of the updates sent from the distance sensor to HA. It may increase or decrease load for HA but does not change any logic on the ESP.

I have the same problem. Connection dropping randomly. Never connects againā€¦

have you find solution pls?

Not yetā€¦ Iā€™ve been trying different things but it always drops.

You may want to open an issue on the github page here, so the developers can take a look at it.

I had the same problem, accidentally disconnected from the wifi after a few hours and no longer connected.
What I did: clean the files, delete the node, and add again. I checked the connection of the sensor in the connector and corrected it to make the connection firm. Iā€™m using the D1 mini 8266 and now it works perfectly on version 1.5.1 and has 100% sensor capture.

the developers are very helpful and very nice but they told me that the problem is not the roodeā€¦
Since then I have tried many different things without a result.
Things I have tried are

  • Different ESP8266 board
  • Switch to ESP32
  • Different cable
  • Different power supply
  • supplied via a power bank
  • different variations of the sketch (arduino version, reboot_timeout: 0s, update_interval)

All of them above didnā€™t make any difference.
Randomly but almost once a day (some days more than 5-10 times) the esp node is been disconnected.
Once is disconnected it never connects back to HA.

The only walk-through I found, that works most of the times, is an automation with a smart plug.
Once the API is disconnected, for more than 5 minutes, then power off / power on the esp node.

It does the job, but it hasnā€™t solve the initial problem.
why the node disconnects and why when it does it never reconnects again ? (even with a reboot of HA)

I havenā€™t find a solution. I have read many threats, I have spent many hours.
Recently I followed esp group on discorde. Didnā€™t find a solution either.

Iā€™ve started to believe that something is wrong with the code ā€¦ or libraries.
I am looking a different implementation at the moment.

Will report back if I make progress

Today, I also believe that this is not a roode problem.
How do you set up wifi configuration on esp node?

here it is

wifi:
  ssid: !secret ssid1
  password: !secret ssid1_password
  fast_connect: True
  power_save_mode: none

  
  # Optional manual IP
  manual_ip:
    static_ip: 192.168.2.249
    gateway: 192.168.2.1
    subnet: 255.255.255.0

I have it set up like this, but it probably wonā€™t be a problem

wifi:
  networks:
    - ssid: !secret wifi_ssid
      password: !secret wifi_password
  use_address: xx.xx.xx.xx # IP D1 mini
  fast_connect: True
  power_save_mode: none
  domain: .local

this difference is not the problem of crashing.
I wish if it was ā€¦

Where do you guys have the sensor installed? On the top horizontal part of the door frame or on the vertical side?

Iā€™m asking because I thing the sensor gets confused during the initial calibration if this donā€™t see a solid wall where to calibrate with. If the sensor is moutend on the vertical side, it can get confuced by the oposite frame side and whatever you have on the side. So the sensor is calibrating against two diferent surfaces distance.

what i did is powerup the node while I hold a piece of cardboard at the other side of the vertical frame so the sensor calibrate against it. So far my mode havenā€™t droped yet.

this is theorical and Iā€™m testing but it will be interesting to know where you guys have the sensor mounted.

I too notice this issue of WiFi disconnections. Also have the issue with Ethernet ESPā€™s. However, for me itā€™s much more intermittent but I notice it has to do with either the amount of commands sent to the node, or the complexity of the sketch.

Since youā€™re having it happen more regularly, can you make a separate thread from this so we can discuss?

Have a feeling many more people are experiencing this to differing degrees and it would be good to discuss the common factors so we can find a solution.

I am currently testing it from the door side and on the other side there is a cabinet at a distance of about 1.3 m, on which the sensor is calibrated.
I donā€™t think it has anything to do with disconnecting from wifi because it disconnected and was in the same place.
He stopped disconnecting only after the steps I described above.
I have removed the distance sensors from the configuration.

You can still try entering in the browser:
192.168.2.249/events
This should show real-time events. Then see what happened when the roode disconnected from the wifi.

thank you! It makes me great impression why nobody has point this out before!
I have been looking about this for over a month and nobody said anything about /events.

However when I run it, it prompts me for password.
I enter the password and then it prompts me to save a file. ā€¦

but itā€™s always empty.

today I disabled two sensors (distance zone 0 , distance zone 1)
I also want to try the update_interval: 100ms but when I compile it gives me errors

roode:
  id: roode_platform
  i2c_address: 0x29
  update_interval: 10ms  <-----------------

Itā€™s weird that heā€™s asking for a password. I have an instant listing of events in Google Chrome.
I think the update interval option has been removed in the latest version. It is probably fixed in the code.

You are right!
I tried it with chrome and after I put my password it shows the following

retry: 30000
id: 150744281
event: ping
data: 

event: state
data: {"id":"sensor-roode32_max_zone_0","state":"1771 mm","value":1771}

event: state
data: {"id":"sensor-roode32_max_zone_1","state":"1749 mm","value":1749}

event: state
data: {"id":"sensor-roode32_min_zone_0","state":"0 mm","value":0}

event: state
data: {"id":"sensor-roode32_min_zone_1","state":"0 mm","value":0}

event: state
data: {"id":"sensor-roode32_roi_height_zone_0","state":"8 px","value":8}

event: state
data: {"id":"sensor-roode32_roi_width_zone_0","state":"4 px","value":4}

event: state
data: {"id":"sensor-roode32_roi_height_zone_1","state":"8 px","value":8}

event: state
data: {"id":"sensor-roode32_roi_width_zone_1","state":"4 px","value":4}

event: state
data: {"id":"sensor-sensor_status","state":"nan","value":null}

event: state
data: {"id":"sensor-roode32_rssi","state":"-79 dBm","value":-79}

event: state
data: {"id":"binary_sensor-roode32_api_status","state":"ON","value":true}

event: state
data: {"id":"binary_sensor-roode32_presence","state":"OFF","value":false}

event: state
data: {"id":"text_sensor-roode32_version","state":"1.5.1","value":"1.5.1"}

event: state
data: {"id":"text_sensor-roode32_last_direction","state":"Exit","value":"Exit"}

event: state
data: {"id":"text_sensor-roode32_uptime_human_readable","state":"1d 13h 45m 39s","value":"1d 13h 45m 39s"}

event: state
data: {"id":"text_sensor-esp_ip_address","state":"192.168.2.249","value":"192.168.2.249"}

event: state
data: {"id":"text_sensor-esp_connected_ssid","state":"esphome-dev","value":"esphome-dev"}

event: state
data: {"id":"number-roode32_people_counter","state":"0.000000","value":0}

but still doesnā€™t make any sense ā€¦
got disconnected again this morning after 27 hours

I see quite tall rssi there. Is it not possible that the loss of connection is caused by a weak signal?

event: state
data: {"id":"sensor-roode32_rssi","state":"-79 dBm","value":-79}

for sure the signal is not weak.
I have connected it on its own at one of my access point.
without any other clients!
However I will connect it to a better AP and report back

I followed your recommendation and I added another access point.
The RSSI from -79dBm went to -51dBM.

After three hours it got disconnected again! ā€¦

retry: 30000
id: 41389159
event: ping
data: 

event: state
data: {"id":"sensor-roode32_max_zone_0","state":"305 mm","value":305}

event: state
data: {"id":"sensor-roode32_max_zone_1","state":"1754 mm","value":1754}

event: state
data: {"id":"sensor-roode32_min_zone_0","state":"0 mm","value":0}

event: state
data: {"id":"sensor-roode32_min_zone_1","state":"0 mm","value":0}

event: state
data: {"id":"sensor-roode32_roi_height_zone_0","state":"8 px","value":8}

event: state
data: {"id":"sensor-roode32_roi_width_zone_0","state":"4 px","value":4}

event: state
data: {"id":"sensor-roode32_roi_height_zone_1","state":"8 px","value":8}

event: state
data: {"id":"sensor-roode32_roi_width_zone_1","state":"4 px","value":4}

event: state
data: {"id":"sensor-sensor_status","state":"nan","value":null}

event: state
data: {"id":"sensor-roode32_rssi","state":"-55 dBm","value":-55}

event: state
data: {"id":"binary_sensor-roode32_api_status","state":"ON","value":true}

event: state
data: {"id":"binary_sensor-roode32_presence","state":"OFF","value":false}

event: state
data: {"id":"text_sensor-roode32_version","state":"1.5.1","value":"1.5.1"}

event: state
data: {"id":"text_sensor-roode32_last_direction","state":"","value":""}

event: state
data: {"id":"text_sensor-roode32_uptime_human_readable","state":"7h 53m 42s","value":"7h 53m 42s"}

event: state
data: {"id":"text_sensor-esp_ip_address","state":"192.168.2.249","value":"192.168.2.249"}

event: state
data: {"id":"text_sensor-esp_connected_ssid","state":"esphome","value":"esphome"}

event: state
data: {"id":"number-roode32_people_counter","state":"0.000000","value":0}

However, the web page responses properly

And it replies to ping

image

Unfortunately HA says it is unavailable :frowning: . It will stay like this until I recycle power.

image

Mine has been rock solid for a week now.
The only thing that I did was to place a piece of cardboard in front of it at the other side of the frame during the calibration process.

My theory is that if the sensor is not calibrating against an even surface, this starts to compute too much and overflows the RAM or something.

In my setup, the sensor is aimed to the opposite frame of the door at 900mm, and then I have a wall at 1500mm. I noticed that the distance sensor reads are jumping from 900mm to 1500mm very quickly, this made me think that the calibration sequence could be messed up by this jumpy read. So using the cardboard I ensure that the sensor is calibrated to a distance of 900mm.

My ESP32 board also has a DHT22, a PIR and a TEMT6000 sensor all working along the VL53L1X.