Skip to content

Commit

Permalink
Updating README
Browse files Browse the repository at this point in the history
  • Loading branch information
Edouard Andrieu de Levis authored and Delmael committed Jan 9, 2025
1 parent d16faa4 commit 58dff45
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 29 deletions.
33 changes: 5 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,37 +18,17 @@ Initial support is available for installation via HACS, as a [custom
repository].

## Configuration
**Note: currently only YAML-based configuration is supported, the UI-based
config flow is not yet implemented.**

Add a section like the following to your Home Assistant config.yaml:

```
smartbox:
accounts:
- api_name: <api name>
username: <api username>
password: <api password>
device_ids:
- <device id>
basic_auth_creds: <basic auth credentials>
```

You will need the following items of information:
* The API name for your heater vendor. This is visible in the 'API Host' entry
in the 'Version' menu item in the mobile app/web app. If the host name is of
the form `api-foo.xxxx` or `api.xxxx` use the values `api-foo` or `api`
respectively.
* Your username and password used for the mobile app/web app.
* Your smartbox device ID, which is shows as the 'Device ID Code' under My
Devices in the Home section of the mobile app/web app.
* Basic auth credentials: this is an HTTP Basic Auth credential used to do
initial authentication with the server. Use the base64 encoded string
directly. See 'Basic Auth Credential' section below for more details.

It's recommended that you store credentials using the built-in [Home Assistant
secrets management].

### Basic Auth Credential
Initial authentication to the smartbox REST API is protected by HTTP Basic Auth,
in addition to the user's username and password which are then used to obtain an
Expand All @@ -60,13 +40,10 @@ is not provided here and system owners need to find it themselves**.
You can also specify the following options (although they have reasonable defaults):

```
smartbox:
accounts:
- ...
session_retry_attempts: 8 # how many times to retry session REST operations
session_backoff_factor: 0.1 # how much to backoff between REST retries
socket_reconnect_attempts: 3 # how many times to try reconnecting the socket.io socket
socket_backoff_factor: 0.1 # how much to backoff between initial socket connect attempts
session_retry_attempts: 8 # how many times to retry session REST operations
session_backoff_factor: 0.1 # how much to backoff between REST retries
socket_reconnect_attempts: 3 # how many times to try reconnecting the socket.io socket
socket_backoff_factor: 0.1 # how much to backoff between initial socket connect attempts
```

### Use in energy dashboard
Expand All @@ -83,7 +60,7 @@ infrequent and so this won't be accurate.
```
sensor:
- platform: integration
source: sensor.living_room
source: sensor.living_room.energy
name: energy_living_room
unit_prefix: k
round: 2
Expand Down
2 changes: 1 addition & 1 deletion custom_components/smartbox/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"domain": "smartbox",
"name": "Smartbox",
"codeowners": ["@ajtudela"],
"codeowners": ["@ajtudela", "@Delmael"],
"config_flow": true,
"dependencies": [],
"documentation": "https://github.com/ajtudela/hass-smartbox",
Expand Down

0 comments on commit 58dff45

Please sign in to comment.