Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add iskra documentation #33422

Merged
merged 15 commits into from
Sep 9, 2024
Merged

Add iskra documentation #33422

merged 15 commits into from
Sep 9, 2024

Conversation

iskrakranj
Copy link
Contributor

@iskrakranj iskrakranj commented Jun 26, 2024

Proposed change

Adds documentation for iskra integration

Type of change

  • Spelling, grammar or other readability improvements (current branch).
  • Adjusted missing or incorrect information in the current documentation (current branch).
  • Added documentation for a new integration I'm adding to Home Assistant (next branch).
  • Added documentation for a new feature I'm adding to Home Assistant (next branch).
  • Removed stale or deprecated documentation.

Additional information

Checklist

  • This PR uses the correct branch, based on one of the following:
    • I made a change to the existing documentation and used the current branch.
    • I made a change that is related to an upcoming version of Home Assistant and used the next branch.
  • The documentation follows the Home Assistant documentation standards.

Summary by CodeRabbit

  • Documentation
    • Added comprehensive guide for integrating Iskra energy meters and power quality analyzers with Home Assistant.
    • Included configuration options for Modbus TCP and Iskra's Smart Gateway with REST API.
    • Detailed monitored data including power, current, voltage for each phase, and energy counters.
    • Provided specific notes on device configuration and data behavior based on user settings through MiQen software.

@home-assistant home-assistant bot added has-parent This PR has a parent PR in a other repo next This PR goes into the next branch labels Jun 26, 2024
Copy link

netlify bot commented Jun 26, 2024

Deploy Preview for home-assistant-docs ready!

Name Link
🔨 Latest commit a1d78f6
🔍 Latest deploy log https://app.netlify.com/sites/home-assistant-docs/deploys/66de9ac027514d0008372d1e
😎 Deploy Preview https://deploy-preview-33422--home-assistant-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

coderabbitai bot commented Jun 27, 2024

Walkthrough

Walkthrough

The recent changes introduce a new Iskra integration guide for Home Assistant, detailing how to connect Iskra energy meters and power quality analyzers. This guide includes information on supported devices, configuration options using Modbus TCP or Iskra’s Smart Gateway with REST API, monitored data specifics, and important notes on usage.

Changes

File Path Change Summary
source/_integrations/iskra.markdown Added a new integration guide for Iskra energy meters and power quality analyzers, covering setup, supported devices, configuration options, and monitored data details.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Home Assistant
    participant Iskra Device

    User->>Home Assistant: Configure Iskra Integration (Modbus TCP / REST API)
    Home Assistant->>Iskra Device: Send Polling Request
    Iskra Device-->>Home Assistant: Respond with Data (Power, Current, Voltage, Energy Counters)
    Home Assistant-->>User: Display Collected Data
Loading

Tip

New features

Walkthrough comment now includes:

  • Possibly related PRs: A list of potentially related PRs to help you recall past context.
  • Suggested labels: CodeRabbit can now suggest labels by learning from your past PRs. You can also provide custom labeling instructions in the UI or configuration file.

Notes:

  • Please share any feedback in the discussion post on our Discord.
  • Possibly related PRs, automatic label suggestions based on past PRs, learnings, and possibly related issues require data opt-in (enabled by default).

Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 985f647 and a1d78f6.

Files selected for processing (1)
  • source/_integrations/iskra.markdown (1 hunks)
Additional context used
Markdownlint
source/_integrations/iskra.markdown

40-40: null
Lists should be surrounded by blank lines

(MD032, blanks-around-lists)


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai or @coderabbitai title anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

source/_integrations/iskra.markdown Outdated Show resolved Hide resolved
source/_integrations/iskra.markdown Outdated Show resolved Hide resolved
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Outside diff range, codebase verification and nitpick comments (3)
source/_integrations/iskra.markdown (3)

18-18: Consider using only one top-level heading in the document.

The markdown file has multiple top-level headings which could lead to formatting issues or confusion in documentation navigation.

-# Iskra Integration
+# Iskra Integration Documentation
Tools
Markdownlint

18-18: null
Multiple top-level headings in the same document

(MD025, single-title, single-h1)


24-38: Fix the formatting issues with the lists.

The lists should be surrounded by blank lines to improve readability.

-### Energy meters
+### Energy meters

-### Power quality analyzers
+### Power quality analyzers

-  - Impact series (IE38XX/IE14XX)
+  - Impact series (IE38XX/IE14XX)

-  - WM series (WM3XX/WM1XX)
+  - WM series (WM3XX/WM1XX)

-  - iMT/MT series (MTXXX/iMTXXX)
+  - iMT/MT series (MTXXX/iMTXXX)

-  - iMC/MC series (MCXXX/iMCXXX)
+  - iMC/MC series (MCXXX/iMCXXX)
Tools
Markdownlint

38-38: Expected: 0 or 2; Actual: 1
Trailing spaces

(MD009, no-trailing-spaces)


29-29: null
Lists should be surrounded by blank lines

(MD032, blanks-around-lists)


38-38: null
Lists should be surrounded by blank lines

(MD032, blanks-around-lists)


38-38: Fix general formatting issues.

There are some general formatting issues that need to be addressed:

  • Trailing spaces
  • Multiple consecutive blank lines
  • Missing blank lines around headings and lists
-  - Energy meters
+  - Energy meters

-  - Sensor
+  - Sensor

-  - Smart Gateway
+  - Smart Gateway

-  - Home Assistant
+  - Home Assistant

Also applies to: 50-50, 39-39, 29-29, 38-38

Tools
Markdownlint

38-38: Expected: 0 or 2; Actual: 1
Trailing spaces

(MD009, no-trailing-spaces)


38-38: null
Lists should be surrounded by blank lines

(MD032, blanks-around-lists)

Comment on lines 39 to 57
## Configuration Options

There are two ways to configure your devices with Home Assistant:

### Smart Gateway with REST API

If your device supports Modbus RTU over RS485/IR, you can use Iskra's Smart Gateway to connect them via REST API:

- **Smart Gateway**: Connect your devices to the Smart Gateway and add your devices to Smart Gateway's configuration. It's also recommended to set static IP on your smart gateway.
- **Home Assistant**: Add iskra integration, enter Smart Gateway's **IP address** and select **RestAPI** If authentication is required Home Assistant will prompt you to enter Smart Gateway's **credentials**. All devices configured on Smart Gateway will be automatically added to your Home Assistant.


### Modbus TCP Connection

If your device supports a direct internet connection, such as PQ meters (iMC/MC series/ iMT/MT series usually), you can use Modbus TCP:

