diff --git a/esphomeyaml/components/sensor/esp32_hall.rst b/esphomeyaml/components/sensor/esp32_hall.rst new file mode 100644 index 000000000..ae0336d4c --- /dev/null +++ b/esphomeyaml/components/sensor/esp32_hall.rst @@ -0,0 +1,49 @@ +ESP32 Hall Sensor +================= + +The ``esp32_hall`` sensor platform allows you to use the integrated +`hall effect sensor `__ of the +ESP32 chip to measure the magnitude and direction of magnetic field around the +chip (with quite poor accuracy). + +Please make sure that nothing is connected to pins ``GPIO36`` and ``GPIO39`` if this +component is enabled, as those pins are used for the internal low-noise amplifier used +by the hall sensor. + +.. figure:: images/esp32_hall-ui.png + :align: center + :width: 80.0% + +.. code:: yaml + + # Example configuration entry + sensor: + - platform: esp32_hall + name: "ESP32 Hall Sensor" + update_interval: 15s + +Configuration variables: +~~~~~~~~~~~~~~~~~~~~~~~~ + +- **name** (**Required**, string): The name of the hall effect sensor. +- **update_interval** (*Optional*, :ref:`config-time`): The interval + to check the sensor. Defaults to ``15s``. See :ref:`sensor-default_filter`. +- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation. +- All other options from :ref:`Sensor ` and :ref:`MQTT Component `. + +.. warning:: + + The values this sensor outputs were only calibrated with a few magnets and no real "truth" sensor. + Therefore the values could very well be off by orders of magnitude. Besides, this sensor should + only be used to detect sudden high changes in the magnetic field. + + If you have a real magnetic field calibration setup and want to contribute your values to esphomelib, + please feel free to do so 😺. + +See Also +^^^^^^^^ + +- :ref:`sensor-filters` +- :doc:`adc` +- :doc:`/esphomeyaml/devices/esp32` +- :doc:`API Reference ` diff --git a/esphomeyaml/components/sensor/images/esp32_hall-ui.png b/esphomeyaml/components/sensor/images/esp32_hall-ui.png new file mode 100644 index 000000000..f061c9cfb Binary files /dev/null and b/esphomeyaml/components/sensor/images/esp32_hall-ui.png differ diff --git a/esphomeyaml/components/sensor/index.rst b/esphomeyaml/components/sensor/index.rst index 25960cda0..81018e55c 100644 --- a/esphomeyaml/components/sensor/index.rst +++ b/esphomeyaml/components/sensor/index.rst @@ -288,3 +288,4 @@ See Also rotary_encoder.rst template.rst max6675.rst + esp32_hall.rst diff --git a/esphomeyaml/images/magnet.svg b/esphomeyaml/images/magnet.svg new file mode 100644 index 000000000..af176f1c9 --- /dev/null +++ b/esphomeyaml/images/magnet.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/esphomeyaml/index.rst b/esphomeyaml/index.rst index 3f2b88f32..5a507abea 100644 --- a/esphomeyaml/index.rst +++ b/esphomeyaml/index.rst @@ -182,21 +182,21 @@ Sensor Components -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- `BMP085`_ `Dallas`_ `DHT`_ -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -|DHT12|_ |HDC1080|_ |HTU21D|_ +|DHT12|_ |ESP32 Hall Sensor|_ |HDC1080|_ -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -`DHT12`_ `HDC1080`_ `HTU21D`_ +`DHT12`_ `ESP32 Hall Sensor`_ `HDC1080`_ -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -|MAX6675|_ |MPU6050|_ |Pulse Counter|_ +|HTU21D|_ |MAX6675|_ |MPU6050|_ -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -`MAX6675`_ `MPU6050`_ `Pulse Counter`_ +`HTU21D`_ `MAX6675`_ `MPU6050`_ -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -|Rotary Encoder|_ |SHT3X-D|_ |Template Sensor|_ +|Pulse Counter|_ |Rotary Encoder|_ |SHT3X-D|_ -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -`Rotary Encoder`_ `SHT3X-D`_ `Template Sensor`_ +`Pulse Counter`_ `Rotary Encoder`_ `SHT3X-D`_ -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -|TSL2561|_ |Ultrasonic Sensor|_ +|Template Sensor|_ |TSL2561|_ |Ultrasonic Sensor|_ -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -`TSL2561`_ `Ultrasonic Sensor`_ +`Template Sensor`_ `TSL2561`_ `Ultrasonic Sensor`_ ================================================== ================================================== ================================================== .. |Sensor Core| image:: /esphomeyaml/images/folder-open.svg @@ -229,6 +229,9 @@ Sensor Components .. |DHT12| image:: /esphomeyaml/images/dht12.jpg :class: component-image .. _DHT12: /esphomeyaml/components/sensor/dht12.html +.. |ESP32 Hall Sensor| image:: /esphomeyaml/images/magnet.svg + :class: component-image +.. _ESP32 Hall Sensor: /esphomeyaml/components/sensor/esp32_hall.html .. |HDC1080| image:: /esphomeyaml/images/HDC1080.jpg :class: component-image .. _HDC1080: /esphomeyaml/components/sensor/hdc1080.html diff --git a/esphomeyaml/sensor.csv b/esphomeyaml/sensor.csv index db8c554ce..0fd2e5b89 100644 --- a/esphomeyaml/sensor.csv +++ b/esphomeyaml/sensor.csv @@ -8,6 +8,7 @@ BMP085, components/sensor/bmp085, bmp180.jpg Dallas, components/sensor/dallas, ds18b20.jpg DHT, components/sensor/dht, dht22.jpg DHT12, components/sensor/dht12, dht12.jpg +ESP32 Hall Sensor, components/sensor/esp32_hall, magnet.svg HDC1080, components/sensor/hdc1080, HDC1080.jpg HTU21D, components/sensor/htu21d, htu21d.jpg MAX6675, components/sensor/max6675, max6675.jpg