Power Meter Cookbook entry
@ -9,12 +9,12 @@ sensors to a single pin and use them all at once.
|
|||||||
|
|
||||||
To initialize a sensor, first supply either ``address`` **or** ``index`` to identify the sensor.
|
To initialize a sensor, first supply either ``address`` **or** ``index`` to identify the sensor.
|
||||||
|
|
||||||
.. figure:: images/ds18b20-full.jpg
|
.. figure:: images/dallas-wired.jpg
|
||||||
:align: center
|
:align: center
|
||||||
:target: `Adafruit`_
|
:target: `Adafruit`_
|
||||||
:width: 50.0%
|
:width: 50.0%
|
||||||
|
|
||||||
DS18b20 One-Wire Temperature Sensor. Image by `Adafruit`_.
|
Wired Version of the DS18b20 One-Wire Temperature Sensor.
|
||||||
|
|
||||||
.. _Adafruit: https://www.adafruit.com/product/374
|
.. _Adafruit: https://www.adafruit.com/product/374
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 615 KiB After Width: | Height: | Size: 113 KiB |
BIN
esphomeyaml/components/sensor/images/dallas-wired.jpg
Normal file
After Width: | Height: | Size: 137 KiB |
Before Width: | Height: | Size: 231 KiB |
Before Width: | Height: | Size: 935 KiB |
Before Width: | Height: | Size: 826 KiB After Width: | Height: | Size: 205 KiB |
BIN
esphomeyaml/components/sensor/images/ultrasonic-full.jpg
Normal file
After Width: | Height: | Size: 214 KiB |
@ -17,7 +17,7 @@ timeout option which specifies how long to wait for values. During this
|
|||||||
timeout period the whole core will be blocked and therefore shouldn’t be
|
timeout period the whole core will be blocked and therefore shouldn’t be
|
||||||
set too high.
|
set too high.
|
||||||
|
|
||||||
.. figure:: images/hc-sr04-full.jpg
|
.. figure:: images/ultrasonic-full.jpg
|
||||||
:align: center
|
:align: center
|
||||||
:width: 50.0%
|
:width: 50.0%
|
||||||
|
|
||||||
|
@ -3,3 +3,4 @@ PIR Sensor, cookbook/pir, pir.jpg
|
|||||||
Relay, cookbook/relay, relay.jpg
|
Relay, cookbook/relay, relay.jpg
|
||||||
BRUH Multisensor, cookbook/bruh, bruh.png
|
BRUH Multisensor, cookbook/bruh, bruh.png
|
||||||
TEMT6000, cookbook/temt6000, temt6000.jpg
|
TEMT6000, cookbook/temt6000, temt6000.jpg
|
||||||
|
Non-Invasive Power Meter, cookbook/power_meter, power_meter.jpg
|
||||||
|
|
BIN
esphomeyaml/cookbook/images/power_meter-header.jpg
Normal file
After Width: | Height: | Size: 326 KiB |
BIN
esphomeyaml/cookbook/images/temt6000-header.jpg
Normal file
After Width: | Height: | Size: 64 KiB |
BIN
esphomeyaml/cookbook/images/temt6000-pins.jpg
Normal file
After Width: | Height: | Size: 58 KiB |
@ -8,3 +8,4 @@ Cookbook
|
|||||||
bruh
|
bruh
|
||||||
temt6000
|
temt6000
|
||||||
relay
|
relay
|
||||||
|
power_meter
|
||||||
|
48
esphomeyaml/cookbook/power_meter.rst
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
Non-Invasive Power Meter
|
||||||
|
========================
|
||||||
|
|
||||||
|
So an essential part of making your home smart is knowing how much power it uses over
|
||||||
|
the day. Tracking this can be difficult, often you need to install a completely new
|
||||||
|
power meter which can often cost a bunch of money. However, quite a few power meters
|
||||||
|
have a red LED on the front that blinks every time that one Wh has been used.
|
||||||
|
|
||||||
|
The simple idea therefore is: Why don't we just abuse that functionality to make the power-meter
|
||||||
|
IoT enabled? We just have to hook up a simple photoresistor in front of that aforementioned
|
||||||
|
LED and track the amount of pulses we receive. Then using esphomelib we can instantly have
|
||||||
|
the power meter show up in Home Assistant 🎉
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
This guide currently only works with the ESP32, and even if it is ported back to the ESP8266
|
||||||
|
at some point, the ESP32 will still achieve a much higher accuracy because it has a
|
||||||
|
hardware-based pulse counter.
|
||||||
|
|
||||||
|
Hooking it all up is quite easy: Just buy a suitable photoresistor (make sure the wave length
|
||||||
|
approximately matches the one from your power meter). Then connect it using a simple variable
|
||||||
|
resistor divider (see `this article <https://blog.udemy.com/arduino-ldr/>`__ for inspiration).
|
||||||
|
And... that should already be it :)
|
||||||
|
|
||||||
|
.. figure:: images/power_meter-header.jpg
|
||||||
|
:align: center
|
||||||
|
:width: 80.0%
|
||||||
|
|
||||||
|
For esphomelib, you can then use the
|
||||||
|
:doc:`pulse counter sensor </esphomeyaml/components/sensor/pulse_counter>` using below configuration:
|
||||||
|
|
||||||
|
.. code:: yaml
|
||||||
|
|
||||||
|
sensor:
|
||||||
|
- platform: pulse_counter
|
||||||
|
pin: GPIO12
|
||||||
|
unit_of_measurement: 'kW'
|
||||||
|
name: 'Power Meter'
|
||||||
|
filters:
|
||||||
|
- multiply: 0.06
|
||||||
|
|
||||||
|
Adjust ``GPIO12`` to match your set up of course. The output from the pulse counter sensor is in
|
||||||
|
``pulses/min`` and we also know that 1000 pulses from the LED should equal 1kWh of power usage.
|
||||||
|
Thus, rearranging the expression yields a proportional factor of ``0.06`` from ``pulses/min`` to
|
||||||
|
``kW``.
|
||||||
|
|
||||||
|
And if a technician shows up and he looks confused about what the heck you have done to your
|
||||||
|
power meter, tell them about esphomelib 😉
|
@ -8,9 +8,13 @@ often have a small constant value resistor and three pins: ``GND``, ``VCC`` and
|
|||||||
``SIG``. Connect ``VCC`` to ``3.3V``, ``GND`` to ``GND`` and ``SIG`` to any
|
``SIG``. Connect ``VCC`` to ``3.3V``, ``GND`` to ``GND`` and ``SIG`` to any
|
||||||
available :doc:`analog pin </esphomeyaml/components/sensor/adc>`.
|
available :doc:`analog pin </esphomeyaml/components/sensor/adc>`.
|
||||||
|
|
||||||
|
.. figure:: images/temt6000-header.jpg
|
||||||
|
:align: center
|
||||||
|
:width: 75.0%
|
||||||
|
|
||||||
To get the brightness the sensor measures, we then simply have to measure the voltage
|
To get the brightness the sensor measures, we then simply have to measure the voltage
|
||||||
on the ``SIG`` pin using the :doc:`/esphomeyaml/components/sensor/adc` and convert those
|
on the ``SIG`` (also called ``OUT``) pin using the :doc:`/esphomeyaml/components/sensor/adc`
|
||||||
voltage measurements to illuminance values in lux using a forumla:
|
and convert those voltage measurements to illuminance values in lux using a formula:
|
||||||
|
|
||||||
.. code:: yaml
|
.. code:: yaml
|
||||||
|
|
||||||
@ -23,6 +27,13 @@ voltage measurements to illuminance values in lux using a forumla:
|
|||||||
- lambda: >-
|
- lambda: >-
|
||||||
return (x / 10000.0) * 2000000.0;
|
return (x / 10000.0) * 2000000.0;
|
||||||
|
|
||||||
|
.. figure:: images/temt6000-pins.jpg
|
||||||
|
:align: center
|
||||||
|
:width: 75.0%
|
||||||
|
|
||||||
|
Pins on the TEMT6000. Connect ``OUT`` to an ADC pin, ``GND`` to ``GND``, and ``VCC``
|
||||||
|
to ``3.3V``
|
||||||
|
|
||||||
Formula Explanation:
|
Formula Explanation:
|
||||||
^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
BIN
esphomeyaml/images/dallas.jpg
Normal file
After Width: | Height: | Size: 8.2 KiB |
Before Width: | Height: | Size: 20 KiB |
BIN
esphomeyaml/images/power_meter.jpg
Normal file
After Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 98 KiB After Width: | Height: | Size: 30 KiB |
@ -227,7 +227,7 @@ Sensor Components
|
|||||||
.. |BMP085| image:: /esphomeyaml/images/bmp180.jpg
|
.. |BMP085| image:: /esphomeyaml/images/bmp180.jpg
|
||||||
:class: component-image
|
:class: component-image
|
||||||
.. _BMP085: /esphomeyaml/components/sensor/bmp085.html
|
.. _BMP085: /esphomeyaml/components/sensor/bmp085.html
|
||||||
.. |Dallas| image:: /esphomeyaml/images/ds18b20.jpg
|
.. |Dallas| image:: /esphomeyaml/images/dallas.jpg
|
||||||
:class: component-image
|
:class: component-image
|
||||||
.. _Dallas: /esphomeyaml/components/sensor/dallas.html
|
.. _Dallas: /esphomeyaml/components/sensor/dallas.html
|
||||||
.. |DHT| image:: /esphomeyaml/images/dht22.jpg
|
.. |DHT| image:: /esphomeyaml/images/dht22.jpg
|
||||||
@ -474,7 +474,7 @@ Misc Components
|
|||||||
`ESP32 BLE Hub`_ `ESP32 Touch Hub`_
|
`ESP32 BLE Hub`_ `ESP32 Touch Hub`_
|
||||||
============================== ============================== ==============================
|
============================== ============================== ==============================
|
||||||
|
|
||||||
.. |Dallas Hub| image:: /esphomeyaml/images/ds18b20.jpg
|
.. |Dallas Hub| image:: /esphomeyaml/images/dallas.jpg
|
||||||
:class: component-image
|
:class: component-image
|
||||||
.. _Dallas Hub: /esphomeyaml/components/dallas.html
|
.. _Dallas Hub: /esphomeyaml/components/dallas.html
|
||||||
.. |IR Transmitter Hub| image:: /esphomeyaml/images/remote.svg
|
.. |IR Transmitter Hub| image:: /esphomeyaml/images/remote.svg
|
||||||
@ -510,9 +510,9 @@ This list contains items that are technically already supported by other compone
|
|||||||
-------------------------------------------------- -------------------------------------------------- --------------------------------------------------
|
-------------------------------------------------- -------------------------------------------------- --------------------------------------------------
|
||||||
`Garage Door`_ `PIR Sensor`_ `Relay`_
|
`Garage Door`_ `PIR Sensor`_ `Relay`_
|
||||||
-------------------------------------------------- -------------------------------------------------- --------------------------------------------------
|
-------------------------------------------------- -------------------------------------------------- --------------------------------------------------
|
||||||
|BRUH Multisensor|_ |TEMT6000|_
|
|BRUH Multisensor|_ |TEMT6000|_ |Non-Invasive Power Meter|_
|
||||||
-------------------------------------------------- -------------------------------------------------- --------------------------------------------------
|
-------------------------------------------------- -------------------------------------------------- --------------------------------------------------
|
||||||
`BRUH Multisensor`_ `TEMT6000`_
|
`BRUH Multisensor`_ `TEMT6000`_ `Non-Invasive Power Meter`_
|
||||||
================================================== ================================================== ==================================================
|
================================================== ================================================== ==================================================
|
||||||
|
|
||||||
.. |Garage Door| image:: /esphomeyaml/images/window-open.svg
|
.. |Garage Door| image:: /esphomeyaml/images/window-open.svg
|
||||||
@ -530,6 +530,9 @@ This list contains items that are technically already supported by other compone
|
|||||||
.. |TEMT6000| image:: /esphomeyaml/images/temt6000.jpg
|
.. |TEMT6000| image:: /esphomeyaml/images/temt6000.jpg
|
||||||
:class: component-image
|
:class: component-image
|
||||||
.. _TEMT6000: /esphomeyaml/cookbook/temt6000.html
|
.. _TEMT6000: /esphomeyaml/cookbook/temt6000.html
|
||||||
|
.. |Non-Invasive Power Meter| image:: /esphomeyaml/images/power_meter.jpg
|
||||||
|
:class: component-image
|
||||||
|
.. _Non-Invasive Power Meter: /esphomeyaml/cookbook/power_meter.html
|
||||||
|
|
||||||
Do you have other awesome automations or 2nd order components? Please feel free to add them to the
|
Do you have other awesome automations or 2nd order components? Please feel free to add them to the
|
||||||
documentation for others to copy. See :doc:`Contributing <guides/contributing>`.
|
documentation for others to copy. See :doc:`Contributing <guides/contributing>`.
|
||||||
|
@ -5,7 +5,7 @@ BH1750, components/sensor/bh1750, bh1750.jpg
|
|||||||
BME280, components/sensor/bme280, bme280.jpg
|
BME280, components/sensor/bme280, bme280.jpg
|
||||||
BME680, components/sensor/bme680, bme680.jpg
|
BME680, components/sensor/bme680, bme680.jpg
|
||||||
BMP085, components/sensor/bmp085, bmp180.jpg
|
BMP085, components/sensor/bmp085, bmp180.jpg
|
||||||
Dallas, components/sensor/dallas, ds18b20.jpg
|
Dallas, components/sensor/dallas, dallas.jpg
|
||||||
DHT, components/sensor/dht, dht22.jpg
|
DHT, components/sensor/dht, dht22.jpg
|
||||||
DHT12, components/sensor/dht12, dht12.jpg
|
DHT12, components/sensor/dht12, dht12.jpg
|
||||||
ESP32 Hall Sensor, components/sensor/esp32_hall, magnet.svg
|
ESP32 Hall Sensor, components/sensor/esp32_hall, magnet.svg
|
||||||
|
|