Closed diplix closed 2 years ago
yield()
calls in the process to give the ESP more time doing its things.Added the ENTITY_CATEGORY_DIAGNOSTIC
for all sensors in #55
during my first tests, because of the missing xshut, roode "Failed to detect and initialize" the sensor and shut down because of a loop.
The issue here is you will never get your Sensor up and running afterwards, because it will never jump back to the setup function. I added this to prevents error searching where the error lies in the sensor communication itself. Does that make sense ?
I removed the while blocker in #55. If this results in confusion for users i can add it back.
first off, my VL53L1X breakout board has an xhut pin, which needs to be set HIGH to work. i connected it to pin 23 and added the folowing yaml:
All VL53L1X boards have an XSHUT pin which is automatically pulled to HIGH but you can put it to LOW to shut down the board. If you dont use the pin at all your sensor will work OOB. You only connect the XSHUT pin if you plan to shutdown the sensor.
We are currently developing a custom PCB with the option to use XSHUT. I will add a config option soon.
i’ll just note what stuck out while testing it. not everything i conclude is meant as a feature request, it’s more a field report.
first off, my VL53L1X breakout board has an
xhut
pin, which needs to be set HIGH to work. i connected it to pin 23 and added the folowing yaml:during my first tests, because of the missing xshut, roode "Failed to detect and initialize" the sensor and shut down because of a loop. https://github.com/Lyr3x/Roode/blob/d946b95c98a8048f7b0cb008d393a8c1ef50931a/components/roode/roode.cpp#L42
that’s kind of a pain, because it renders the esp32 useless and unable to over the air updates. logging the error and letting esphome do it’s thing would be much nicer.
next problem i had was the watchdog. as long as the API was configured calling calibration caused a watchdog induced reboot. disabling initial calibration
enabled esphome to run and loop, however there were constant API disconnections (every 1-2 seconds) . increasing the roode
update_interval
to ~ 200ms or 400ms helped a little, but the API still disconnected eveery few seconds.removing the API entirely
and unsing
mqtt:
helped: initial calibration ran through and anupdate_interval
of 10ms was ok.to substitute the API services, i configured mqtt subscribes:
however calling
id(roode_platform)->recalibration();
while roode is runing still calls the watchdog. setting and resetting the counter works fine this way.since esphome 2021.11 there is a feature called
entity_category
(see esphome docs). it would be nice to make the followingplatform: roode
sensors "diagnostic":distance_sensor
,max_threshold_zone0
,max_threshold_zone1
,min_threshold_zone0
,min_threshold_zone1
,roi_height
,roi_width
and{"text_sensor":["platform":"roode", "version":[]]}
other than that roode works realy nice and reliably. i like how the auto-calibration works and the many diagnotic sensors for debugging and testing.
here are links to the parts i used: