esphome-docs/components/sensor/tx20.rst

81 lines
2.8 KiB
ReStructuredText

TX20/TX23 Wind Speed/Direction Sensor
=====================================
.. seo::
:description: Instructions for setting up TX20/TX23 wind speed and direction sensors
:image: tx20.jpg
:keywords: TX20
The ``tx20`` sensor platform allows you to use your TX20/TX23
wind direction and speed sensors with ESPHome.
The only required pin is the black or brown cable (which is used to transmit data.)
The red cable should be connected to VCC (3.3V), green initiates the data transfer when connected to GND
and should therefore be directly connected to GND and the yellow cable should be always connected to ground.
The difference from the TX20 to the TX23 seems to be that the green cable does not matter any more and the
wind sensor is just sending a datagram every 2 seconds - pretty much the same as when the green cable was
connected to GND in the TX20.
.. figure:: images/tx20.jpg
:align: center
:width: 50.0%
TX20 / TX23 Wind Speed / Direction.
.. code-block:: yaml
# Example configuration entry
sensor:
- platform: tx20
wind_speed:
name: Wind speed
wind_direction_degrees:
name: Wind direction degrees
pin:
number: GPIOXX
Configuration variables:
------------------------
- **wind_speed** (**Required**): The information for the wind speed sensor.
All options from :ref:`Sensor <config-sensor>`.
- **wind_direction_degrees** (**Required**): The information for the direction
in degrees sensor.
All options from :ref:`Sensor <config-sensor>`.
- **pin** (**Required**, :ref:`config-pin`): The pin, where the black or brown
cable are connected.
.. note::
In order to create a text sensor to show the textual representation of the wind direction
the following config can be used. "tx20_id" needs to be replaced with the id of the TX20 sensor (**not** with the id of the subsensors).
.. code-block:: yaml
text_sensor:
- platform: template
name: "Textual Representation Wind Direction"
lambda: |-
return {id(tx20_id).get_wind_cardinal_direction()};
update_interval: 2s
.. note::
It appears that the manufacturer discontinued production of this sensor, as it doesn't seem to be available anymore for purchase.
There are various alternatives though, and since ESPHome has a :doc:`/components/modbus`, any model supporting RS485 connection
can be easily integrated.
Check out in the ESPHome Devices database example configurations for
`RS-FSJT-N01 Wind Speed <https://devices.esphome.io/devices/Renke-RS-FSJT-N01-Wind-Speed>`__ and
`RS-FXJT-N01 Wind Direction <https://devices.esphome.io/devices/Renke-RS-FXJT-N01-Wind-Direction>`__ sensors.
See Also
--------
- :ref:`sensor-filters`
- :apiref:`tx20/tx20.h`
- `Datagram Tx20 <http://www.sdpro.eu/jm/images/allegati/TX20_Documentazione.pdf>`__
- :ghedit:`Edit`