Skip to content

Commit

Permalink
Merge pull request #1 from brianhanifin/master
Browse files Browse the repository at this point in the history
File structure migration
  • Loading branch information
jrhorrisberger authored Apr 22, 2019
2 parents 66d3db0 + 01fd352 commit 8d2ea2b
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 14 deletions.
14 changes: 14 additions & 0 deletions custom_components.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"rainforest": {
"version": "0.2.0",
"local_location": "/custom_components/rainforest/sensor.py",
"remote_location": "https://raw.githubusercontent.com/jrhorrisberger/home-assistant/master/custom_components/rainforest/sensor.py",
"visit_repo": "https://github.com/jrhorrisberger/home-assistant/custom_components/rainforest/",
"changelog": "https://github.com/jrhorrisberger/home-assistant/custom_components/rainforest/",
"resources": [
"https://raw.githubusercontent.com/jrhorrisberger/home-assistant/master/custom_components/rainforest/__init__.py",
"https://raw.githubusercontent.com/jrhorrisberger/home-assistant/master/custom_components/rainforest/manifest.json",
"https://raw.githubusercontent.com/jrhorrisberger/home-assistant/master/custom_components/rainforest/sensor.py"
]
}
}
1 change: 1 addition & 0 deletions custom_components/rainforest/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Support for the Rainforest Automation Energy Monitoring Unit."""
8 changes: 8 additions & 0 deletions custom_components/rainforest/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"domain": "rainforest",
"name": "Rainforest",
"documentation": "https://github.com/jrhorrisberger/home-assistant/custom_components/rainforest/readme.md",
"dependencies": [],
"codeowners": ["@jrhorrisberger"],
"requirements": []
}
Original file line number Diff line number Diff line change
@@ -1,25 +1,29 @@
# EMU2 Meter Component
Place `emu2.py` in `config\custom_components\sensor\`
# Rainforest Energy Monitoring Component

## Overview
To use your Rainforest Automation EMU-2™ Energy Monitoring Unit in your installation, add the following to your `configuration.yaml` file:
To use your Rainforest Automation EMU-2™ Energy Monitoring Unit in Home Assistant follow the `Installation` and `Configuration` instructions.

## Installation
Place the following files in `config\custom_components\rainforest\`:
* [__`rainforest/__init__.py`__](./__init__.py)
* [__`rainforest/sensor.py`__](./sensor.py)
* [__`rainforest/manifest.json`__](./manifest.json)

## Configuraion
Add the following to your `configuration.yaml` file:

```yaml
# Example configuration.yaml entry
sensor:
- platform: emu2
- platform: rainforest
port: '/dev/ttyACM0'
```
## Configuraion
### port:
* description: The comm port which the meter is connected to.
* required: true
* type: string
### name:
* description: The name to use when displaying this sensor.
* required: false
Expand All @@ -29,4 +33,4 @@ sensor:
* https://github.com/smakonin/RAEdataset/blob/master/EMU2_reader.py
* https://github.com/home-assistant/home-assistant/blob/master/homeassistant/components/sensor/serial.py
* https://home-assistant.io/components/sensor.date_countdown/
* https://github.com/rainforestautomation/Emu-Serial-API
* https://github.com/rainforestautomation/Emu-Serial-API
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
"""
Use serial protocol of EMU2 meter to obtain state of the connected meter.
For more details about this component, please refer to the documentation
at https://home-assistant.io/components/sensor.emu2/
at https://github.com/jrhorrisberger/home-assistant/custom_components/rainforest
"""

from homeassistant.helpers.entity import Entity
import homeassistant.helpers.config_validation as cv
from homeassistant.components.sensor import PLATFORM_SCHEMA
from homeassistant.const import (
CONF_NAME, EVENT_HOMEASSISTANT_STOP)

import logging
import voluptuous as vol

from threading import Thread

__version__ = '0.2.0'

_LOGGER = logging.getLogger(__name__)

DOMAIN = "emu2"
DOMAIN = "rainforest"

DEFAULT_NAME = "EMU2 Instantaneous Power"
DEFAULT_NAME = "Rainforest Energy Monitoring Unit"
CONF_PORT = 'port'

ATTR_DEVICE_MAC_ID = "Device MAC ID"
Expand Down

0 comments on commit 8d2ea2b

Please sign in to comment.