diff --git a/.github/workflows/component-image.yml b/.github/workflows/component-image.yml index 609a8aa31..6c4633027 100644 --- a/.github/workflows/component-image.yml +++ b/.github/workflows/component-image.yml @@ -48,7 +48,7 @@ jobs: component: ${{ needs.prepare.outputs.name }} - name: Upload - uses: actions/upload-artifact@v4.3.3 + uses: actions/upload-artifact@v4.3.4 id: upload-artifact with: name: ${{ needs.prepare.outputs.name }} diff --git a/Doxygen b/Doxygen index 1cacee07e..698aee7ff 100644 --- a/Doxygen +++ b/Doxygen @@ -38,7 +38,7 @@ PROJECT_NAME = "ESPHome" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 2024.6.6 +PROJECT_NUMBER = 2024.7.0b1 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/Makefile b/Makefile index 7c0268fd5..cd252d445 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ ESPHOME_PATH = ../esphome -ESPHOME_REF = 2024.6.6 +ESPHOME_REF = 2024.7.0b1 PAGEFIND_VERSION=1.1.0 PAGEFIND=pagefind NET_PAGEFIND=../pagefindbin/pagefind diff --git a/_static/version b/_static/version index fceccade9..2bda8aa02 100644 --- a/_static/version +++ b/_static/version @@ -1 +1 @@ -2024.6.6 \ No newline at end of file +2024.7.0b1 \ No newline at end of file diff --git a/changelog/2024.7.0.rst b/changelog/2024.7.0.rst new file mode 100644 index 000000000..8b3edca17 --- /dev/null +++ b/changelog/2024.7.0.rst @@ -0,0 +1,138 @@ +ESPHome 2024.7.0 - 17th July 2024 +================================= + +.. seo:: + :description: Changelog for ESPHome 2024.7.0. + :author: Jesse Hills + :author_twitter: @jesserockz + + +Full list of changes +-------------------- + +New Features +^^^^^^^^^^^^ + +- [uptime] Add new timestamp type for uptime sensor :esphomepr:`7029` by :ghuser:`jesserockz` (new-feature) + +Breaking Changes +^^^^^^^^^^^^^^^^ + +- [dooya] Flip bit timings :esphomepr:`6947` by :ghuser:`jesserockz` (breaking-change) +- [modbus_text_sensor] new default ANSI encoding type :esphomepr:`6975` by :ghuser:`dudanov` (breaking-change) +- [micro_wake_word] Version 2 :esphomepr:`7032` by :ghuser:`kahrendt` (breaking-change) + +All changes +^^^^^^^^^^^ + +- [CI] Update device class sync script for update entities :esphomepr:`6895` by :ghuser:`jesserockz` +- X9c operation speed :esphomepr:`6898` by :ghuser:`oliverhihn` +- Bump actions/checkout from 4.1.6 to 4.1.7 :esphomepr:`6900` by :ghuser:`dependabot[bot]` +- [CI] Allow clang-tidy to see IDF components :esphomepr:`6903` by :ghuser:`kbx81` +- [esp32_camera] Use newer library version (for #6802) :esphomepr:`6809` by :ghuser:`kbx81` +- [micro_wake_word] Pin to esp-tflite-micro v1.3.1 :esphomepr:`6906` by :ghuser:`kbx81` +- VEML7700 Fix GCC build warnings :esphomepr:`6881` by :ghuser:`latonita` +- IDF 5 fixes for #6802 :esphomepr:`6911` by :ghuser:`kbx81` +- [CI-ethernet] Add/fix/organize/clean up ethernet component tests :esphomepr:`6916` by :ghuser:`kbx81` +- [CI-a01nyub] Consolidate test files :esphomepr:`6917` by :ghuser:`kbx81` +- [CI-api] Test fix for IDF 5+ :esphomepr:`6918` by :ghuser:`kbx81` +- [CI-http_request] Test fix for IDF 5+ :esphomepr:`6919` by :ghuser:`kbx81` +- [CI-wireguard] Test file consolidation :esphomepr:`6920` by :ghuser:`kbx81` +- [CI-esp32_hall] Remove IDF test :esphomepr:`6921` by :ghuser:`kbx81` +- [CI] Introduce testing for IDF 5 (and other arbitrary framework versions) :esphomepr:`6802` by :ghuser:`kbx81` +- uart: allow setting the UART id in final_validate_device_schema :esphomepr:`6923` by :ghuser:`paravoid` +- Bump peter-evans/create-pull-request from 6.0.5 to 6.1.0 :esphomepr:`6935` by :ghuser:`dependabot[bot]` +- Fix garbled graphics on LILYGO T4-S3 display :esphomepr:`6910` by :ghuser:`manuelkasper` +- Update cover.h for open() and close() compiler warnings :esphomepr:`6936` by :ghuser:`peter--s` +- [CI] Add debug component test for LibreTiny :esphomepr:`6945` by :ghuser:`kbx81` +- [dooya] Flip bit timings :esphomepr:`6947` by :ghuser:`jesserockz` (breaking-change) +- [qspi_amoled] Fix display remaining blank after update() before setup completion :esphomepr:`6958` by :ghuser:`manuelkasper` +- Bump docker/build-push-action from 6.0.1 to 6.1.0 in /.github/actions/build-image :esphomepr:`6962` by :ghuser:`dependabot[bot]` +- Synchronise Device Classes from Home Assistant :esphomepr:`6966` by :ghuser:`esphomebot` +- [qspi_amoled] Fix clear/fill with rotation :esphomepr:`6960` by :ghuser:`manuelkasper` +- [script] allow template parameters :esphomepr:`6972` by :ghuser:`ssieb` +- [haier] climate ID auto generation :esphomepr:`6949` by :ghuser:`dudanov` +- [core] Add script to extract actions, conditions, and pin_providers :esphomepr:`6929` by :ghuser:`jesserockz` +- [external_files] Move common ``download_content`` function to ``external_files.py`` :esphomepr:`6982` by :ghuser:`jesserockz` +- Do not build mDNS when mDNS is disabled via yaml :esphomepr:`6979` by :ghuser:`Links2004` +- Bump HeatpumpIR and IRremoteESP8266 :esphomepr:`6948` by :ghuser:`nagyrobi` +- [CI] Add more mdns and safe_mode tests :esphomepr:`6990` by :ghuser:`kbx81` +- [CI] Remove old test yamls from CI runs :esphomepr:`6991` by :ghuser:`kbx81` +- [CI] Update tests to run against IDF 5.1 :esphomepr:`6992` by :ghuser:`kbx81` +- Bump docker/build-push-action from 6.1.0 to 6.2.0 in /.github/actions/build-image :esphomepr:`6999` by :ghuser:`dependabot[bot]` +- [tuya] implement command 0x22 - datapoint-async :esphomepr:`6980` by :ghuser:`christiaanderidder` +- Allow wireguard to bind to PPP interface :esphomepr:`6989` by :ghuser:`droscy` +- [modbus_text_sensor] new default ANSI encoding type :esphomepr:`6975` by :ghuser:`dudanov` (breaking-change) +- [CI] Remove old test yaml files :esphomepr:`7002` by :ghuser:`kbx81` +- Revert "[CI] Update tests to run against IDF 5.1" :esphomepr:`7003` by :ghuser:`jesserockz` +- Enable devcontainer linters :esphomepr:`7019` by :ghuser:`orland0m` +- 'uart' and 'improv_serial' need to understand non-UART logger configurations :esphomepr:`6998` by :ghuser:`kpfleming` +- Make crc8 const-correct :esphomepr:`7027` by :ghuser:`nattgris` +- [CI] Run all tests when a base test changes :esphomepr:`7010` by :ghuser:`kbx81` +- [CI] Update tests to run against IDF 5.1 :esphomepr:`7011` by :ghuser:`kbx81` +- [uptime] Add new timestamp type for uptime sensor :esphomepr:`7029` by :ghuser:`jesserockz` (new-feature) +- Fix compile errors on ESP32-C6 with W5500 SPI ethernet :esphomepr:`7030` by :ghuser:`LeeHanYeong` +- Bump docker/setup-buildx-action from 3.3.0 to 3.4.0 :esphomepr:`7043` by :ghuser:`dependabot[bot]` +- Bump docker/build-push-action from 6.2.0 to 6.3.0 in /.github/actions/build-image :esphomepr:`7038` by :ghuser:`dependabot[bot]` +- Bump docker/setup-qemu-action from 3.0.0 to 3.1.0 :esphomepr:`7039` by :ghuser:`dependabot[bot]` +- Bump actions/upload-artifact from 4.3.3 to 4.3.4 :esphomepr:`7047` by :ghuser:`dependabot[bot]` +- Bump actions/download-artifact from 4.1.7 to 4.1.8 :esphomepr:`7046` by :ghuser:`dependabot[bot]` +- Fix display of update state in webinterfae :esphomepr:`7045` by :ghuser:`leejoow` +- Haier component update to support more protocol variations :esphomepr:`7040` by :ghuser:`paveldn` +- Don't test for IPv6 addresses when min_ipv6_addr_count is 0 :esphomepr:`7037` by :ghuser:`colmbuckley` +- [CI] Allow running specific target test(s) only :esphomepr:`7051` by :ghuser:`tomaszduda23` +- Bump actions/setup-python from 5.1.0 to 5.1.1 in /.github/actions/restore-python :esphomepr:`7071` by :ghuser:`dependabot[bot]` +- Fix RC Switch protocol not transmitting correctly via IR :esphomepr:`5411` by :ghuser:`michd` +- [micro_wake_word] Version 2 :esphomepr:`7032` by :ghuser:`kahrendt` (breaking-change) +- UART component support added for host platform :esphomepr:`6912` by :ghuser:`paveldn` +- Configure ap ip for RP2040 :esphomepr:`7065` by :ghuser:`HeMan` + +Past Changelogs +--------------- + +- :doc:`2024.6.0` +- :doc:`2024.5.0` +- :doc:`2024.4.0` +- :doc:`2024.3.0` +- :doc:`2024.2.0` +- :doc:`2023.12.0` +- :doc:`2023.11.0` +- :doc:`2023.10.0` +- :doc:`2023.9.0` +- :doc:`2023.8.0` +- :doc:`2023.7.0` +- :doc:`2023.6.0` +- :doc:`2023.5.0` +- :doc:`2023.4.0` +- :doc:`2023.3.0` +- :doc:`2023.2.0` +- :doc:`2022.12.0` +- :doc:`2022.11.0` +- :doc:`2022.10.0` +- :doc:`2022.9.0` +- :doc:`2022.8.0` +- :doc:`2022.6.0` +- :doc:`2022.5.0` +- :doc:`2022.4.0` +- :doc:`2022.3.0` +- :doc:`2022.2.0` +- :doc:`2022.1.0` +- :doc:`2021.12.0` +- :doc:`2021.11.0` +- :doc:`2021.10.0` +- :doc:`2021.9.0` +- :doc:`2021.8.0` +- :doc:`v1.20.0` +- :doc:`v1.19.0` +- :doc:`v1.18.0` +- :doc:`v1.17.0` +- :doc:`v1.16.0` +- :doc:`v1.15.0` +- :doc:`v1.14.0` +- :doc:`v1.13.0` +- :doc:`v1.12.0` +- :doc:`v1.11.0` +- :doc:`v1.10.0` +- :doc:`v1.9.0` +- :doc:`v1.8.0` +- :doc:`v1.7.0` diff --git a/components/api.rst b/components/api.rst index a6386a845..96d819ee6 100644 --- a/components/api.rst +++ b/components/api.rst @@ -89,7 +89,7 @@ Open the ESPHome integration page on your Home Assistant instance: Then: -#. Fnd your device in the device list +#. Find your device in the device list #. Click the "configure" button next to it #. Check the "Allow the device to make Home Assistant service calls" box #. Then click "submit". diff --git a/components/climate/climate_ir.rst b/components/climate/climate_ir.rst index e2f0bbacd..6f67f8f9c 100644 --- a/components/climate/climate_ir.rst +++ b/components/climate/climate_ir.rst @@ -114,9 +114,18 @@ This platform utilises the library's generic one-size-fits-all API, which might Additional configuration must be specified for this platform: -- **protocol** (**Required**, string): Choose one of Arduino-HeatpumpIR's supported protcols: ``aux``, ``ballu``, ``carrier_mca``, ``carrier_nqv``, ``daikin_arc417``, ``daikin_arc480``, ``daikin``, ``electroluxyal``, ``fuego``, ``fujitsu_awyz``, ``gree``, ``greeya``, ``greeyac``, ``greeyan``, ``greeyt``, ``hisense_aud``, ``hitachi``, ``hyundai``, ``ivt``, ``midea``, ``mitsubishi_fa``, ``mitsubishi_fd``, ``mitsubishi_fe``, ``mitsubishi_heavy_fdtc``, ``mitsubishi_heavy_zj``, ``mitsubishi_heavy_zm``, ``mitsubishi_heavy_zmp``, ``mitsubishi_heavy_kj``, ``mitsubishi_msc``, ``mitsubishi_msy``, ``mitsubishi_sez``, ``panasonic_ckp``, ``panasonic_dke``, ``panasonic_jke``, ``panasonic_lke``, ``panasonic_nke``, ``samsung_aqv``, ``samsung_fjm``, ``sharp``, ``toshiba_daiseikai``, ``toshiba``, ``zhlt01`` -- **horizontal_default** (**Required**, string): What to default to when the AC unit's horizontal direction is *not* set to swing. Options are: ``left``, ``mleft``, ``middle``, ``mright``, ``right``, ``auto`` -- **vertical_default** (**Required**, string): What to default to when the AC unit's vertical direction is *not* set to swing. Options are: ``down``, ``mdown``, ``middle``, ``mup``, ``up``, ``auto`` +- **protocol** (**Required**, string): Choose one of Arduino-HeatpumpIR's supported protcols: + ``aux``, ``ballu``, ``carrier_mca``, ``carrier_nqv``, ``carrier_qlima_1``, ``carrier_qlima_1``, ``daikin``, ``daikin_arc417``, + ``daikin_arc480``, ``electroluxyal``, ``fuego``, ``fujitsu_awyz``, ``gree``, ``greeyaa``, ``greeyac``, ``greeyan``, ``greeyap``, + ``greeyt``, ``hisense_aud``, ``hitachi``, ``hyundai``, ``ivt``, ``midea``, ``mitsubishi_fa``, ``mitsubishi_fd``, + ``mitsubishi_fe``, ``mitsubishi_heavy_fdtc``, ``mitsubishi_heavy_zj``, ``mitsubishi_heavy_zm``, ``mitsubishi_heavy_zmp``, + ``mitsubishi_kj``, ``mitsubishi_msc``, ``mitsubishi_msy``, ``mitsubishi_sez``, ``nibe``, ``panasonic_ckp``, ``panasonic_dke``, + ``panasonic_jke``, ``panasonic_lke``, ``panasonic_nke``, ``samsung_aqv``, ``samsung_aqv12msan``, + ``samsung_fjm``, ``sharp``, ``toshiba``, ``toshiba_daiseikai``, ``zhjg01``, ``zhlt01``. + + +- **horizontal_default** (**Required**, string): What to default to when the AC unit's horizontal direction is *not* set to swing. Options are: ``left``, ``mleft``, ``middle``, ``mright``, ``right``, ``auto``. +- **vertical_default** (**Required**, string): What to default to when the AC unit's vertical direction is *not* set to swing. Options are: ``down``, ``mdown``, ``middle``, ``mup``, ``up``, ``auto``. - **max_temperature** (**Required**, float): The maximum temperature that the AC unit supports being set to. - **min_temperature** (**Required**, float): The minimum temperature that the AC unit supports being set to. - **sensor** (*Optional*, :ref:`config-id`): The sensor that is used to measure the ambient temperature. diff --git a/components/climate/haier.rst b/components/climate/haier.rst index 7b7e81ed8..8849a406f 100644 --- a/components/climate/haier.rst +++ b/components/climate/haier.rst @@ -100,6 +100,12 @@ This component requires a :ref:`uart` to be setup. level: INFO format: "Alarm deactivated. Code: %d. Message: \"%s\"" args: [ code, message] + on_status_message: + then: + - logger.log: + level: INFO + format: "New status message received, size=%d, subcmd=%02X%02X" + args: [ 'data_size', 'data[0]', 'data[1]' ] Configuration variables: @@ -112,7 +118,9 @@ Configuration variables: - **wifi_signal** (*Optional*, boolean): If true - send wifi signal level to AC. - **answer_timeout** (*Optional*, :ref:`config-time`): Responce timeout. The default value is 200ms. - **alternative_swing_control** (*Optional*, boolean): (supported by smartAir2 only) If true - use alternative values to control swing mode. Use only if the original control method is not working for your AC. +- **status_message_header_size** (*Optional*, int): (supported only by hOn) Define the header size of the status message. Can be used to handle some protocol variations. Use only if you are sure what you are doing. The default value: 0. - **control_packet_size** (*Optional*, int): (supported only by hOn) Define the size of the control packet. Can help with some newer models of ACs that use bigger packets. The default value: 10. +- **sensors_packet_size** (*Optional*, int): (supported only by hOn) Define the size of the sensor packet of the status message. Can help with some models of ACs that have bigger sensor packet. The default value: 22, minimum value: 18. - **control_method** (*Optional*, list): (supported only by hOn) Defines control method (should be supported by AC). Supported values: MONITOR_ONLY - no control, just monitor status, SET_GROUP_PARAMETERS - set all AC parameters with one command (default method), SET_SINGLE_PARAMETER - set each parameter individually (this method is supported by some new ceiling ACs like AD71S2SM3FA) - **display** (*Optional*, boolean): Can be used to set the AC display off. - **beeper** (*Optional*, boolean): Can be used to disable beeping on commands from AC. Supported only by hOn protocol. @@ -121,6 +129,7 @@ Configuration variables: - **supported_presets** (*Optional*, list): Can be used to disable some presets. Possible values for smartair2 are: AWAY, BOOST, COMFORT. Possible values for hOn are: AWAY, ECO, BOOST, SLEEP. AWAY preset can be enabled only in HEAT mode, it is disabled by default - **on_alarm_start** (*Optional*, :ref:`Automation `): (supported only by hOn) Automation to perform when AC activates a new alarm. See :ref:`haier-on_alarm_start` - **on_alarm_end** (*Optional*, :ref:`Automation `): (supported only by hOn) Automation to perform when AC deactivates a new alarm. See :ref:`haier-on_alarm_end` +- **on_status_message** (*Optional*, :ref:`Automation `): Automation to perform when status message received from AC. See :ref:`haier-on_status_message` - All other options from :ref:`Climate `. Automations @@ -131,7 +140,7 @@ Automations ``on_alarm_start`` Trigger ************************** -This automation will be triggered when a new alarm is activated by AC. The error code of the alarm will be given in the variable "code" (type uint8_t), error message in the variable "message" (type char*). Those variables can be used in :ref:`lambdas ` +This automation will be triggered when a new alarm is activated by AC. The error code of the alarm will be given in the variable ``code`` (``uint8_t``), error message in the variable ``message`` (``const char *``). Those variables can be used in :ref:`lambdas ` .. code-block:: yaml @@ -142,14 +151,14 @@ This automation will be triggered when a new alarm is activated by AC. The error - logger.log: level: WARN format: "Alarm activated. Code: %d. Message: \"%s\"" - args: [ code, message] + args: [ 'code', 'message' ] .. _haier-on_alarm_end: ``on_alarm_end`` Trigger ************************ -This automation will be triggered when a previously activated alarm is deactivated by AC. The error code of the alarm will be given in the variable "code" (type uint8_t), error message in the variable "message" (type char*). Those variables can be used in :ref:`lambdas ` +This automation will be triggered when a previously activated alarm is deactivated by AC. The error code of the alarm will be given in the variable ``code`` (``uint8_t``), error message in the variable ``message`` (``const char *``). Those variables can be used in :ref:`lambdas ` .. code-block:: yaml @@ -160,7 +169,26 @@ This automation will be triggered when a previously activated alarm is deactivat - logger.log: level: INFO format: "Alarm deactivated. Code: %d. Message: \"%s\"" - args: [ code, message] + args: [ 'code', 'message' ] + +.. _haier-on_status_message: + +``on_status_message`` Trigger +***************************** + +This automation will be triggered when component receives new status packet from AC. Raw message binary (without header and checksum) will be provided in the variable ``data`` (``const char *``), message length in the variable ``data_size`` (``uint8_t``). Those variables can be used in :ref:`lambdas ` +This trigger can be used to support some features that unique for the model and not supported by others. + +.. code-block:: yaml + + climate: + - protocol: hOn + on_status_message: + then: + - logger.log: + level: INFO + format: "New status message received, size=%d, subcmd=%02X%02X" + args: [ 'data_size', 'data[0]', 'data[1]' ] ``climate.haier.power_on`` Action ********************************* diff --git a/components/micro_wake_word.rst b/components/micro_wake_word.rst index 5726025ff..3f69ffd33 100644 --- a/components/micro_wake_word.rst +++ b/components/micro_wake_word.rst @@ -10,72 +10,55 @@ This repository/library allows you to create a custom wake word for your ESPHome The training process is described on the `microWakeWord GitHub repository `__. -The ``micro_wake_word`` component requires an **ESP32-S3 with PSRAM** to function. .. code-block:: yaml # Shorthand name micro_wake_word: - model: okay_nabu + models: + - model: okay_nabu # Github shorthand URL micro_wake_word: - model: github://esphome/micro-wake-word-models/models/okay_nabu.json + models: + - model: github://esphome/micro-wake-word-models/models/v2/okay_nabu.json Configuration variables: ------------------------ -- **model** (**Required**, string): The model to use. This can be one of: +- **models** (**Required**, list): The models to use. - - A simple name of a model that exists in the official `ESPHome Models repository `__. - e.g. ``okay_nabu``. - - A github shorthand URL to a model JSON file. - e.g. ``github://esphome/micro-wake-word-models/models/okay_nabu.json@main``. - - A full URL to a model JSON file. - e.g. ``https://github.com/esphome/micro-wake-word-models/raw/main/models/okay_nabu.json``. + - **model** (**Required**, string): This can be one of: + - A simple name of a model that exists in the official `ESPHome Models repository `__. + e.g. ``okay_nabu``. + - A github shorthand URL to a model JSON file. + e.g. ``github://esphome/micro-wake-word-models/models/okay_nabu.json@main``. + - A full URL to a model JSON file. + e.g. ``https://github.com/esphome/micro-wake-word-models/raw/main/models/okay_nabu.json``. + + - **probability_cutoff** (*Optional*, percentage): The probability cutoff for the wake word detection. + If the probability of the wake word is below this value, the wake word is not detected. + A larger value reduces the number of false accepts but increases the number of false rejections. + - **sliding_window_size** (*Optional*, int): The size of the sliding window average for the wake word detection. A small value lowers latency but may increase the number of false accepts. - **on_wake_word_detected** (*Optional*, Automation): An automation to perform when the wake word is detected. The ``wake_word`` phrase from the model manifest is provided as a ``std::string`` to any actions in this automation. +- **vad** (*Optional*, model): Enable a Voice Activity Detection model to reduce false accepts from non-speech sounds. -The below two options are provided by the JSON file, but can be overridden in YAML. + - **model** (*Optional*, string): This can be one of: -- **probability_cutoff** (*Optional*, percentage): The probability cutoff for the wake word detection. - If the probability of the wake word is below this value, the wake word is not detected. - A larger value reduces the number of false accepts but increases the number of false rejections. -- **sliding_window_average_size** (*Optional*, int): The size of the sliding window average for the wake word detection. A small value lowers latency but may increase the number of false accepts. + - A github shorthand URL to a model JSON file. + e.g. ``github://esphome/micro-wake-word-models/models/v2/vad.json@main``. + - A full URL to a model JSON file. + e.g. ``https://github.com/esphome/micro-wake-word-models/raw/main/models/v2/vad.json``. -Model JSON ----------- + - **probability_cutoff** (*Optional*, percentage): The probability cutoff for voice activity detection. + If the probability is below this value, then no wake word will be accepted. + A larger value reduces the number of false accepts but increases the number of false rejections. + - **sliding_window_size** (*Optional*, int): The size of the sliding window for voice activity detection. The maximum of the probabilities in the sliding window is compared to ``probability_cutoff`` to determine if voice activity is detected. -.. code-block:: json - { - "type": "micro", - "wake_word": "okay nabu", - "author": "Kevin Ahrendt", - "website": "https://www.kevinahrendt.com/", - "model": "./okay_nabu.tflite", - "version": 1, - "micro": { - "probability_cutoff": 0.5, - "sliding_window_average_size": 10 - } - } - -The model JSON file contains the following fields that are all **required** unless otherwise specified: - -- **type** (string): The type of the model. This should always be ``micro``. -- **wake_word** (string): The wake word that the model is trained to detect. -- **author** (string): The name of the author that trained the model. -- **website** (string): The website of the author. -- **model** (string): The relative or absolute path or URL to the TFLite trained model file. -- **version** (int): The version of the JSON schema. Currently only version ``1`` exists. -- **micro** (object): The microWakeWord specific configuration. - - - **probability_cutoff** (float): The probability cutoff for the wake word detection. - If the probability of the wake word is below this value, the wake word is not detected. - - **sliding_window_average_size** (int): The size of the sliding window average for the wake word detection. - - **minimum_esphome_version** (*Optional* version): The minimum ESPHome version required to use this model. +The ``probability_cutoff`` and ``sliding_window_size`` are provided by the JSON file but can be overridden in YAML. A default VAD model is provided with the ``vad`` configuration variables, but a different model can be overridden in YAML. Automations @@ -97,13 +80,56 @@ Example usage .. code-block:: yaml micro_wake_word: - model: okay_nabu + vad: + models: + - model: okay_nabu + - model: hey_mycroft on_wake_word_detected: then: - voice_assistant.start: wake_word: !lambda return wake_word; +Model JSON +---------- + +.. code-block:: json + + { + "type": "micro", + "wake_word": "okay nabu", + "author": "Kevin Ahrendt", + "website": "https://www.kevinahrendt.com/", + "model": "stream_state_internal_quant.tflite", + "version": 2, + "micro": { + "probability_cutoff": 0.97, + "sliding_window_size": 5, + "feature_step_size": 10, + "tensor_arena_size": 22860, + "minimum_esphome_version": "2024.7" + } + } + +The model JSON file contains the following fields that are all **required** unless otherwise specified: + +- **type** (string): The type of the model. This should always be ``micro``. +- **wake_word** (string): The wake word that the model is trained to detect. +- **author** (string): The name of the author that trained the model. +- **website** (*optional* string): The website of the author. +- **model** (string): The relative or absolute path or URL to the TFLite trained model file. +- **trained_languages** (list of strings): A list of the wake word samples' primary languages/pronunciations used when training. +- **version** (int): The version of the JSON schema. The current version is ``2``. +- **micro** (object): The microWakeWord specific configuration. + + - **probability_cutoff** (float): The probability cutoff for the wake word detection. + If the probability of the wake word is below this value, the wake word is not detected. + - **sliding_window_size** (int): The size of the sliding window for the wake word detection. Wake words average all probabilities in the sliding window and VAD models use the maximum of all probabilities in the sliding window. + - **feature_step_size** (int): The step size for the spectrogram feature generation in milliseconds. + - **tensor_arena_size** (int): The minimum size of the tensor arena in bytes. + - **minimum_esphome_version** (version): The minimum ESPHome version required to use this model. + + See Also -------- diff --git a/components/output/x9c.rst b/components/output/x9c.rst index 4a1ffebc8..03d95465e 100644 --- a/components/output/x9c.rst +++ b/components/output/x9c.rst @@ -36,7 +36,8 @@ All chips are controlled by a three wire interface and feature 100 possible wipe cs_pin: GPIOXX inc_pin: GPIOXX ud_pin: GPIOXX - initial_value: 0.5 + initial_value: 1.0 + step_delay: 1us Configuration variables: ------------------------ @@ -46,6 +47,7 @@ Configuration variables: - **inc_pin** (**Required**, :ref:`Pin Schema `): Increment pin - **ud_pin** (**Required**, :ref:`Pin Schema `): Up/Down pin - **initial_value** (*Optional*, float): Manually specify the initial potentiometer value, between ``0.01`` and ``1.0``. Defaults to ``1.0``. +- **step_delay** (*Optional*, int): Manually specify the delay between steps (in microseconds) between ``1us`` and ``100us``. Defaults to ``1us``. - All other options from :ref:`Output `. See Also diff --git a/components/sensor/sgp30.rst b/components/sensor/sgp30.rst index e54b4021e..341da383b 100644 --- a/components/sensor/sgp30.rst +++ b/components/sensor/sgp30.rst @@ -39,7 +39,7 @@ Configuration variables: - **tvoc** (**Required**): The information for the total Volatile Organic Compounds sensor. - - **name** (**Required**, string): The name for the humidity sensor. + - **name** (**Required**, string): The name for the TVOC sensor. - **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas. - All other options from :ref:`Sensor `. @@ -60,13 +60,13 @@ Advanced: - **tvoc_baseline** (**Required**, int): The TVOC baseline for calibration purposes. After OTA, this value is used to calibrate the sensor. -- **eco2_baseline** (*Optional*): The information for the CO₂eq. sensor baseline value. Baseline value is published in decimals. +- **eco2_baseline** (*Optional*): The information for the CO₂eq. baseline value sensor. Baseline value is published in decimals. - **name** (**Required**, string): The name for the CO₂eq baseline value sensor. - **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas. - All other options from :ref:`Sensor `. -- **tvoc_baseline** (*Optional*): The information for the TVOC baseline value sensor. Baseline value is published in in decimals. +- **tvoc_baseline** (*Optional*): The information for the TVOC baseline value sensor. Baseline value is published in decimals. - **name** (**Required**, string): The name for the TVOC baseline value sensor. - **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas. diff --git a/components/sensor/uptime.rst b/components/sensor/uptime.rst index c1f6db763..7f1103d21 100644 --- a/components/sensor/uptime.rst +++ b/components/sensor/uptime.rst @@ -13,17 +13,21 @@ Time rollovers are automatically handled. # Example configuration entry sensor: - platform: uptime + type: seconds name: Uptime Sensor Configuration variables: ------------------------ +- **type** (*Optional*): Either: + + - ``seconds`` (*default*): A simple counter. + - ``timestamp``: presents the time ESPHome last booted up. Requires a :doc:`/components/time/index`. + - **update_interval** (*Optional*, :ref:`config-time`): The interval to check the sensor. Defaults to ``60s``. - -- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas. + Valid only with ``type: seconds``. - All other options from :ref:`Sensor `. - See Also -------- diff --git a/components/text_sensor/modbus_controller.rst b/components/text_sensor/modbus_controller.rst index 49bc6c321..f949ac7f2 100644 --- a/components/text_sensor/modbus_controller.rst +++ b/components/text_sensor/modbus_controller.rst @@ -23,11 +23,16 @@ Configuration variables: - **skip_updates** (*Optional*, int): By default all sensors of a modbus_controller are updated together. For data points that don't change very frequently updates can be skipped. A value of 5 would only update this sensor range in every 5th update cycle - **register_count** (*Optional*, int): The number of consecutive registers this read request should span or skip in a single command. Default is 1. See :ref:`modbus_register_count` for more details. - **response_size** (**Required**): Number of bytes of the response. -- **raw_encode** (*Optional*, enum): If the response is binary it can't be published directly. Since a text sensor only publishes strings the binary data can be encoded: +- **raw_encode** (*Optional*, enum): If the response is binary it can't be published directly. Since a text sensor only publishes strings the binary data can be encoded. Defaults to ``ANSI``. Possible encodings are: - ``NONE``: Don't encode data. - ``HEXBYTES``: 2 byte hex string. 0x2011 will be sent as "2011". - - ``COMMA``: Byte values as integers, delimited by a coma. 0x2011 will be sent as "32,17" + - ``COMMA``: Byte values as integers, delimited by a coma. 0x2011 will be sent as "32,17". + - ``ANSI``: Each byte is treated as an ``ANSI`` character. All control characters are ignored. + +.. note:: + + From version 2024.7, default encoding is ``ANSI``. Thus, all control characters are now ignored. If you need to receive all characters, use ``NONE`` encoding. - **force_new_range** (*Optional*, boolean): If possible sensors with sequential addresses are grouped together and requested in one range. Setting ``force_new_range: true`` enforces the start of a new range at that address. - **custom_command** (*Optional*, list of bytes): raw bytes for modbus command. This allows using non-standard commands. If ``custom_command`` is used ``address`` and ``register_type`` can't be used. @@ -39,7 +44,7 @@ Configuration variables: Parameters passed into the lambda - **x** (std:string): The parsed value of the modbus data according to **raw_encode** - - **data** (std::vector): vector containing the complete raw modbus response bytes for this sensor *note:* because the response contains data for all registers in the same range you have to use ``data[item->offset]`` to get the first response byte for your sensor. - **item** (const pointer to a SensorItem derived object): The sensor object itself. diff --git a/components/uart.rst b/components/uart.rst index 963238166..731273cdb 100644 --- a/components/uart.rst +++ b/components/uart.rst @@ -38,6 +38,9 @@ In some cases only **TX** or **RX** exists as the device at the other end only a for the data being sent. This could cause unexpected issues if you are using the Software UART and have devices that explicity check the parity. Most likely you will need to flip the ``parity`` flag in YAML. +.. note:: + + UART implementation for the host platform does not use TX and RX pins but port names. .. code-block:: yaml @@ -51,8 +54,9 @@ Configuration variables: ------------------------ - **baud_rate** (**Required**, int): The baud rate of the UART bus. -- **tx_pin** (*Optional*, :ref:`config-pin`): The pin to send data to from the ESP's perspective. Use the full pin schema and set ``inverted: true`` to invert logic levels. -- **rx_pin** (*Optional*, :ref:`config-pin`): The pin to receive data on from the ESP's perspective. Use the full pin schema and set ``inverted: true`` to invert logic levels. +- **tx_pin** (*Optional*, :ref:`config-pin`): The pin to send data to from the ESP's perspective. Use the full pin schema and set ``inverted: true`` to invert logic levels. Not supported by host platform. +- **rx_pin** (*Optional*, :ref:`config-pin`): The pin to receive data on from the ESP's perspective. Use the full pin schema and set ``inverted: true`` to invert logic levels. Not supported by host platform. +- **port** (*Optional*, string): Host platform only. Unix style name of the port to use. - **rx_buffer_size** (*Optional*, int): The size of the buffer used for receiving UART messages. Increase if you use an integration that needs to read big payloads from UART. Defaults to ``256``. - **data_bits** (*Optional*, int): The number of data bits used on the UART bus. Options: 5 to 8. Defaults to 8. - **parity** (*Optional*): The parity used on the UART bus. Options: ``NONE``, ``EVEN``, ``ODD``. Defaults to ``NONE``. @@ -258,6 +262,20 @@ Below are the methods to read current settings and modify them dynamically: This flexibility allows for dynamic adaptation to different communication requirements, enhancing the versatility of your ESPHome setup. +UART component with the host platform +------------------------------------- + +Since the host platform does not have physical UART pins, the UART component is implemented using Unix-style ports. Instead of using pins, +you can specify the port name to use. This implementation also supports components that have ``require_tx`` and ``require_rx`` options such as +smt100 etc. + +.. code-block:: yaml + + # Example configuration entry for host platform + uart: + baud_rate: 9600 + port: "/dev/ttyUSB0" + See Also -------- diff --git a/conf.py b/conf.py index f405aab40..280d91fa5 100644 --- a/conf.py +++ b/conf.py @@ -67,9 +67,9 @@ author = "ESPHome" # built documents. # # The short X.Y version. -version = "2024.6" +version = "2024.7" # The full version, including alpha/beta/rc tags. -release = "2024.6.6" +release = "2024.7.0b1" # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/guides/made_for_esphome.rst b/guides/made_for_esphome.rst index 4c1b92c8f..19e4674b5 100644 --- a/guides/made_for_esphome.rst +++ b/guides/made_for_esphome.rst @@ -34,11 +34,14 @@ For all projects - Your project is powered by an ESP32 or *supported* ESP32 variant such as the S2, S3, C3, etc. - Your ESPHome configuration is open source, available for end users to modify/update - Users should be able to apply updates if your project sells ready-made devices -- Your project supports adoption via the ``dashboard_import`` feature of ESPHome (see :doc:`Sharing `). In particular: +- Your project supports adoption via the ``dashboard_import`` feature of ESPHome (see + :doc:`Sharing `). In particular: + - There are **no** references to secrets or passwords - Network configuration must assume defaults (no static IPs or DNS configured) - - It **must** compile successfully without any user changes after adopting it. - - All configuration is contained within a single YAML file. Fully remote packages are permitted if using ``import_full_config: true``. + - The configuration **must** be valid, compile and run successfully *without any user changes* after adopting it. + - Use of remote packages in the YAML is permitted only if the above criteria are met. + - Your product name cannot contain "**ESPHome**" except in the case of *ending with* "**for ESPHome**" When your project matches all requirements of the Made for ESPHome program, diff --git a/guides/supporters.rst b/guides/supporters.rst index e585fde6e..b12964913 100644 --- a/guides/supporters.rst +++ b/guides/supporters.rst @@ -253,6 +253,7 @@ Contributors - `brtchip-tuannguyen (@brtchip-tuannguyen) `__ - `buddydvd (@buddydvd) `__ - `bulburDE (@bulburDE) `__ +- `Justin Bunton (@Bunton33) `__ - `Matt Burke (@burkemw3) `__ - `Jon Little (@burundiocibu) `__ - `buxtronix (@buxtronix) `__ @@ -331,6 +332,7 @@ Contributors - `Coenie Richards (@coenier) `__ - `Ashton Lafferty (@cogneato) `__ - `Colin Leroy-Mira (@colinleroy) `__ +- `Colm (@colmbuckley) `__ - `ColoMAX (@ColoMAX) `__ - `Max (@coltoncat) `__ - `Conclusio (@Conclusio) `__ @@ -393,6 +395,7 @@ Contributors - `Aliasghar Dashkhaneh (@dashkhaneh) `__ - `Sylwester (@DatanoiseTV) `__ - `Anthony Uk (@dataway) `__ +- `Datortarps (@Datortarp5) `__ - `Dav-id (@dav-id-org) `__ - `DAVe3283 (@DAVe3283) `__ - `DaveCorder (@DaveCorder) `__ @@ -430,6 +433,7 @@ Contributors - `Mickaël Le Baillif (@demikl) `__ - `denes44 (@denes44) `__ - `Dennis (@dennisvbussel) `__ +- `Denis Prokopenko (@denproc) `__ - `dentra (@dentra) `__ - `depasseg (@depasseg) `__ - `Davide Depau (@Depau) `__ @@ -641,6 +645,7 @@ Contributors - `Greg Cormier (@gcormier) `__ - `GeekVisit (@GeekVisit) `__ - `Ian Reinhart Geiser (@geiseri) `__ +- `Gene Hand (@genehand) `__ - `R Huish (@genestealer) `__ - `Geoff Davis (@geoffdavis) `__ - `Geoffrey Van Landeghem (@geoffrey-vl) `__ @@ -895,6 +900,7 @@ Contributors - `joskfg (@joskfg) `__ - `Joscha Wagner (@jowgn) `__ - `Javier Peletier (@jpeletier) `__ +- `Jan Rieger (@jrieger) `__ - `jsuanet (@jsuanet) `__ - `James Szalay (@jtszalay) `__ - `Jules-R (@Jules-R) `__ @@ -928,6 +934,7 @@ Contributors - `kbouchard111 (@kbouchard111) `__ - `Keith Burzinski (@kbx81) `__ - `Ken Piper (@Kealper) `__ +- `kecajtop (@kecajtop) `__ - `Tom Keller (@kellertk) `__ - `Kelvie Wong (@kelvie) `__ - `Kenny Stier (@KennyStier) `__ @@ -997,6 +1004,7 @@ Contributors - `lcavalli (@lcavalli) `__ - `Craig Fletcher (@leakypixel) `__ - `Dominik Wagenknecht (@LeDominik) `__ +- `leejoow (@leejoow) `__ - `Benny de Leeuw (@leeuwte) `__ - `Thayne (@Legot) `__ - `lein1013 (@lein1013) `__ @@ -1405,6 +1413,7 @@ Contributors - `pplucky (@pplucky) `__ - `Peter Provost (@PProvost) `__ - `Q. Marchi (@preeefix) `__ +- `PricelessToolkit (@PricelessToolkit) `__ - `Francesco Ciocchetti (@primeroz) `__ - `probonopd (@probonopd) `__ - `Gary Morris (@progrmr) `__ @@ -1791,6 +1800,7 @@ Contributors - `Aaron Mildenstein (@untergeek) `__ - `uPesy Electronics (@uPesy) `__ - `user897943 (@user897943) `__ +- `uSlackr (@uSlackr) `__ - `UT2UH (@UT2UH) `__ - `Vlad Yarotsky (@v-yarotsky) `__ - `Vc (@Valcob) `__ @@ -1893,4 +1903,4 @@ Contributors - `Christian Zufferey (@zuzu59) `__ - `Zynth-dev (@Zynth-dev) `__ -*This page was last updated July 3, 2024.* +*This page was last updated July 11, 2024.*