ESPHome is a system to control your ESP8266/ESP32 by simple yet powerful configuration files and control them remotely through Home Automation systems.
Go to file
Jas Strong 63a186bdf9
t6615: tolerate sensor dropping commands (#2255)
The Amphenol T6615 has a built-in calibration system which means that
the sensor could go away for a couple of seconds to figure itself out.
While this is happening, commands are silently dropped.

This caused the previous version of this code to lock up completely,
since there was no way for the command_ state machine to tick back to
the NONE state.

Instead of just breaking the state machine, which might be harmful on
a multi-core or multi-threaded device, add a timestamp and only break
the lock if it's been more than a second since the command was issued.

The command usually doesn't take more than a few milliseconds to
complete, so this should not affect things unduly.

While we're at it, rewrite the rx side to be more robust against
bytes going missing.

Instead of reading in the data essentially inline, read into a buffer
and process it when enough has been read to make progress.

If data stops coming when we expect it to, or the data is malformed,
have a timeout that sends a new command.

Co-authored-by: jas <jas@asspa.in>
2021-09-13 09:54:48 +02:00
.devcontainer More VSCode devcontainer improvements (#1934) 2021-06-22 16:37:05 +02:00
.github Fix docker release for new tags without v 2021-08-18 15:10:44 +12:00
.vscode Refactor clang-tidy script to use actual compiler flags and includes (#2133) 2021-08-09 22:43:18 +02:00
docker Tidy HA addon (#1937) 2021-08-09 10:30:19 +12:00
esphome t6615: tolerate sensor dropping commands (#2255) 2021-09-13 09:54:48 +02:00
script Revert "Dont dump legacy fields (#2241)" (#2259) 2021-09-09 09:29:08 +12:00
tests API encryption (#2254) 2021-09-09 09:22:47 +12:00
.clang-format Configure clang-format for consistent pointer alignment (#1890) 2021-06-10 12:55:20 +02:00
.clang-tidy Compatibility with clang-tidy v14 (#2272) 2021-09-13 09:35:55 +02:00
.coveragerc Unittests for esphome python code (#931) 2020-03-12 14:27:22 -07:00
.dockerignore More VSCode devcontainer improvements (#1934) 2021-06-22 16:37:05 +02:00
.editorconfig Adds support cpp to vscode (#1828) 2021-06-15 10:45:22 +12:00
.gitignore Refactor clang-tidy script to use actual compiler flags and includes (#2133) 2021-08-09 22:43:18 +02:00
.gitpod.yml extract and use current version of python 3 (#938) 2020-01-09 13:27:39 -08:00
.pre-commit-config.yaml Rename master branch to release (#1976) 2021-07-02 15:42:36 +02:00
CODE_OF_CONDUCT.md Update email addresses (#1733) 2021-05-03 11:51:10 +12:00
CODEOWNERS pm1006: add support for sending a measurement request (#2214) 2021-09-09 09:35:00 +12:00
CONTRIBUTING.md Drop obsolete comments from CONTRIBUTING.md (#2271) 2021-09-12 22:04:35 +02:00
LICENSE 🏗 Merge C++ into python codebase (#504) 2019-04-17 12:06:00 +02:00
MANIFEST.in Fix sdist missing requirements.txt (#1214) 2020-07-28 14:29:01 +02:00
platformio.ini API encryption (#2254) 2021-09-09 09:22:47 +12:00
pylintrc add-black (#1593) 2021-03-07 16:03:16 -03:00
pyproject.toml add-black (#1593) 2021-03-07 16:03:16 -03:00
pytest.ini Unittests for esphome python code (#931) 2020-03-12 14:27:22 -07:00
README.md Rename master branch to release (#1976) 2021-07-02 15:42:36 +02:00
requirements_optional.txt Bump base image to 3.4.0 (#1879) 2021-06-08 22:03:04 +02:00
requirements_test.txt Bump pylint from 2.9.6 to 2.10.2 (#2197) 2021-09-03 16:20:42 +12:00
requirements.txt Bump dashboard to 20210908.0 and fix card names for yml (#2258) 2021-09-08 17:14:12 +12:00
setup.cfg add-black (#1593) 2021-03-07 16:03:16 -03:00
setup.py Fix pypi download url (#2177) 2021-08-18 15:39:57 +12:00

ESPHome Discord Chat GitHub release

ESPHome Logo

Documentation: https://esphome.io/

For issues, please go to the issue tracker.

For feature requests, please see feature requests.