Skip to content

Commit

Permalink
#33 updated documentation especially for use with Resol KM1
Browse files Browse the repository at this point in the history
  • Loading branch information
dm82m committed Sep 2, 2023
1 parent 8b02d96 commit 1bcb26b
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 13 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

# hass-Deltasol-KM2

Custom component for retrieving sensor information from Resol KM2 or DL2/DL3 or VBus/LAN or VBus/USB. This component automatically determines if you are using KM2 or DL2/DL3 device and can also be set up to work with VBus/LAN or VBus/USB.
Custom component for retrieving sensor information from Resol KM1/KM2 or DL2/DL3 or VBus/LAN or VBus/USB. This component automatically determines if you are using KM1/KM2 or DL2/DL3 device and can also be set up to work with VBus/LAN or VBus/USB.
Component uses webservice to get all the sensor data and makes it available in [Home Assistant](https://home-assistant.io/).

## Installation
Expand Down Expand Up @@ -35,6 +35,8 @@ custom_components

## Configuration

In any case, try to ensure to have the latest firmware running on your Resol device.

### KM2 and DL2/DL3

It works out-of-the-box, the only thing that is needed is the configuration described next.
Expand All @@ -57,7 +59,7 @@ sensor:
password: your_password
```
### VBus/LAN and VBus/USB
### KM1, VBus/LAN and VBus/USB
There is one prerequisite before it works. You need to run the resol-vbus [json-live-data-server](https://github.com/danielwippermann/resol-vbus/tree/master/examples/json-live-data-server). To do so you have at least two possibilities:
1. Run the server as an HAOS add-on, continue [here](https://github.com/dm82m/hassio-addons/tree/main/resol-vbus).
Expand Down
2 changes: 1 addition & 1 deletion custom_components/deltasol/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
""" The Resol KM2, DL2/DL3, VBus/LAN, VBus/USB component. """
""" The Resol KM1/KM2, DL2/DL3, VBus/LAN, VBus/USB component. """
4 changes: 2 additions & 2 deletions custom_components/deltasol/const.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
""" Constants for the Resol KM2, DL2/DL3, VBus/LAN, VBus/USB component. """
""" Constants for the Resol KM1/KM2, DL2/DL3, VBus/LAN, VBus/USB component. """
import logging

_LOGGER = logging.getLogger('custom_components.deltasol')
DOMAIN = "deltasol"
DEFAULT_NAME = "Resol KM2, DL2/DL3, VBus/LAN, VBus/USB"
DEFAULT_NAME = "Resol KM1/KM2, DL2/DL3, VBus/LAN, VBus/USB"
DEFAULT_TIMEOUT = 60
4 changes: 2 additions & 2 deletions custom_components/deltasol/deltasolapi.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Gets sensor data from Resol KM2, DL2/DL3, VBus/LAN, VBus/USB using api.
Gets sensor data from Resol KM1/KM2, DL2/DL3, VBus/LAN, VBus/USB using api.
Author: dm82m
https://github.com/dm82m/hass-Deltasol-KM2
"""
Expand All @@ -17,7 +17,7 @@
DeltasolEndpoint = namedtuple('DeltasolEndpoint', 'name, value, unit, description, bus_dest, bus_src')

class DeltasolApi(object):
""" Wrapper class for Resol KM2, DL2/DL3, VBus/LAN, VBus/USB. """
""" Wrapper class for Resol KM1/KM2, DL2/DL3, VBus/LAN, VBus/USB. """

def __init__(self, username, password, host, api_key):
self.data = None
Expand Down
4 changes: 2 additions & 2 deletions custom_components/deltasol/manifest.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"domain": "deltasol",
"name": "Resol KM2, DL2/DL3, VBus/LAN, VBus/USB",
"name": "Resol KM1/KM2, DL2/DL3, VBus/LAN, VBus/USB",
"documentation": "https://github.com/dm82m/hass-deltasol-KM2",
"issue_tracker": "https://github.com/dm82m/hass-deltasol-KM2/issues",
"dependencies": [],
"version": "0.3.2",
"version": "0.3.3",
"codeowners": [
"@dm82m"
],
Expand Down
6 changes: 3 additions & 3 deletions custom_components/deltasol/sensor.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Gets sensor data from Resol KM2, DL2/DL3, VBus/LAN, VBus/USB using api.
Gets sensor data from Resol KM1/KM2, DL2/DL3, VBus/LAN, VBus/USB using api.
Author: dm82m
https://github.com/dm82m/hass-Deltasol-KM2
Expand Down Expand Up @@ -68,12 +68,12 @@ async def update_unique_ids(hass, data):


async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
""" Setup the Resol KM2, DL2/DL3, VBus/LAN, VBus/USB sensors. """
""" Setup the Resol KM1/KM2, DL2/DL3, VBus/LAN, VBus/USB sensors. """

api = DeltasolApi(config.get(CONF_USERNAME), config.get(CONF_PASSWORD), config.get(CONF_HOST), config.get(CONF_API_KEY))

async def async_update_data():
""" Fetch data from the Resol KM2, DL2/DL3, VBus/LAN, VBus/USB. """
""" Fetch data from the Resol KM1/KM2, DL2/DL3, VBus/LAN, VBus/USB. """
async with async_timeout.timeout(DEFAULT_TIMEOUT):
try:
data = await hass.async_add_executor_job(api.fetch_data)
Expand Down
2 changes: 1 addition & 1 deletion hacs.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "Resol KM2, DL2/DL3, VBus/LAN, VBus/USB",
"name": "Resol KM1/KM2, DL2/DL3, VBus/LAN, VBus/USB",
"domains": [
"sensor"
],
Expand Down

0 comments on commit 1bcb26b

Please sign in to comment.