Open ahuhta opened 1 year ago
The scope shots seem to show the older version having a little over 6ms delay from delay(5)
, while the newer version is just a smidge under 5ms. Hard to see in those scope shots.
Was the old version using the esp-idf or arduino framework? The difference may be in how the two frameworks implement delays.
With more accurate scope measurements, it might show the real problem is the esp-idf delay implementation is under-shooting the delay.
Can you try compiling with the arduino framework and see if the delay is different vs. the esp-idf framework?
I have the same issue, but no scope (or knowledge to use one) available. I tried building with both frameworks with same results in logs. Hope this helps.
Snips of yaml
esp32:
board: wemos_d1_mini32
framework:
type: esp-idf
esp32:
board: wemos_d1_mini32
framework:
type: arduino
Log (same result with both platforms)
[11:54:33][E][uart:015]: Reading from UART timed out at byte 0!
[11:54:33][W][senseair:024]: Reading data from SenseAir failed!
Which version of ESPHome has the issue? 2022.12.8
What type of installation are you using? Home Assistant Add-on
Which version of Home Assistant has the issue? Home Assistant 2023.2.4
I managed to get this working by changing GPIO pins used from GPIO9 and GPIO10 to GPIO1 and GPIO3 (rx and tx labeled pins). For some reason my d1_mini
wasn't working correctly with other pins. I didn't try out all of them.
The problem
Senseair sensor is not responding after finally upgrading ESPHome from 2022.3.1 to 2022.12.3. I assume this is because somehow the pause time between the wake up byte and actual payload is shortened. That strange because the senseair code hasn't changed. I tested to increase the delay from 5 to 6 and that solved the problem. Scope screenshots attached.
Same problem and fix also with esp32-c3-devkitm-1 board. That board I couldn't measure with the scope.
Maybe someone should also look the root cause. Why the actual time with function delay has changed.
Which version of ESPHome has the issue?
2022.12.3
What type of installation are you using?
Home Assistant Add-on
Which version of Home Assistant has the issue?
2023.1.2
What platform are you using?
ESP32-IDF
Board
esp32dev
Component causing the issue
senseair
Example YAML snippet
Anything in the logs that might be useful for us?
Additional information
Original code:
Fixed code working properly:
Scope screenshot ESPHome 2022.3.1:
Scope screenshot ESPHome 2022.12.3: Scope screenshot ESPHome 2022.12.3 with delay(6):