Skip to content

Commit

Permalink
Update docs and HACS metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
jkeljo committed May 30, 2023
1 parent d028642 commit 9d14439
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 38 deletions.
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# GreenEye Monitor (GEM)
# GreenEye Monitor (GEM) Custom Integration

[![GitHub Release][releases-shield]][releases]
[![GitHub Activity][commits-shield]][commits]
Expand All @@ -10,9 +10,16 @@
[![hacs][hacsbadge]][hacs]
[![Project Maintenance][maintenance-shield]][user_profile]

[![Discord][discord-shield]][discord]
[![Community Forum][forum-shield]][forum]

The [Brultech](https://brultech.com) integration for Home Assistant allows you to create sensors for the various data channels of Brultech ECM-1220, ECM-1240, and/or GreenEye Monitor (GEM) energy monitors. Each current transformer (CT) channel, pulse counter, and temperature sensor appears in Home Assistant as one or more sensors, and can be used in automations.

## Setup

1. Add this repository as a [custom repository](https://hacs.xyz/docs/faq/custom_repositories) for integrations in [HACS](https://hacs.xyz/docs/setup/download) by using this My button:
[![Add repository](https://my.home-assistant.io/badges/hacs_repository.svg)](https://my.home-assistant.io/redirect/hacs_repository/?owner=jkeljo&repository=hacs-greeneye-monitor&category=Integrations)
2. Further documentation is viewable in HACS, or by clicking [here](info.md)

## Contributions are welcome!

If you want to contribute to this please read the [Contribution guidelines](CONTRIBUTING.md)
Expand All @@ -30,10 +37,10 @@ Code template was mainly taken from [@Ludeeus](https://github.com/ludeeus)'s [in
[black-shield]: https://img.shields.io/badge/code%20style-black-000000.svg?style=for-the-badge
[commits-shield]: https://img.shields.io/github/commit-activity/y/jkeljo/hacs-greeneye-monitor.svg?style=for-the-badge
[commits]: https://github.com/jkeljo/hacs-greeneye-monitor/commits/main
[config]: https://my.home-assistant.io/redirect/config_flow_start?domain=brultech
[config-shield]: https://my.home-assistant.io/badges/config_flow_start.svg
[hacs]: https://hacs.xyz
[hacsbadge]: https://img.shields.io/badge/HACS-Custom-orange.svg?style=for-the-badge
[discord]: https://discord.gg/Qa5fW2R
[discord-shield]: https://img.shields.io/discord/330944238910963714.svg?style=for-the-badge
[forum-shield]: https://img.shields.io/badge/community-forum-brightgreen.svg?style=for-the-badge
[forum]: https://community.home-assistant.io/
[license-shield]: https://img.shields.io/github/license/jkeljo/hacs-greeneye-monitor.svg?style=for-the-badge
Expand Down
6 changes: 3 additions & 3 deletions hacs.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "GreenEye Monitor (GEM)",
"hacs": "1.6.0",
"domains": ["binary_sensor", "sensor", "switch"],
"hacs": "1.32.1",
"domains": ["number", "sensor"],
"iot_class": "Cloud Polling",
"homeassistant": "2023.3.6"
"homeassistant": "2023.5.2"
}
82 changes: 51 additions & 31 deletions info.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,57 +4,77 @@

[![hacs][hacsbadge]][hacs]
[![Project Maintenance][maintenance-shield]][user_profile]
[![BuyMeCoffee][buymecoffeebadge]][buymecoffee]

[![Discord][discord-shield]][discord]
[![Community Forum][forum-shield]][forum]

**This component will set up the following platforms.**

| Platform | Description |
| --------------- | ----------------------------------- |
| `binary_sensor` | Show something `True` or `False`. |
| `sensor` | Show info from API. |
| `switch` | Switch something `True` or `False`. |

![example][exampleimg]

{% if not installed %}

## Installation

1. Click install.
1. In the HA UI go to "Configuration" -> "Integrations" click "+" and search for "GreenEye Monitor (GEM)".
1. Click Download.
2. Restart Home Assistant
3. In the Home Assistant UI go to "Configuration" -> "Integrations" click "+" and search for "GreenEye Monitor (GEM)", or click the below My button:
[![Add integration](https://my.home-assistant.io/badges/config_flow_start.svg)](https://my.home-assistant.io/redirect/config_flow_start/?domain=greeneye_monitor)

## Migration from the built-in integration

This integration was derived from the built-in `greeneye_monitor` integration by its developer, [@jkeljo](https://github.com/jkeljo). This version of `greeneye_monitor` has a number of changes and enhancements relative to the built-in one, and is configured via the Home Assistant UI. The first time you launch Home Assistant, this integration will import your existing YAML configuration and entities, and you may then delete the YAML.

{% endif %}

## Configuration is done in the UI
## Entities

This integration creates entities as follows.

### Current transformer channels

Each current transformer channel will appear as a device with associated sensors for three different values:

- Energy (kWh) - this sensor is updated only once every 30 minutes and is usable with the Energy Dashboard
- Power (kW) - disabled by default
- Current (amps) - disabled by default, not created for ECM-1240 Aux channels

### Pulse counter channels

Each pulse counter channel will appear as a device with associated sensors for two different values:

- Pulse count - this sensor is updated only once every 30 minutes. The units and device type of this sensor are configured during setup of the integration. If a device type is set, this sensor may be used with the Energy Dashboard.
- Pulse rate - disabled by default. This sensor is updated as fast as the monitor sends new packets, and by default reports a rate as units per second. Units per minute or per hour may be selected after setup by clicking the Configure button in the integration.

### Temperature channels

Each temperature channel will appear as a device with a single a temperature sensor, disabled by default.

### Voltage channels

Each monitor's voltage sensor will appear as a device with a single voltage sensor entity, disabled by default.

### Configuration entities

If the GEM or ECM responds to API calls (that is, it is connected directly to your network and not a DashBox or other aggregator), a number of configuration entities will be created.

- The monitor itself will have a configuration entity for controlling the packet send rate.
- Each current channel device (except ECM-1240 Aux channels) will have configuration entities for setting the CT type and range.

<!---->
### ECM-1240 Aux 5

## Credits
During integration setup, you may select whether Aux 5 is used as a current channel or pulse counter channel.

This project was generated from [@oncleben31](https://github.com/oncleben31)'s [Home Assistant Custom Component Cookiecutter](https://github.com/oncleben31/cookiecutter-homeassistant-custom-component) template.
## Handling chatty entities

Code template was mainly taken from [@Ludeeus](https://github.com/ludeeus)'s [integration_blueprint][integration_blueprint] template
Entities that report instantaneous values like power, current, temperature, voltage, and pulse rate will be updated as fast as the monitor sends data, which is typically every few seconds. That's a lot of data, and the databases used by the [`recorder`](https://www.home-assistant.io/integrations/recorder) integration for history don't do well with that much data, so these entities are disabled by default. Before enabling any of them, it is recommended to configure the [`influxdb`](https://www.home-assistant.io/integrations/influxdb) integration and exclude the chatty entities from `recorder`.

---

[integration_blueprint]: https://github.com/custom-components/integration_blueprint
[buymecoffee]: https://www.buymeacoffee.com/ludeeus
[buymecoffeebadge]: https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg?style=for-the-badge
[commits-shield]: https://img.shields.io/github/commit-activity/y/jkeljo/hacs-greeneye-monitor-2.svg?style=for-the-badge
[commits]: https://github.com/jkeljo/hacs-greeneye-monitor-2/commits/main
[commits-shield]: https://img.shields.io/github/commit-activity/y/jkeljo/hacs-greeneye-monitor.svg?style=for-the-badge
[commits]: https://github.com/jkeljo/hacs-greeneye-monitor/commits/main
[hacs]: https://hacs.xyz
[hacsbadge]: https://img.shields.io/badge/HACS-Custom-orange.svg?style=for-the-badge
[discord]: https://discord.gg/Qa5fW2R
[discord-shield]: https://img.shields.io/discord/330944238910963714.svg?style=for-the-badge
[exampleimg]: example.png
[forum-shield]: https://img.shields.io/badge/community-forum-brightgreen.svg?style=for-the-badge
[forum]: https://community.home-assistant.io/
[license]: https://github.com/jkeljo/hacs-greeneye-monitor-2/blob/main/LICENSE
[license-shield]: https://img.shields.io/github/license/jkeljo/hacs-greeneye-monitor-2.svg?style=for-the-badge
[license]: https://github.com/jkeljo/hacs-greeneye-monitor/blob/main/LICENSE
[license-shield]: https://img.shields.io/github/license/jkeljo/hacs-greeneye-monitor.svg?style=for-the-badge
[maintenance-shield]: https://img.shields.io/badge/maintainer-%40jkeljo-blue.svg?style=for-the-badge
[releases-shield]: https://img.shields.io/github/release/jkeljo/hacs-greeneye-monitor-2.svg?style=for-the-badge
[releases]: https://github.com/jkeljo/hacs-greeneye-monitor-2/releases
[releases-shield]: https://img.shields.io/github/release/jkeljo/hacs-greeneye-monitor.svg?style=for-the-badge
[releases]: https://github.com/jkeljo/hacs-greeneye-monitor/releases
[user_profile]: https://github.com/jkeljo

0 comments on commit 9d14439

Please sign in to comment.