From e8c680c2a5974373e71a1c8a72be70fa43b56f12 Mon Sep 17 00:00:00 2001 From: Duco Sebel <74970928+DCSBL@users.noreply.github.com> Date: Wed, 3 Dec 2025 10:35:56 +0100 Subject: [PATCH 01/16] Update batteries documentation with new parameters --- docs/v2/batteries.mdx | 99 ++++++++++++++++++++++++++++++++++++++----- 1 file changed, 89 insertions(+), 10 deletions(-) diff --git a/docs/v2/batteries.mdx b/docs/v2/batteries.mdx index b827e3f..34c792c 100644 --- a/docs/v2/batteries.mdx +++ b/docs/v2/batteries.mdx @@ -24,21 +24,42 @@ The `/api/batteries` endpoint can be used to retrieve information about the cont ## Parameters -| Data | Type | Access | Description | -| ----------------- | ------ | ---------- | ----------------------------------------------------------------------------------- | -| [mode](#mode) | String | Read/Write | Control mode of the Plug-In Battery. Can be either `zero`, `to_full`, or `standby`. | -| power_w | Number | Read-only | Current combined power consumption/production of the controlled Plug-In Batteries. | -| target_power_w | Number | Read-only | Target power consumption/production of the controlled Plug-In Batteries. | -| max_consumption_w | Number | Read-only | Maximum allowed consumption power of the controlled Plug-In Batteries. | -| max_production_w | Number | Read-only | Maximum allowed production power of the controlled Plug-In Batteries. | - -## Mode. +| Data | Type | Access | Description | +| --------------------------- | ------------- | ------------ | ----------------------------------------------------------------------------------- | +| [mode](#mode) | String | Read/Write | Control mode of the Plug-In Battery. Can be either `zero`, `to_full`, or `standby`. | +| [permissions](#permissions) | Array[String] | Read/Write\* | Permissions to allow charging, discharging, both, or neither. | +| battery_count | Number | Read-only | Number of connected Plug-In Batteries. | +| power_w | Number | Read-only | Current combined power consumption/production of the controlled Plug-In Batteries. | +| target_power_w | Number | Read-only | Target power consumption/production of the controlled Plug-In Batteries. | +| max_consumption_w | Number | Read-only | Maximum allowed consumption power of the controlled Plug-In Batteries. | +| max_production_w | Number | Read-only | Maximum allowed production power of the controlled Plug-In Batteries. | + +## Mode The group of connected batteries can be controlled in three different modes: - `zero` - The Plug-In Battery will try to keep the power consumption/production of your home at zero. This means that the Plug-In Battery will charge or discharge to maintain a net-zero power balance. This is the default mode. - `to_full` - All connected Plug-In Batteries will be charged to 100%, regardless of the power consumption/production of your home. When all batteries are fully charged, the Plug-In Battery will switch to the **zero** mode. -- `standby` - Batteries will enter standby mode. This means that the Plug-In Battery will neither charge nor discharge. +- `standby` - Batteries will enter standby mode. This means that the Plug-In Battery will neither charge nor discharge. _For new implementations we recommend to use the `permissions` field to disallow both charging and discharging instead of using this mode._ + +## Permissions + +The `permissions` field can be used to set specific permissions for charging and discharging the connected Plug-In Batteries. The possible values are: + +- `charge_allowed` - Allow the Plug-In Battery to charge. +- `discharge_allowed` - Allow the Plug-In Battery to discharge. + +Provide these via an array when updating the `permissions` field. For example, to allow both charging and discharging, set `permissions` to `["charge_allowed", "discharge_allowed"]`. To disallow both, set it to an empty array `[]`. + +Permissions is read-only in `to_full` mode. + +### Backwards compatibility with `standby` mode + +Mode `standby` is exactly the same as mode `zero` with both charging and discharging disallowed, therefore the following rules apply for backwards compatibility: + +- When switching to `standby` mode, the `permissions` field will be set to an empty array `[]`. +- When adding a permission to the `permissions` field while in `standby` mode, the mode will automatically switch to `zero`. +- `zero` mode with both permissions allowed is the same as the default `zero` mode. ### Examples @@ -57,6 +78,8 @@ Content-Type: application/json { "mode": "zero", + "permissions" : ["charge_allowed", "discharge_allowed"], + "battery_count": 2, "power_w": -404, "target_power_w": -400, "max_consumption_w": 1600, @@ -81,9 +104,65 @@ Content-Type: application/json { "mode": "to_full", + "permissions" : ["charge_allowed"], + "battery_count": 2, "power_w": 1599, "target_power_w": 1600, "max_consumption_w": 1600, "max_production_w": 800 } ``` + +#### Change permissions + +```shell title="Request" +curl https:///api/batteries \ + --insecure \ + -H "Authorization: Bearer " \ + -H "X-Api-Version: 2" + -d '{"permissions": ["charge_allowed"]}' +``` + +```http title="Response" +https/1.1 200 OK +Content-Type: application/json + +{ + "mode": "zero", + "permissions" : ["charge_allowed"], + "battery_count": 2, + "power_w": 404, + "target_power_w": 400, + "max_consumption_w": 1600, + "max_production_w": 800 +} +``` + +#### Change permissions and mode + +You can set mode and permissions in one request. You cannot set `mode` to `to_full` and change `permissions` at the same time, as `permissions` is read-only in `to_full` mode. + +Mode will change to standby or zero depending on the provided permissions. + +```shell title="Request" +curl https:///api/batteries \ + --insecure \ + -H "Authorization: Bearer " \ + -H "X-Api-Version: 2" + -d '{"permissions": ["discharge_allowed"], "mode": "zero"}' +``` + +```http title="Response" +https/1.1 200 OK +Content-Type: application/json + +{ + "mode": "zero", + "permissions" : ["discharge_allowed"], + "battery_count": 2, + "power_w": -404, + "target_power_w": -400, + "max_consumption_w": 1600, + "max_production_w": 800 +} +``` From 450440c142ae71924fc618355128023955f6d375 Mon Sep 17 00:00:00 2001 From: Duco Sebel <74970928+DCSBL@users.noreply.github.com> Date: Wed, 3 Dec 2025 10:44:38 +0100 Subject: [PATCH 02/16] Add badges --- .cspell.yml | 1 + docs/v2/batteries.mdx | 20 +++++++++----------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/.cspell.yml b/.cspell.yml index 23eaa06..49d26d2 100644 --- a/.cspell.yml +++ b/.cspell.yml @@ -24,3 +24,4 @@ words: - aiohttp # Known library - asyncio # Known library - cafile # Known term in python + - bèta # Somehow understood as a typo diff --git a/docs/v2/batteries.mdx b/docs/v2/batteries.mdx index 34c792c..a5e8d69 100644 --- a/docs/v2/batteries.mdx +++ b/docs/v2/batteries.mdx @@ -24,15 +24,15 @@ The `/api/batteries` endpoint can be used to retrieve information about the cont ## Parameters -| Data | Type | Access | Description | -| --------------------------- | ------------- | ------------ | ----------------------------------------------------------------------------------- | -| [mode](#mode) | String | Read/Write | Control mode of the Plug-In Battery. Can be either `zero`, `to_full`, or `standby`. | -| [permissions](#permissions) | Array[String] | Read/Write\* | Permissions to allow charging, discharging, both, or neither. | -| battery_count | Number | Read-only | Number of connected Plug-In Batteries. | -| power_w | Number | Read-only | Current combined power consumption/production of the controlled Plug-In Batteries. | -| target_power_w | Number | Read-only | Target power consumption/production of the controlled Plug-In Batteries. | -| max_consumption_w | Number | Read-only | Maximum allowed consumption power of the controlled Plug-In Batteries. | -| max_production_w | Number | Read-only | Maximum allowed production power of the controlled Plug-In Batteries. | +| Data | Availability | Type | Access | Description | +| --------------------------- | -------------------------------------------------------------------------------- | ------------- | ------------ | ------------------------------------------------------------------------------------------ | +| [mode](#mode) | Available | String | Read/Write | Control mode of the Plug-In Battery. Can be either `zero`, `to_full`, or `standby`. | +| [permissions](#permissions) | In bèta | Array[String] | Read/Write\* | Permissions to allow charging, discharging, both, or neither. Read-only in `to_full` mode. | +| battery_count | In bèta | Number | Read-only | Number of connected Plug-In Batteries. | +| power_w | Available | Number | Read-only | Current combined power consumption/production of the controlled Plug-In Batteries. | +| target_power_w | Available | Number | Read-only | Target power consumption/production of the controlled Plug-In Batteries. | +| max_consumption_w | Available | Number | Read-only | Maximum allowed consumption power of the controlled Plug-In Batteries. | +| max_production_w | Available | Number | Read-only | Maximum allowed production power of the controlled Plug-In Batteries. | ## Mode @@ -51,8 +51,6 @@ The `permissions` field can be used to set specific permissions for charging and Provide these via an array when updating the `permissions` field. For example, to allow both charging and discharging, set `permissions` to `["charge_allowed", "discharge_allowed"]`. To disallow both, set it to an empty array `[]`. -Permissions is read-only in `to_full` mode. - ### Backwards compatibility with `standby` mode Mode `standby` is exactly the same as mode `zero` with both charging and discharging disallowed, therefore the following rules apply for backwards compatibility: From 1f21d65c0d26e9ebcfdf0b3d5a38a5f12aec398d Mon Sep 17 00:00:00 2001 From: Duco Sebel <74970928+DCSBL@users.noreply.github.com> Date: Wed, 3 Dec 2025 10:45:46 +0100 Subject: [PATCH 03/16] Tell permissions and target_power_w are now pushed over ws --- docs/v2/websocket.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/v2/websocket.mdx b/docs/v2/websocket.mdx index 1722b4b..a074218 100644 --- a/docs/v2/websocket.mdx +++ b/docs/v2/websocket.mdx @@ -67,7 +67,7 @@ After authentication, you can subscribe to topics. Topics correspond to availabl - **`user`** - Subscribe to [user list](/docs/v2/authorization#list-users) updates - **`measurement`** - Subscribe to [measurement](/docs/v2/measurement) updates - **`system`** - Subscribe to [system](/docs/v2/system) updates. Only `cloud_enabled` and `status_led_brightness_pct` are updated in real time. -- **`batteries`** - Subscribe to [battery group](/docs/v2/batteries) updates. Only `mode` is updated in real time. +- **`batteries`** - Subscribe to [battery group](/docs/v2/batteries) updates. Only `mode`, `permissions` and `target_power_w` are updated in real time. ```json title="Example" {"type": "subscribe", "data": "system"} From 0a2386a00077cd249e1568c340f3822c4ed088b3 Mon Sep 17 00:00:00 2001 From: Duco Sebel <74970928+DCSBL@users.noreply.github.com> Date: Wed, 3 Dec 2025 10:49:02 +0100 Subject: [PATCH 04/16] Add 2.2.0 to API versions --- docs/introduction.mdx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/introduction.mdx b/docs/introduction.mdx index 23216f8..faf375d 100644 --- a/docs/introduction.mdx +++ b/docs/introduction.mdx @@ -39,14 +39,14 @@ To understand the basics of the API, you can read the [getting-started](/docs/ge The following table shows which devices are supported by the API and which API version they support. -| Device | Device type | API v1 | API v2 | -| --------------------------------------- | ----------------------------------------------------------------------- | -------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| P1 Meter | `HWE-P1` | Supported | Supported | -| Energy Socket | `HWE-SKT` | Supported | In development | -| Watermeter (Only when powered over USB) | `HWE-WTR` | Supported | In development | -| kWh Meter (1 phase and 3-phase) | `HWE-KWH1`,
`HWE-KWH3`,
`SDM230-wifi` and
`SDM630-wifi` | Supported | Supported | -| Energy Display | `HWE-DSP` | Not planned | In development | -| Plug-In Battery | `HWE-BAT` | Not planned | Supported | +| Device | Device type | API v1 | API v2 | +| --------------------------------------- | ----------------------------------------------------------------------- | -------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| P1 Meter | `HWE-P1` | Supported | SupportedIn beta, available from firmware 6.03xx | +| Energy Socket | `HWE-SKT` | Supported | In development | +| Watermeter (Only when powered over USB) | `HWE-WTR` | Supported | In development | +| kWh Meter (1 phase and 3-phase) | `HWE-KWH1`,
`HWE-KWH3`,
`SDM230-wifi` and
`SDM630-wifi` | Supported | Supported In beta, available from firmware 5.01xx | +| Energy Display | `HWE-DSP` | Not planned | In development | +| Plug-In Battery | `HWE-BAT` | Not planned | Supported | ## Beta Program. From 1e96aa39e1937ed77a226e791f71f8e1588007d6 Mon Sep 17 00:00:00 2001 From: Duco Sebel <74970928+DCSBL@users.noreply.github.com> Date: Wed, 3 Dec 2025 10:56:21 +0100 Subject: [PATCH 05/16] Update changelog --- docs/changelog.mdx | 20 +++++++++++++++++--- package.json | 35 ++++++++++++++++++----------------- 2 files changed, 35 insertions(+), 20 deletions(-) diff --git a/docs/changelog.mdx b/docs/changelog.mdx index ec08f4f..348bb0a 100644 --- a/docs/changelog.mdx +++ b/docs/changelog.mdx @@ -21,9 +21,23 @@ Feature development of the v1 API has been stopped. No new features will be adde ### v2 -- **2.0.0** - 21-01-2025 - Initial release of the v2 API. -- **2.0.1** - 30-01-2025 - An issue has been resolved where `energy_import_kwh` and `energy_export_kwh` values in the Plug-In Battery [Measurement API](/docs/v2/measurement#plug-in-battery-hwe-bat) were returning invalid values. The values are now the same as those in the HomeWizard Energy app. -- **2.1.0** - 01-05-2025 - Support has been added to the P1 Meter to control the Plug-In Battery group mode. See [Plug-In Battery API](/docs/v2/batteries) for more information. This feature is currently in beta. +#### 2.0.0 - 21-01-2025 + +- Initial release of the v2 API. + +#### 2.0.1 - 30-01-2025 + +- An issue has been resolved where `energy_import_kwh` and `energy_export_kwh` values in the Plug-In Battery [Measurement API](/docs/v2/measurement#plug-in-battery-hwe-bat) were returning invalid values. The values are now the same as those in the HomeWizard Energy app. + +#### 2.1.0 - 01-05-2025 + +- Support has been added to the P1 Meter to control the Plug-In Battery group mode. See [Plug-In Battery API](/docs/v2/batteries) for more information. + +#### 2.2.0 - 01-12-2025 (in bèta) + +- You can now set charge and discharge permissions for the Plug-In Battery group via the `permissions` field in the [Plug-In Battery API](/docs/v2/batteries). See the documentation for more information. +- A new field has been added to `api/batteries`: `battery_count`, which indicates the number of connected Plug-In Batteries. +- When `target_power_w` field in `api/batteries` is updated, it is now pushed over WebSocket connections as well. ## Subscribe to Updates. diff --git a/package.json b/package.json index 16897c5..f30d4c5 100644 --- a/package.json +++ b/package.json @@ -19,26 +19,27 @@ "spell-checker": "cspell --config .cspell.yml \"**/*.{md,mdx}\"" }, "dependencies": { - "@docusaurus/core": "^3.7.0", - "@docusaurus/preset-classic": "^3.7.0", - "@docusaurus/theme-mermaid": "^3.7.0", - "@iconify/react": "^6.0.0", - "@mdx-js/react": "3.1.0", - "clsx": "2.1.0", + "@docusaurus/core": "^3.9.2", + "@docusaurus/preset-classic": "^3.9.2", + "@docusaurus/theme-mermaid": "^3.9.2", + "@iconify/react": "^6.0.2", + "@mdx-js/react": "3.1.1", + "clsx": "2.1.1", "prism-react-renderer": "2.4.1", - "react": "18.2.0", - "react-dom": "18.2.0" + "react": "19.2.0", + "react-dom": "19.2.0", + "typescript-eslint": "^8.48.1" }, "devDependencies": { - "@docusaurus/module-type-aliases": "^3.7.0", - "@docusaurus/types": "^3.7.0", - "@typescript-eslint/eslint-plugin": "7.0.0", - "@typescript-eslint/parser": "6.21.0", - "cspell": "8.19.3", - "eslint": "8.57.0", - "eslint-plugin-react-hooks": "5.2.0", - "eslint-plugin-react-refresh": "0.4.5", - "prettier": "3.2.5" + "@docusaurus/module-type-aliases": "^3.9.2", + "@docusaurus/types": "^3.9.2", + "@typescript-eslint/eslint-plugin": "8.48.1", + "@typescript-eslint/parser": "8.48.1", + "cspell": "9.4.0", + "eslint": "9.39.1", + "eslint-plugin-react-hooks": "7.0.1", + "eslint-plugin-react-refresh": "0.4.24", + "prettier": "3.7.4" }, "browserslist": { "production": [ From 304d7cac7334f067856e65fcdc8ee610f5d35107 Mon Sep 17 00:00:00 2001 From: Duco Sebel <74970928+DCSBL@users.noreply.github.com> Date: Wed, 3 Dec 2025 10:57:37 +0100 Subject: [PATCH 06/16] Use correct heading for examples --- docs/v2/batteries.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/v2/batteries.mdx b/docs/v2/batteries.mdx index a5e8d69..4e0fdd1 100644 --- a/docs/v2/batteries.mdx +++ b/docs/v2/batteries.mdx @@ -59,9 +59,9 @@ Mode `standby` is exactly the same as mode `zero` with both charging and dischar - When adding a permission to the `permissions` field while in `standby` mode, the mode will automatically switch to `zero`. - `zero` mode with both permissions allowed is the same as the default `zero` mode. -### Examples +## Examples -#### Get Battery Group Information +### Get Battery Group Information ```shell title="Request" curl https:///api/batteries \ @@ -85,7 +85,7 @@ Content-Type: application/json } ``` -#### Change Control Mode +### Change Control Mode ```shell title="Request" curl https:///api/batteries \ @@ -111,7 +111,7 @@ Content-Type: application/json } ``` -#### Change permissions +### Change permissions ```shell title="Request" curl https:///api/batteries \ @@ -136,7 +136,7 @@ Content-Type: application/json } ``` -#### Change permissions and mode +### Change permissions and mode You can set mode and permissions in one request. You cannot set `mode` to `to_full` and change `permissions` at the same time, as `permissions` is read-only in `to_full` mode. From a0296817137d9e5b8f6a7d2b21cccafe5b7b09fb Mon Sep 17 00:00:00 2001 From: Duco Sebel <74970928+DCSBL@users.noreply.github.com> Date: Wed, 3 Dec 2025 10:58:32 +0100 Subject: [PATCH 07/16] Remove 'supported' reference in P1 Meter --- docs/v2/batteries.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/v2/batteries.mdx b/docs/v2/batteries.mdx index 4e0fdd1..afe239c 100644 --- a/docs/v2/batteries.mdx +++ b/docs/v2/batteries.mdx @@ -9,7 +9,7 @@ import Badge from '@site/src/components/Badge.js' # Batteries `/api/batteries`. {/* prettier-ignore */} -P1 Meter +P1 Meter Energy Socket Energy Display kWh Meter From f844510c71cd5cc44f6914279645b21ea675bb26 Mon Sep 17 00:00:00 2001 From: Duco Sebel <74970928+DCSBL@users.noreply.github.com> Date: Wed, 3 Dec 2025 11:33:53 +0100 Subject: [PATCH 08/16] Revert package.json --- package.json | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/package.json b/package.json index f30d4c5..16897c5 100644 --- a/package.json +++ b/package.json @@ -19,27 +19,26 @@ "spell-checker": "cspell --config .cspell.yml \"**/*.{md,mdx}\"" }, "dependencies": { - "@docusaurus/core": "^3.9.2", - "@docusaurus/preset-classic": "^3.9.2", - "@docusaurus/theme-mermaid": "^3.9.2", - "@iconify/react": "^6.0.2", - "@mdx-js/react": "3.1.1", - "clsx": "2.1.1", + "@docusaurus/core": "^3.7.0", + "@docusaurus/preset-classic": "^3.7.0", + "@docusaurus/theme-mermaid": "^3.7.0", + "@iconify/react": "^6.0.0", + "@mdx-js/react": "3.1.0", + "clsx": "2.1.0", "prism-react-renderer": "2.4.1", - "react": "19.2.0", - "react-dom": "19.2.0", - "typescript-eslint": "^8.48.1" + "react": "18.2.0", + "react-dom": "18.2.0" }, "devDependencies": { - "@docusaurus/module-type-aliases": "^3.9.2", - "@docusaurus/types": "^3.9.2", - "@typescript-eslint/eslint-plugin": "8.48.1", - "@typescript-eslint/parser": "8.48.1", - "cspell": "9.4.0", - "eslint": "9.39.1", - "eslint-plugin-react-hooks": "7.0.1", - "eslint-plugin-react-refresh": "0.4.24", - "prettier": "3.7.4" + "@docusaurus/module-type-aliases": "^3.7.0", + "@docusaurus/types": "^3.7.0", + "@typescript-eslint/eslint-plugin": "7.0.0", + "@typescript-eslint/parser": "6.21.0", + "cspell": "8.19.3", + "eslint": "8.57.0", + "eslint-plugin-react-hooks": "5.2.0", + "eslint-plugin-react-refresh": "0.4.5", + "prettier": "3.2.5" }, "browserslist": { "production": [ From 6d9f37bb04ab892df2e58df986732448f4c7095d Mon Sep 17 00:00:00 2001 From: Duco Sebel <74970928+DCSBL@users.noreply.github.com> Date: Wed, 3 Dec 2025 11:42:14 +0100 Subject: [PATCH 09/16] Use correct permissions value for to_full --- docs/v2/batteries.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/v2/batteries.mdx b/docs/v2/batteries.mdx index afe239c..6e36f65 100644 --- a/docs/v2/batteries.mdx +++ b/docs/v2/batteries.mdx @@ -102,7 +102,7 @@ Content-Type: application/json { "mode": "to_full", - "permissions" : ["charge_allowed"], + "permissions" : [], "battery_count": 2, "power_w": 1599, "target_power_w": 1600, @@ -127,7 +127,7 @@ Content-Type: application/json { "mode": "zero", - "permissions" : ["charge_allowed"], + "permissions" : [], "battery_count": 2, "power_w": 404, "target_power_w": 400, From b33c1da54fd53e91eb3ea145701cf28f97deb6b3 Mon Sep 17 00:00:00 2001 From: Duco Sebel <74970928+DCSBL@users.noreply.github.com> Date: Wed, 3 Dec 2025 11:49:12 +0100 Subject: [PATCH 10/16] b'eta to beta --- .cspell.yml | 1 - docs/changelog.mdx | 2 +- docs/v2/batteries.mdx | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.cspell.yml b/.cspell.yml index 49d26d2..23eaa06 100644 --- a/.cspell.yml +++ b/.cspell.yml @@ -24,4 +24,3 @@ words: - aiohttp # Known library - asyncio # Known library - cafile # Known term in python - - bèta # Somehow understood as a typo diff --git a/docs/changelog.mdx b/docs/changelog.mdx index 348bb0a..ed87104 100644 --- a/docs/changelog.mdx +++ b/docs/changelog.mdx @@ -33,7 +33,7 @@ Feature development of the v1 API has been stopped. No new features will be adde - Support has been added to the P1 Meter to control the Plug-In Battery group mode. See [Plug-In Battery API](/docs/v2/batteries) for more information. -#### 2.2.0 - 01-12-2025 (in bèta) +#### 2.2.0 - 01-12-2025 (in beta) - You can now set charge and discharge permissions for the Plug-In Battery group via the `permissions` field in the [Plug-In Battery API](/docs/v2/batteries). See the documentation for more information. - A new field has been added to `api/batteries`: `battery_count`, which indicates the number of connected Plug-In Batteries. diff --git a/docs/v2/batteries.mdx b/docs/v2/batteries.mdx index 6e36f65..d221da4 100644 --- a/docs/v2/batteries.mdx +++ b/docs/v2/batteries.mdx @@ -27,8 +27,8 @@ The `/api/batteries` endpoint can be used to retrieve information about the cont | Data | Availability | Type | Access | Description | | --------------------------- | -------------------------------------------------------------------------------- | ------------- | ------------ | ------------------------------------------------------------------------------------------ | | [mode](#mode) | Available | String | Read/Write | Control mode of the Plug-In Battery. Can be either `zero`, `to_full`, or `standby`. | -| [permissions](#permissions) | In bèta | Array[String] | Read/Write\* | Permissions to allow charging, discharging, both, or neither. Read-only in `to_full` mode. | -| battery_count | In bèta | Number | Read-only | Number of connected Plug-In Batteries. | +| [permissions](#permissions) | In beta | Array[String] | Read/Write\* | Permissions to allow charging, discharging, both, or neither. Read-only in `to_full` mode. | +| battery_count | In beta | Number | Read-only | Number of connected Plug-In Batteries. | | power_w | Available | Number | Read-only | Current combined power consumption/production of the controlled Plug-In Batteries. | | target_power_w | Available | Number | Read-only | Target power consumption/production of the controlled Plug-In Batteries. | | max_consumption_w | Available | Number | Read-only | Maximum allowed consumption power of the controlled Plug-In Batteries. | From 0d8613650b4635d86d51f842be6309005c77d690 Mon Sep 17 00:00:00 2001 From: Duco Sebel <74970928+DCSBL@users.noreply.github.com> Date: Wed, 3 Dec 2025 11:49:50 +0100 Subject: [PATCH 11/16] Update example --- docs/v2/batteries.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/v2/batteries.mdx b/docs/v2/batteries.mdx index d221da4..dc2b12b 100644 --- a/docs/v2/batteries.mdx +++ b/docs/v2/batteries.mdx @@ -127,7 +127,7 @@ Content-Type: application/json { "mode": "zero", - "permissions" : [], + "permissions" : ["charge_allowed"], "battery_count": 2, "power_w": 404, "target_power_w": 400, From ddd9b61f26494a0ba440c2e79541b04970e35d8d Mon Sep 17 00:00:00 2001 From: Duco Sebel <74970928+DCSBL@users.noreply.github.com> Date: Wed, 3 Dec 2025 12:40:14 +0100 Subject: [PATCH 12/16] Update docs/v2/batteries.mdx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Duco Sebel <74970928+DCSBL@users.noreply.github.com> --- docs/v2/batteries.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/v2/batteries.mdx b/docs/v2/batteries.mdx index dc2b12b..98c9696 100644 --- a/docs/v2/batteries.mdx +++ b/docs/v2/batteries.mdx @@ -117,7 +117,7 @@ Content-Type: application/json curl https:///api/batteries \ --insecure \ -H "Authorization: Bearer " \ - -H "X-Api-Version: 2" + -H "X-Api-Version: 2" \ -d '{"permissions": ["charge_allowed"]}' ``` From 09bb6fa7fa339ebcc9eef5804edf71a6f6708744 Mon Sep 17 00:00:00 2001 From: Duco Sebel <74970928+DCSBL@users.noreply.github.com> Date: Wed, 3 Dec 2025 12:40:28 +0100 Subject: [PATCH 13/16] Update docs/v2/batteries.mdx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Duco Sebel <74970928+DCSBL@users.noreply.github.com> --- docs/v2/batteries.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/v2/batteries.mdx b/docs/v2/batteries.mdx index 98c9696..802ba38 100644 --- a/docs/v2/batteries.mdx +++ b/docs/v2/batteries.mdx @@ -146,7 +146,7 @@ Mode will change to standby or zero depending on the provided permissions. curl https:///api/batteries \ --insecure \ -H "Authorization: Bearer " \ - -H "X-Api-Version: 2" + -H "X-Api-Version: 2" \ -d '{"permissions": ["discharge_allowed"], "mode": "zero"}' ``` From dbef564dc3537403e9edd954c998e7a9445b9d47 Mon Sep 17 00:00:00 2001 From: Duco Sebel <74970928+DCSBL@users.noreply.github.com> Date: Wed, 3 Dec 2025 12:40:41 +0100 Subject: [PATCH 14/16] Update docs/v2/batteries.mdx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Duco Sebel <74970928+DCSBL@users.noreply.github.com> --- docs/v2/batteries.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/v2/batteries.mdx b/docs/v2/batteries.mdx index 802ba38..b8c82b5 100644 --- a/docs/v2/batteries.mdx +++ b/docs/v2/batteries.mdx @@ -156,7 +156,7 @@ Content-Type: application/json { "mode": "zero", - "permissions" : ["discharge_allowed"], + "permissions": ["discharge_allowed"], "battery_count": 2, "power_w": -404, "target_power_w": -400, From d6f9ecd7043c53676fb1da23b358b0e1e6f34859 Mon Sep 17 00:00:00 2001 From: Duco Sebel <74970928+DCSBL@users.noreply.github.com> Date: Thu, 4 Dec 2025 11:17:05 +0100 Subject: [PATCH 15/16] Update docs/v2/batteries.mdx Co-authored-by: RonvanderPlas <36153505+RonvanderPlas@users.noreply.github.com> Signed-off-by: Duco Sebel <74970928+DCSBL@users.noreply.github.com> --- docs/v2/batteries.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/v2/batteries.mdx b/docs/v2/batteries.mdx index b8c82b5..336c006 100644 --- a/docs/v2/batteries.mdx +++ b/docs/v2/batteries.mdx @@ -27,7 +27,7 @@ The `/api/batteries` endpoint can be used to retrieve information about the cont | Data | Availability | Type | Access | Description | | --------------------------- | -------------------------------------------------------------------------------- | ------------- | ------------ | ------------------------------------------------------------------------------------------ | | [mode](#mode) | Available | String | Read/Write | Control mode of the Plug-In Battery. Can be either `zero`, `to_full`, or `standby`. | -| [permissions](#permissions) | In beta | Array[String] | Read/Write\* | Permissions to allow charging, discharging, both, or neither. Read-only in `to_full` mode. | +| [permissions](#permissions) | In beta | Array[String] | Read/Write\* | Permissions to allow charging, discharging, both, or neither. _Note: Read-only in `to_full` mode._ | | battery_count | In beta | Number | Read-only | Number of connected Plug-In Batteries. | | power_w | Available | Number | Read-only | Current combined power consumption/production of the controlled Plug-In Batteries. | | target_power_w | Available | Number | Read-only | Target power consumption/production of the controlled Plug-In Batteries. | From 489c1ae4f7229ba3799d2d836e7d06a4e7fb9ecb Mon Sep 17 00:00:00 2001 From: Duco Sebel <74970928+DCSBL@users.noreply.github.com> Date: Thu, 4 Dec 2025 11:25:05 +0100 Subject: [PATCH 16/16] Formatter --- docs/v2/batteries.mdx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/v2/batteries.mdx b/docs/v2/batteries.mdx index 336c006..bcf76ca 100644 --- a/docs/v2/batteries.mdx +++ b/docs/v2/batteries.mdx @@ -24,15 +24,15 @@ The `/api/batteries` endpoint can be used to retrieve information about the cont ## Parameters -| Data | Availability | Type | Access | Description | -| --------------------------- | -------------------------------------------------------------------------------- | ------------- | ------------ | ------------------------------------------------------------------------------------------ | -| [mode](#mode) | Available | String | Read/Write | Control mode of the Plug-In Battery. Can be either `zero`, `to_full`, or `standby`. | +| Data | Availability | Type | Access | Description | +| --------------------------- | -------------------------------------------------------------------------------- | ------------- | ------------ | -------------------------------------------------------------------------------------------------- | +| [mode](#mode) | Available | String | Read/Write | Control mode of the Plug-In Battery. Can be either `zero`, `to_full`, or `standby`. | | [permissions](#permissions) | In beta | Array[String] | Read/Write\* | Permissions to allow charging, discharging, both, or neither. _Note: Read-only in `to_full` mode._ | -| battery_count | In beta | Number | Read-only | Number of connected Plug-In Batteries. | -| power_w | Available | Number | Read-only | Current combined power consumption/production of the controlled Plug-In Batteries. | -| target_power_w | Available | Number | Read-only | Target power consumption/production of the controlled Plug-In Batteries. | -| max_consumption_w | Available | Number | Read-only | Maximum allowed consumption power of the controlled Plug-In Batteries. | -| max_production_w | Available | Number | Read-only | Maximum allowed production power of the controlled Plug-In Batteries. | +| battery_count | In beta | Number | Read-only | Number of connected Plug-In Batteries. | +| power_w | Available | Number | Read-only | Current combined power consumption/production of the controlled Plug-In Batteries. | +| target_power_w | Available | Number | Read-only | Target power consumption/production of the controlled Plug-In Batteries. | +| max_consumption_w | Available | Number | Read-only | Maximum allowed consumption power of the controlled Plug-In Batteries. | +| max_production_w | Available | Number | Read-only | Maximum allowed production power of the controlled Plug-In Batteries. | ## Mode