Skip to content

Emontx component documentation #5004

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 36 commits into
base: next
Choose a base branch
from
Draft

Emontx component documentation #5004

wants to merge 36 commits into from

Conversation

FredM67
Copy link

@FredM67 FredM67 commented Jun 17, 2025

Description:

Documentation for the new component Emontx

Related issue (if applicable): fixes

Pull request in esphome with YAML changes (if applicable):

Checklist:

  • I am merging into next because this is new documentation that has a matching pull-request in esphome as linked above.
    or

  • I am merging into current because this is a fix, change and/or adjustment in the current documentation and is not for a new component or feature.

  • Link added in /components/index.rst when creating new documents for new components or cookbook.

Copy link

netlify bot commented Jun 17, 2025

Deploy Preview for esphome ready!

Name Link
🔨 Latest commit 0392f1c
🔍 Latest deploy log https://app.netlify.com/projects/esphome/deploys/685e4723c8bc6d0008af475e
😎 Deploy Preview https://deploy-preview-5004--esphome.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Component/Hub
-------------

The ``emontx`` component allows you to use an EmonTx device with ESPHome.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

allows you to use ESPHome to create a connection to an OpenEnergyMonitor emonTX via a supported device (ESP32 recommended).

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed


The ``emontx`` component allows you to use an EmonTx device with ESPHome.
This component is a global hub that establishes the connection to the EmonTx via :ref:`UART <uart>` and translates the received data.
Using the :ref:`emontx sensors <emontx-sensors>`, you can then create sensors for Home Assistant that track voltage, current, power, and temperature readings from the EmonTx.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can then create sensors for Home Assistant that track voltage, current, power as measured by CTs (up to 12), pulse data, and temperature depending on the configuration of the emonTX.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

The ``emontx`` component allows you to use an EmonTx device with ESPHome.
This component is a global hub that establishes the connection to the EmonTx via :ref:`UART <uart>` and translates the received data.
Using the :ref:`emontx sensors <emontx-sensors>`, you can then create sensors for Home Assistant that track voltage, current, power, and temperature readings from the EmonTx.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The component can send data to an MQTT Broker either as JSON or as individual topics to be consumed by any system.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

This component is a global hub that establishes the connection to the EmonTx via :ref:`UART <uart>` and translates the received data.
Using the :ref:`emontx sensors <emontx-sensors>`, you can then create sensors for Home Assistant that track voltage, current, power, and temperature readings from the EmonTx.

This component can also be used to send data to an `emoncms <https://emoncms.org/>`_ system via HTTP or MQTT. Working directly with emoncms seamlessly is a key benefit of this component, allowing you to integrate your energy monitoring data with powerful visualization and analysis tools.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This component can also be used to send data to a remote emoncms instance such as emoncms.org by HTTP or a locally hosted system via HTTP or MQTT.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed


OpenEnergyMonitor EmonTx5.

As the communication with the EmonTx is done using UART, you need to have an :ref:`UART bus <uart>` in your configuration with the ``rx_pin`` connected to the data pin of the EmonTx and with the baud rate set to 115200.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possibly a key point that this component can only receive data not send it.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It cannot send data yet, but I could implement it.... We've just to define what to send, and specially how.
No idea if it's possible to implement a UI similar to what exists through https://openenergymonitor.org/serial/.


- **emoncms_server** (**Required**): The URL of the emoncms server.
- **api_key** (**Required**, string): The API write key for the emoncms server.
- **node** (**Required**, string): The node ID to use for the emoncms server.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add - (number or text).

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's already a note in the Emoncms Integration section.

- **emoncms** (*Optional*): For forwarding data to an `emoncms` server.

- **emoncms_server** (**Required**): The URL of the emoncms server.
- **api_key** (**Required**, string): The API write key for the emoncms server.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

generally referred to as the Read/Write key, not just the write key.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed


- **mqtt** (*Optional*): For forwarding data to an MQTT broker, including emoncms via MQTT.

- **topic_prefix** (**Required**, string): The MQTT topic prefix to use for publishing data.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in MQTT terms this is the base topic.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here, I wanted to make things even flexibler. A base topic, then "device" topic.
Add also a boolean like "categorize" to sort powers under power, voltages under voltage, ...
Good or bad idea ?
We've to find beyond emoncms, perhaps Jeedom users want it like this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I meant that technically, rather than the 'topic prefix' in MQTT terms, the description is the 'base' topic.

Copy link
Contributor

@borpin borpin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docs look great to me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants