Skip to content

Commit

Permalink
Update readme (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewturner authored Feb 26, 2024
1 parent 838cfea commit 732d3d3
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 16 deletions.
60 changes: 47 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Custom Components for Home-Assistant (http://www.home-assistant.io)

# Salus Thermostat Climate Component
My device is RT301i, it is working with it500 thermostat, the ideea is simple if you have a Salus Thermostat and you are able to login to salus-it500.com and control it from this page, this custom component should work.
My device is RT301i, it is working with it500 thermostat, the idea is simple if you have a Salus Thermostat and you are able to login to salus-it500.com and control it from this page, this custom component should work.

## Component to interface with the salus-it500.com.
It reads the Current Temperature, Set Temperature, Current HVAC Mode, Current Relay Mode.
Expand All @@ -12,24 +12,23 @@ Keep in mind this is my first custom component and this is also the first versio
**** This is not an official integration.

### Installation
* If not exist, in config/custom_components/ create a directory called salusfy
* Copy all files in salusfy to your config/custom_components/salusfy/ directory.
* Configure with config below.
* Restart Home-Assistant.
1. Clone the repo into the `home_assistant` directory
1. Change directory into the `salusfy` directory
1. Run install.sh (you may need to fix the line endings)
1. Configure with config below
1. Restart Home Assistant

### Usage
To use this component in your installation, add the following to your configuration.yaml file:

### Example configuration.yaml entry
#### Example configuration.yaml entry

```
climate:
- platform: salusfy
username: "EMAIL"
password: "PASSWORD"
id: "DEVICE_ID"
entity_id: "sensor.temperature"
access_token: "ha_long_lived_token"
```
![image](https://user-images.githubusercontent.com/33951255/140300295-4915a18f-f5d4-4957-b513-59d7736cc52a.png)
![image](https://user-images.githubusercontent.com/33951255/140303472-fd38b9e4-5c33-408f-afef-25547c39551c.png)
Expand All @@ -43,10 +42,45 @@ climate:
![image](https://user-images.githubusercontent.com/33951255/140301260-151b6af9-dbc4-4e90-a14e-29018fe2e482.png)


### Known issues
Due to how chatty the HA integration is, the salus-it500.com server may start blocking your public IP address (and rightly so). This will prevent the gateway and mobile client from connecting. This implementation aims to resolve this by:
### Separate Temperature Client
Due to how chatty Home Assistant integrations are, the salus-it500.com server may start blocking your public IP address. This will prevent the gateway and mobile client from connecting. To resolve this, you can use the `TemperatureClient` which:

* suppressing requests to Salus in many circumstances
* querying another entity for current temperature
* suppresses requests to Salus for reading the current temperature
* queries another Home Assistant entity for current temperature via the HA API

The effect of this is that the target temperature/status values may be out of date if it has been outside of HA, but the main control features (target temperature, set status etc) will still work.
The effect of this is that the target temperature/mode values may be out of date **if they have been updated outside of HA**, but the main control features (target temperature, set mode etc) will still work.

To enable the `TemperatureClient`, set the following settings in `climate.yaml`:

```
climate:
- platform: salusfy
username: "EMAIL"
password: "PASSWORD"
id: "DEVICE_ID"
enable_temperature_client: True
host: "your-home-assistant-ip-address"
entity_id: "sensor.your-temperature-sensor"
access_token: "your-HA-access-token"
```

### Running Locally

You can exercise the integration locally using the `run.py` which calls the code on your local machine as if it was being run within Home Assistant. This can help debug any issues you may be having without waiting for multiple Home Assistant restarts.

To get going:

1. Copy `config.sample.py` to `config.py`
1. Replace the config (below) with the appropriate values for your installation
1. Run `python ./run.py`

Feel free to change the code to exercise different methods and configuration.

#### Example config.py

```
ENABLE_TEMPERATURE_CLIENT = True
HOST = "your-home-assistant-ip-address"
ENTITY_ID = "sensor.your-temperature-sensor"
ACCESS_TOKEN = "your-HA-access-token"
```
8 changes: 5 additions & 3 deletions config.sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
PASSWORD = "replace"
DEVICE_ID = "replace"

SIMULATOR = True
ENABLE_TEMPERATURE_CLIENT = True
HOST = "192.168.0.9"
SIMULATOR = False
ENABLE_TEMPERATURE_CLIENT = False
HOST = "your-home-assistant-ip-address"
ENTITY_ID = "sensor.your-temperature-sensor"
ACCESS_TOKEN = "your-HA-access-token"

0 comments on commit 732d3d3

Please sign in to comment.