- **Device**: Find your device using [MiQen](https://www.iskra.si/sl/Programska-oprema/MiQen/) software and configure it so it uses static IP.
- **Home Assistant**: Add iskra integration, enter Devices's **IP address** and select **Modbus TCP**. Home assistant will prompt you to enter Modbus TCP port and Modbus address of your device.

Copy link
Contributor

@coderabbitai coderabbitai bot Jul 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clarify configuration steps.

The instruction to select the REST API connection type is a bit vague. It would be helpful to provide more details or a step-by-step guide on how to select this option in Iskra's Smart Gateway.

Do you want me to generate a detailed step-by-step guide on how to select the REST API connection type in Iskra's Smart Gateway?

Tools
LanguageTool

[uncategorized] ~56-~56: Possible missing preposition found.
Context: ...t uses static IP. - Home Assistant: Add iskra integration, enter Devices's **IP...

(AI_HYDRA_LEO_MISSING_TO)

Markdownlint

50-50: Expected: 1; Actual: 2
Multiple consecutive blank lines

(MD012, no-multiple-blanks)


39-39: Expected: 1; Actual: 0; Above
Headings should be surrounded by blank lines

(MD022, blanks-around-headings)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is selected in Home Assistant integration as which type of connection you want to use to integrate devices not configuration of Smart Gateway

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@iskrakranj Thank you for the clarification. It would be helpful to update the documentation to make it clear that the selection of the REST API connection type is done within the Home Assistant integration and not in the Smart Gateway configuration. This will help avoid any confusion for users setting up the integration.

Would you like me to provide a revised version of the documentation with this clarification?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, please provide revised version

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@iskrakranj Sure, here is the revised version of the documentation with the clarification that the selection of the REST API connection type is done within the Home Assistant integration setup:

---
title: Iskra
description: Instructions on how to connect your Iskra energy meters to Home Assistant.
ha_release: 2024.6
ha_category:
  - Energy
  - Sensor
ha_codeowners:
  - '@iskrakranj'
ha_config_flow: true
ha_domain: iskra
ha_iot_class: local_polling
ha_platforms:
  - sensor
ha_integration_type: integration
---

# Iskra Integration

## Description

The [Iskra](https://www.iskra.eu/) {% term integration %} allows you to connect Iskra energy meters and power quality analyzers to Home Assistant. Data is polled using Modbus TCP or the Iskra Smart Gateway's REST API.

## Supported devices

### Energy meters

Most Iskra's DIN rail mountable energy meters support Modbus RTU over RS485 and IR. To integrate them, you will need a Modbus TCP gateway or Iskra's Smart Gateway:
- Impact series (IE38XX/IE14XX)
- WM series (WM3XX/WM1XX)

### Power quality analyzers

These devices typically support Ethernet connections and use Modbus TCP for data polling:

- iMT/MT series (MTXXX/iMTXXX)
- iMC/MC series (MCXXX/iMCXXX)

## Configuration Options

There are two ways to configure your devices with Home Assistant:

### Smart Gateway with REST API

If your device supports Modbus RTU over RS485/IR, you can use Iskra's Smart Gateway to connect them via REST API:

- **Smart Gateway**: Connect your devices to the Smart Gateway and add your devices to Smart Gateway's configuration. It's also recommended to set a static IP on your smart gateway.
- **Home Assistant**: Add the Iskra integration, enter the Smart Gateway's **IP address**, and select **RestAPI** as the connection type. If authentication is required, Home Assistant will prompt you to enter the Smart Gateway's **credentials**. All devices configured on the Smart Gateway will be automatically added to your Home Assistant.

### Modbus TCP Connection

If your device supports a direct internet connection, such as PQ meters (iMC/MC series/ iMT/MT series usually), you can use Modbus TCP:

- **Device**: Find your device using [MiQen](https://www.iskra.si/sl/Programska-oprema/MiQen/) software and configure it to use a static IP.
- **Home Assistant**: Add the Iskra integration, enter the device's **IP address**, and select **Modbus TCP**. Home Assistant will prompt you to enter the Modbus TCP port and Modbus address of your device.

Let me know if any further adjustments are needed!

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

source/_integrations/iskra.markdown Outdated Show resolved Hide resolved
source/_integrations/iskra.markdown Outdated Show resolved Hide resolved
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Outside diff range, codebase verification and nitpick comments (1)
source/_integrations/iskra.markdown (1)

24-38: Supported devices section is clear.

The section provides a clear list of supported devices.

Consider adding blank lines around lists for better readability.

-### Energy meters
+### Energy meters

-Most Iskra's DIN rail mountable energy meters support Modbus RTU over RS485 and IR. To integrate them, you will need a Modbus TCP gateway or Iskra's Smart Gateway:
+Most Iskra's DIN rail mountable energy meters support Modbus RTU over RS485 and IR. To integrate them, you will need a Modbus TCP gateway or Iskra's Smart Gateway:

-### Power quality analyzers
+### Power quality analyzers

-These devices typically support Ethernet connections and use Modbus TCP for data polling:
+These devices typically support Ethernet connections and use Modbus TCP for data polling:
Tools
Markdownlint

38-38: Expected: 0 or 2; Actual: 1
Trailing spaces

(MD009, no-trailing-spaces)


29-29: null
Lists should be surrounded by blank lines

(MD032, blanks-around-lists)


38-38: null
Lists should be surrounded by blank lines

(MD032, blanks-around-lists)

source/_integrations/iskra.markdown Outdated Show resolved Hide resolved
source/_integrations/iskra.markdown Outdated Show resolved Hide resolved
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Outside diff range, codebase verification and nitpick comments (2)
source/_integrations/iskra.markdown (2)

43-48: Clarify configuration steps for Smart Gateway with REST API.

The instruction to select the REST API connection type is a bit vague and has grammatical issues. Additionally, clarify that the selection is done within the Home Assistant integration.

-If your device supports Modbus RTU over RS485/IR, you can use Iskra's Smart Gateway to connect them via the REST API:
+If your device supports Modbus RTU over RS485/IR, you can use Iskra's Smart Gateway to connect them via the REST API:

-**Smart Gateway**: Connect your devices to the Smart Gateway and add your devices to the Smart Gateway's configuration. It's also recommended to set static IP on your smart gateway.
+**Smart Gateway**: Connect your devices to the Smart Gateway and add your devices to the Smart Gateway's configuration. It's also recommended to set a static IP on your smart gateway.

-**Home Assistant**: Add the iskra integration, enter Smart Gateway's **IP address** and select **RestAPI** If authentication is required Home Assistant will prompt you to enter Smart Gateway's **credentials**. All devices configured on Smart Gateway will be automatically added to your Home Assistant.
+**Home Assistant**: Add the Iskra integration, enter the Smart Gateway's **IP address**, and select **RestAPI**. If authentication is required, Home Assistant will prompt you to enter the Smart Gateway's **credentials**. All devices configured on the Smart Gateway will be automatically added to your Home Assistant.

Additionally, clarify that the selection of the REST API connection type is done within the Home Assistant integration.

-**Home Assistant**: Add iskra integration, enter Smart Gateway's **IP address** and select **RestAPI** If authentication is required Home Assistant will prompt you to enter Smart Gateway's **credentials**. All devices configured on Smart Gateway will be automatically added to your Home Assistant.
+**Home Assistant**: Add the Iskra integration, enter the Smart Gateway's **IP address**, and select **RestAPI** as the connection type within the Home Assistant integration. If authentication is required, Home Assistant will prompt you to enter the Smart Gateway's **credentials**. All devices configured on the Smart Gateway will be automatically added to your Home Assistant.
Tools
LanguageTool

[uncategorized] ~48-~48: Possible missing preposition found.
Context: ...ur smart gateway. - Home Assistant: Add the iskra integration, enter Smart Gate...

(AI_HYDRA_LEO_MISSING_TO)


[uncategorized] ~48-~48: Possible missing comma found.
Context: ...stant integration. If authentication is required Home Assistant will prompt you to enter...

(AI_HYDRA_LEO_MISSING_COMMA)


51-56: Fix grammatical issues in Modbus TCP Connection section.

There are grammatical issues in the Modbus TCP Connection section. Correct the article usage and add the missing preposition.

-**Device**: Find your device using the [MiQen](https://www.iskra.si/sl/Programska-oprema/MiQen/) software and configure it so it uses static IP.
+**Device**: Find your device using the [MiQen](https://www.iskra.si/sl/Programska-oprema/MiQen/) software and configure it so it uses a static IP.

-**Home Assistant**: Add the iskra integration, enter the devices's **IP address** and select **Modbus TCP** as the connection type within the Home Assistant integration. Home Assistant will prompt you to enter Modbus TCP port and Modbus address of your device.
+**Home Assistant**: Add the Iskra integration, enter the device's **IP address**, and select **Modbus TCP**. Home Assistant will prompt you to enter the Modbus TCP port and Modbus address of your device.

@c0ffeeca7 c0ffeeca7 added the new-integration This PR adds documentation for a new Home Assistant integration label Jul 19, 2024
source/_integrations/iskra.markdown Outdated Show resolved Hide resolved
source/_integrations/iskra.markdown Outdated Show resolved Hide resolved
source/_integrations/iskra.markdown Outdated Show resolved Hide resolved
source/_integrations/iskra.markdown Outdated Show resolved Hide resolved
source/_integrations/iskra.markdown Outdated Show resolved Hide resolved
source/_integrations/iskra.markdown Outdated Show resolved Hide resolved
@c0ffeeca7 c0ffeeca7 marked this pull request as draft July 19, 2024 09:21
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Outside diff range, codebase verification and nitpick comments (2)
source/_integrations/iskra.markdown (2)

21-27: Surround lists with blank lines for better readability.

The lists should be surrounded by blank lines to enhance readability.

-### Energy meters
-Most Iskra's DIN rail mountable energy meters support Modbus RTU over RS485 and IR. To integrate them, you will need a Modbus TCP gateway or Iskra's Smart Gateway:
-- Impact series ([IE38XX / IE14XX](https://www.iskra.eu/en/Iskra-Energy-meters/))
-- WM series ([WM3XX / WM1XX](https://www.iskra.eu/en/Iskra-Energy-meters/))
+### Energy meters
+
+Most Iskra's DIN rail mountable energy meters support Modbus RTU over RS485 and IR. To integrate them, you will need a Modbus TCP gateway or Iskra's Smart Gateway:
+
+- Impact series ([IE38XX / IE14XX](https://www.iskra.eu/en/Iskra-Energy-meters/))
+- WM series ([WM3XX / WM1XX](https://www.iskra.eu/en/Iskra-Energy-meters/))
Tools
Markdownlint

26-26: null
Lists should be surrounded by blank lines

(MD032, blanks-around-lists)


29-34: Surround lists with blank lines for better readability.

The lists should be surrounded by blank lines to enhance readability.

-### Power quality analyzers
-These devices typically support Ethernet connections and use Modbus TCP for data polling:
-- iMT/MT series ([MTXXX / iMTXXX](https://www.iskra.eu/en/NEW_SERIES_Universal_measuring_devices_/))
-- iMC/MC series ([MCXXX / iMCXXX](https://www.iskra.eu/en/NEW_SERIES_Universal_measuring_devices_/))
+### Power quality analyzers
+
+These devices typically support Ethernet connections and use Modbus TCP for data polling:
+
+- iMT/MT series ([MTXXX / iMTXXX](https://www.iskra.eu/en/NEW_SERIES_Universal_measuring_devices_/))
+- iMC/MC series ([MCXXX / iMCXXX](https://www.iskra.eu/en/NEW_SERIES_Universal_measuring_devices_/))

source/_integrations/iskra.markdown Outdated Show resolved Hide resolved
source/_integrations/iskra.markdown Outdated Show resolved Hide resolved
added sensors table
@iskrakranj iskrakranj marked this pull request as ready for review September 4, 2024 13:09
@iskrakranj iskrakranj marked this pull request as draft September 4, 2024 13:09
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Comment on lines 36 to 53
## Configuration options

There are two ways to configure your devices with Home Assistant:

### Smart Gateway with REST API

If your device supports Modbus RTU over RS485/IR, you can use Iskra's Smart Gateway to connect them via the REST API:

- **Smart Gateway**: Connect your devices to the Smart Gateway and add your devices to the Smart Gateway's configuration. It's also recommended to set static IP on your smart gateway.
- **Home Assistant**: Add the Iskra integration, enter Smart Gateway's **IP address**, and select **RestAPI** as the connection type within the Home Assistant integration. If authentication is required, Home Assistant will prompt you to enter Smart Gateway's **credentials**. All devices configured on Smart Gateway will be automatically added to your Home Assistant.


### Modbus TCP connection

If your device supports a direct internet connection, such as PQ meters (iMC/MC series/ iMT/MT series usually), you can use Modbus TCP:

- **Device**: Find your device using the [MiQen](https://www.iskra.si/sl/Programska-oprema/MiQen/) software and configure it to use static IP.
- **Home Assistant**: Add the Iskra integration, enter the devices's **IP address**, and select **Modbus TCP** as the connection type within the Home Assistant integration. Home Assistant will prompt you to enter the Modbus TCP port and Modbus address of your device.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix grammatical issues and clarify configuration steps.

There are grammatical issues and the configuration steps could be clearer.

-## Configuration options
+## Configuration options
 
 There are two ways to configure your devices with Home Assistant:
 
 ### Smart Gateway with REST API
 
 If your device supports Modbus RTU over RS485/IR, you can use Iskra's Smart Gateway to connect them via the REST API:
 
-- **Smart Gateway**: Connect your devices to the Smart Gateway and add your devices to the Smart Gateway's configuration. It's also recommended to set static IP on your smart gateway.
+- **Smart Gateway**: Connect your devices to the Smart Gateway and add your devices to the Smart Gateway's configuration. It's also recommended to set a static IP on your smart gateway.
-- **Home Assistant**: Add the Iskra integration, enter Smart Gateway's **IP address**, and select **RestAPI** as the connection type within the Home Assistant integration. If authentication is required, Home Assistant will prompt you to enter Smart Gateway's **credentials**. All devices configured on Smart Gateway will be automatically added to your Home Assistant.
+- **Home Assistant**: Add the Iskra integration, enter the Smart Gateway's **IP address**, and select **RestAPI** as the connection type within the Home Assistant integration. If authentication is required, Home Assistant will prompt you to enter the Smart Gateway's **credentials**. All devices configured on the Smart Gateway will be automatically added to your Home Assistant.
 
 
 ### Modbus TCP connection
 
 If your device supports a direct internet connection, such as PQ meters (iMC/MC series/ iMT/MT series usually), you can use Modbus TCP:
 
-- **Device**: Find your device using the [MiQen](https://www.iskra.si/sl/Programska-oprema/MiQen/) software and configure it to use static IP.
+- **Device**: Find your device using the [MiQen](https://www.iskra.si/sl/Programska-oprema/MiQen/) software and configure it to use a static IP.
-- **Home Assistant**: Add the Iskra integration, enter the devices's **IP address**, and select **Modbus TCP** as the connection type within the Home Assistant integration. Home Assistant will prompt you to enter the Modbus TCP port and Modbus address of your device.
+- **Home Assistant**: Add the Iskra integration, enter the device's **IP address**, and select **Modbus TCP** as the connection type within the Home Assistant integration. Home Assistant will prompt you to enter the Modbus TCP port and Modbus address of your device.
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
## Configuration options
There are two ways to configure your devices with Home Assistant:
### Smart Gateway with REST API
If your device supports Modbus RTU over RS485/IR, you can use Iskra's Smart Gateway to connect them via the REST API:
- **Smart Gateway**: Connect your devices to the Smart Gateway and add your devices to the Smart Gateway's configuration. It's also recommended to set static IP on your smart gateway.
- **Home Assistant**: Add the Iskra integration, enter Smart Gateway's **IP address**, and select **RestAPI** as the connection type within the Home Assistant integration. If authentication is required, Home Assistant will prompt you to enter Smart Gateway's **credentials**. All devices configured on Smart Gateway will be automatically added to your Home Assistant.
### Modbus TCP connection
If your device supports a direct internet connection, such as PQ meters (iMC/MC series/ iMT/MT series usually), you can use Modbus TCP:
- **Device**: Find your device using the [MiQen](https://www.iskra.si/sl/Programska-oprema/MiQen/) software and configure it to use static IP.
- **Home Assistant**: Add the Iskra integration, enter the devices's **IP address**, and select **Modbus TCP** as the connection type within the Home Assistant integration. Home Assistant will prompt you to enter the Modbus TCP port and Modbus address of your device.
## Configuration options
There are two ways to configure your devices with Home Assistant:
### Smart Gateway with REST API
If your device supports Modbus RTU over RS485/IR, you can use Iskra's Smart Gateway to connect them via the REST API:
- **Smart Gateway**: Connect your devices to the Smart Gateway and add your devices to the Smart Gateway's configuration. It's also recommended to set a static IP on your smart gateway.
- **Home Assistant**: Add the Iskra integration, enter the Smart Gateway's **IP address**, and select **RestAPI** as the connection type within the Home Assistant integration. If authentication is required, Home Assistant will prompt you to enter the Smart Gateway's **credentials**. All devices configured on the Smart Gateway will be automatically added to your Home Assistant.
### Modbus TCP connection
If your device supports a direct internet connection, such as PQ meters (iMC/MC series/ iMT/MT series usually), you can use Modbus TCP:
- **Device**: Find your device using the [MiQen](https://www.iskra.si/sl/Programska-oprema/MiQen/) software and configure it to use a static IP.
- **Home Assistant**: Add the Iskra integration, enter the device's **IP address**, and select **Modbus TCP** as the connection type within the Home Assistant integration. Home Assistant will prompt you to enter the Modbus TCP port and Modbus address of your device.
Tools
Markdownlint

47-47: Expected: 1; Actual: 2
Multiple consecutive blank lines

(MD012, no-multiple-blanks)

@joostlek joostlek added the parent-merged The parent PR has been merged already label Sep 4, 2024
@iskrakranj iskrakranj marked this pull request as ready for review September 4, 2024 13:40
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Outside diff range, codebase verification and nitpick comments (2)
source/_integrations/iskra.markdown (2)

21-34: Add blank lines to improve readability.

The supported devices section provides useful information about the compatible devices. To improve readability, please add blank lines before and after the lists as suggested by Markdownlint.

Apply this diff to add blank lines:

 ### Energy meters
 
+
 Most Iskra's DIN rail mountable energy meters support Modbus RTU over RS485 and IR. To integrate them, you will need a Modbus TCP gateway or Iskra's Smart Gateway:
+
 - Impact series ([IE38XX / IE14XX](https://www.iskra.eu/en/Iskra-Energy-meters/))
 - WM series ([WM3XX / WM1XX](https://www.iskra.eu/en/Iskra-Energy-meters/))
+
 
 ### Power quality analyzers
 
+
 These devices typically support Ethernet connections and use Modbus TCP for data polling:
+
 - iMT/MT series ([MTXXX / iMTXXX](https://www.iskra.eu/en/NEW_SERIES_Universal_measuring_devices_/))
 - iMC/MC series ([MCXXX / iMCXXX](https://www.iskra.eu/en/NEW_SERIES_Universal_measuring_devices_/))
+
Tools
Markdownlint

26-26: null
Lists should be surrounded by blank lines

(MD032, blanks-around-lists)


36-53: Remove extra blank line.

The configuration options section provides clear instructions for setting up devices with the integration. To improve the formatting, please remove the extra blank line between the two configuration options as suggested by Markdownlint.

Apply this diff to remove the extra blank line:

 - **Home Assistant**: Add the Iskra integration, enter Smart Gateway's **IP address**, and select **RestAPI** as the connection type within the Home Assistant integration. If authentication is required, Home Assistant will prompt you to enter Smart Gateway's **credentials**. All devices configured on Smart Gateway will be automatically added to your Home Assistant.
 
-
 ### Modbus TCP connection
 
 If your device supports a direct internet connection, such as PQ meters (iMC/MC series/ iMT/MT series usually), you can use Modbus TCP:
Tools
Markdownlint

47-47: Expected: 1; Actual: 2
Multiple consecutive blank lines

(MD012, no-multiple-blanks)

iskrakranj and others added 2 commits September 4, 2024 15:44
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@iskrakranj iskrakranj marked this pull request as draft September 4, 2024 13:46
@iskrakranj iskrakranj marked this pull request as ready for review September 4, 2024 13:48
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Comment on lines +1 to +81
---
title: Iskra
description: Instructions on how to connect your Iskra energy meters to Home Assistant.
ha_release: "2024.10"
ha_category:
- Energy
- Sensor
ha_codeowners:
- '@iskramis'
ha_config_flow: true
ha_domain: iskra
ha_iot_class: local_polling
ha_platforms:
- sensor
ha_integration_type: integration
---


The [Iskra](https://www.iskra.eu/) {% term integration %} allows you to connect Iskra energy meters and power quality analyzers to Home Assistant. Data is polled using Modbus TCP or the Iskra Smart Gateway's REST API.

## Supported devices

### Energy meters

Most Iskra's DIN rail mountable energy meters support Modbus RTU over RS485 and IR. To integrate them, you will need a Modbus TCP gateway or Iskra's Smart Gateway:

- Impact series ([IE38XX / IE14XX](https://www.iskra.eu/en/Iskra-Energy-meters/))
- WM series ([WM3XX / WM1XX](https://www.iskra.eu/en/Iskra-Energy-meters/))

### Power quality analyzers

These devices typically support Ethernet connections and use Modbus TCP for data polling:

- iMT/MT series ([MTXXX / iMTXXX](https://www.iskra.eu/en/NEW_SERIES_Universal_measuring_devices_/))
- iMC/MC series ([MCXXX / iMCXXX](https://www.iskra.eu/en/NEW_SERIES_Universal_measuring_devices_/))

## Configuration options

There are two ways to configure your devices with Home Assistant:
- [Using a Smart Gateway with REST API](#smart-gateway-with-rest-api)
- [Using a Modbus TCP connection](#modbus-tcp-connection)

### Smart Gateway with REST API

If your device supports Modbus RTU over RS485/IR, you can use Iskra's Smart Gateway to connect them via the REST API:

- **Smart Gateway**: Connect your devices to the Smart Gateway and add your devices to the Smart Gateway's configuration. It's also recommended to set a static IP on your smart gateway.
- **Home Assistant**: Add the Iskra integration, enter the Smart Gateway's **IP address**, and select **RestAPI** as the connection type within the Home Assistant integration. If authentication is required, Home Assistant will prompt you to enter the Smart Gateway's **credentials**. All devices configured on the Smart Gateway will be automatically added to your Home Assistant.

### Modbus TCP connection

If your device supports a direct internet connection, such as PQ meters (iMC/MC series/ iMT/MT series usually), you can use Modbus TCP:

- **Device**: Find your device using the [MiQen](https://www.iskra.si/sl/Programska-oprema/MiQen/) software and configure it to use a static IP.
- **Home Assistant**: Add the Iskra integration, enter the device's **IP address**, and select **Modbus TCP** as the connection type within the Home Assistant integration. Home Assistant will prompt you to enter the Modbus TCP port and Modbus address of your device.

{% include integrations/config_flow.md %}

## Sensors

The integration provides detailed information about power, current, and voltage for each phase. The data is updated every minute.

| Name | Unit | Description |
| ------------------- | ---- | :-------------------------------------------------------------------------- |
| total_active_power | W | Total active power. |
| total_reactive_power| var | Total reactive power. |
| total_apparent_power| VA | Total apparent power. |
| phase1_power | W | Active power of phase 1. |
| phase2_power | W | Active power of phase 2. |
| phase3_power | W | Active power of phase 3. |
| phase1_voltage | V | Voltage of phase 1. |
| phase2_voltage | V | Voltage of phase 2. |
| phase3_voltage | V | Voltage of phase 3. |
| phase1_current | A | Current of phase 1. |
| phase2_current | A | Current of phase 2. |
| phase3_current | A | Current of phase 3. |
| frequency | Hz | Frequency. |

## Note

This integration supports Iskra's energy meters, not Iskra Emeco ones.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comprehensive Review of the Iskra Integration Documentation

The documentation is well-structured and covers essential aspects of the Iskra integration. Below are detailed comments for each section to ensure clarity, accuracy, and adherence to Home Assistant's documentation standards.

Front Matter (Lines 1-16):

  • The metadata at the top of the file is correctly formatted and includes all necessary fields such as title, description, ha_release, and others. This section is crucial for integration with Home Assistant's documentation system and seems to be correctly set up.

Introduction and Device Support (Lines 19-35):

  • The introduction clearly explains what the Iskra integration does and mentions the connection methods available. This is crucial for users to understand the scope of the integration.
  • The supported devices section is well-detailed, providing links to the products which can help users verify their device compatibility.

Configuration Options (Lines 37-55):

  • The configuration section is divided into two parts: using a Smart Gateway with REST API and using a Modbus TCP connection. This division is logical and caters to different user needs based on their hardware setup.
  • However, there is a hint from static analysis tools regarding the need for blank lines around lists (MD032). This needs to be addressed to comply with Markdown standards.

Sensors (Lines 59-77):

  • The sensors section is comprehensive, listing all the sensors provided by the integration along with their units and descriptions. This is crucial for users to understand the data they can monitor.
  • The table format is appropriate for this kind of data presentation, making it easy for users to quickly scan and find information.

General Note (Lines 79-81):

  • The note clarifying the support for Iskra's energy meters and not Iskra Emeco ones is an important distinction that helps manage user expectations.

Suggestions for Improvement:

  • Add Blank Lines Around Lists: To comply with Markdownlint's suggestion and improve readability, add blank lines around the lists in the configuration options section.
  • Clarify REST API Configuration: Previous comments suggest that the steps for configuring the REST API connection type could be clearer. It might be beneficial to include more detailed steps or diagrams if possible.

Overall, the documentation is well-prepared but could benefit from minor adjustments for clarity and formatting compliance.

Tools
Markdownlint

40-40: null
Lists should be surrounded by blank lines

(MD032, blanks-around-lists)

Copy link
Contributor

@c0ffeeca7 c0ffeeca7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @iskrakranj 👍

@c0ffeeca7 c0ffeeca7 merged commit e8b8547 into home-assistant:next Sep 9, 2024
7 checks passed
@home-assistant home-assistant bot removed the parent-merged The parent PR has been merged already label Sep 9, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Sep 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
has-parent This PR has a parent PR in a other repo new-integration This PR adds documentation for a new Home Assistant integration next This PR goes into the next branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants