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 IoTMeter documentation #33345

Draft
wants to merge 6 commits into
base: next
Choose a base branch
from
Draft

Add IoTMeter documentation #33345

wants to merge 6 commits into from

Conversation

lipic
Copy link

@lipic lipic commented Jun 21, 2024

Proposed change

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

  • New Features
    • Introduced IoTMeter integration for Home Assistant.
    • Enabled real-time monitoring and management of IoT meters.
    • Added sensors for total power, consumption energy, generation energy, and EVSE status.
    • Added controls for max charging current (SmartModule only).

@home-assistant home-assistant bot added the current This PR goes into the current branch label Jun 21, 2024
Copy link
Contributor

coderabbitai bot commented Jun 21, 2024

Walkthrough

The recent updates introduce the IoTMeter integration for Home Assistant, allowing users to monitor and manage IoT meters in real time. This integration supports sensors for tracking power, energy consumption, generation, and EVSE status, as well as configurable entities for setting the maximum charging current for SmartModule devices.

Changes

File Summary
source/_integrations/iotmeter.markdown Introduced the IoTMeter integration with sensors for power metrics and EVSE status. Added entities for configuring max charging current.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant HomeAssistant
    participant IoTMeterAPI

    User->>HomeAssistant: Add IoTMeter integration
    HomeAssistant->>IoTMeterAPI: Get initial meter data
    IoTMeterAPI-->>HomeAssistant: Return meter data
    HomeAssistant-->>User: Display real-time meter data

    User->>HomeAssistant: Adjust max charging current
    HomeAssistant->>IoTMeterAPI: Send newcharging current setting
    IoTMeterAPI-->>HomeAssistant: Confirm setting change
    HomeAssistant-->>User: Update UI with confirmation
Loading

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 as 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.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration 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

netlify bot commented Jun 21, 2024

Deploy Preview for home-assistant-docs ready!

Name Link
🔨 Latest commit 1d91604
🔍 Latest deploy log https://app.netlify.com/sites/home-assistant-docs/deploys/667ae581f4479900080f1efc
😎 Deploy Preview https://deploy-preview-33345--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 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

Comment on lines 31 to 41
To configure the IoTMeter integration, add the following to your `configuration.yaml` file:

```yaml
iotmeter:
username: YOUR_USERNAME
password: YOUR_PASSWORD
meters:
- id: METER_ID_1
name: "Living Room Meter"
- id: METER_ID_2
name: "Kitchen Meter"
Copy link
Contributor

Choose a reason for hiding this comment

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

Configuration Instructions Review

The YAML configuration snippet provided is clear and well-formatted. It effectively instructs users on how to add IoTMeter to their configuration.yaml. However, consider adding a brief description for each field to enhance user understanding.

iotmeter:
  username: YOUR_USERNAME  # Replace YOUR_USERNAME with your IoTMeter account username.
  password: YOUR_PASSWORD  # Replace YOUR_PASSWORD with your IoTMeter account password.
  meters:
    - id: METER_ID_1  # Replace METER_ID_1 with the actual meter ID.
      name: "Living Room Meter"  # Optional: Name your meter for easier identification.
    - id: METER_ID_2  # Replace METER_ID_2 with the actual meter ID.
      name: "Kitchen Meter"  # Optional: Name your meter for easier identification.
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
To configure the IoTMeter integration, add the following to your `configuration.yaml` file:
```yaml
iotmeter:
username: YOUR_USERNAME
password: YOUR_PASSWORD
meters:
- id: METER_ID_1
name: "Living Room Meter"
- id: METER_ID_2
name: "Kitchen Meter"
To configure the IoTMeter integration, add the following to your `configuration.yaml` file:
```yaml
iotmeter:
username: YOUR_USERNAME # Replace YOUR_USERNAME with your IoTMeter account username.
password: YOUR_PASSWORD # Replace YOUR_PASSWORD with your IoTMeter account password.
meters:
- id: METER_ID_1 # Replace METER_ID_1 with the actual meter ID.
name: "Living Room Meter" # Optional: Name your meter for easier identification.
- id: METER_ID_2 # Replace METER_ID_2 with the actual meter ID.
name: "Kitchen Meter" # Optional: Name your meter for easier identification.
```
Tools
LanguageTool

[misspelling] ~31-~31: Possible spelling mistake found. (MORFOLOGIK_RULE_EN_US)
Context: ...tor ## Configuration To configure the IoTMeter integration, add the following to your ...

@TheJulianJES TheJulianJES changed the title Added IoTMeter documentation Add IoTMeter documentation Jun 21, 2024
@home-assistant home-assistant bot added the has-parent This PR has a parent PR in a other repo label Jun 21, 2024
@TheJulianJES TheJulianJES added the awaits-parent Awaits the merge of an parent PR label Jun 21, 2024
@c0ffeeca7
Copy link
Contributor

As this is related to a code change, please do the following:

  • add the link to the related core PR in the PR template under Link to parent pull request
  • Rebase and point the PR against the next branch

@c0ffeeca7 c0ffeeca7 added new-integration This PR adds documentation for a new Home Assistant integration and removed current This PR goes into the current branch labels Jun 25, 2024
@home-assistant home-assistant bot added current This PR goes into the current branch in-progress This PR/Issue is currently being worked on needs-rebase The PR has been branched of the wrong base branch or targets an incorrect target branch labels Jun 25, 2024
@home-assistant
Copy link

It seems that this PR is targeted against an incorrect branch since it has a parent PR on one of our codebases. Documentation that needs to be updated for an upcoming release should target the next branch. Please change the target branch of this PR to next and rebase if needed.

@lipic lipic changed the base branch from current to next June 25, 2024 07:15
@home-assistant home-assistant bot removed current This PR goes into the current branch needs-rebase The PR has been branched of the wrong base branch or targets an incorrect target branch labels Jun 25, 2024
@home-assistant home-assistant bot added the next This PR goes into the next branch label Jun 25, 2024
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

---

The **IoTMeter** {% term integration %} allows you to monitor and manage your IoT meters within Home Assistant. This integration provides real-time data and control over your connected devices.

Copy link
Contributor

Choose a reason for hiding this comment

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

Are there any prerequisites? Anything I should have before adding the integration? For example an account with IoTMeter? Do I need to have my login credentials ready?

- Total power
- Total consumption energy
- Total generation energy
- EVSE status
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- EVSE status
- <abbr title="electric vehicle supply equipment">EVSE</abbr> status


The {% term integration %} adds the following sensors:

- Total power
Copy link
Contributor

Choose a reason for hiding this comment

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

can you add more details? For example the unit. What is the total consumption? Per day, week, since start of measurement

Copy link
Author

Choose a reason for hiding this comment

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

Of course. I have added it.

Copy link
Contributor

Choose a reason for hiding this comment

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

Nice! Thank you for the added descriptions!

@home-assistant
Copy link

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍

Learn more about our pull request process.

@home-assistant home-assistant bot marked this pull request as draft June 25, 2024 08:04
- Total Power (unit: kW)
This sensor measures the total power being consumed at any given time. It is useful for monitoring overall power usage and identifying peak consumption periods.

- Total Consumption Energy (unit: kWh)
Copy link
Contributor

@c0ffeeca7 c0ffeeca7 Jun 25, 2024

Choose a reason for hiding this comment

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

Is there a reason you changed from sentence-style to heading-style capitalization? Is this how the UI strings are written? We usually use sentence-style capitalization, also in headings.

Copy link
Author

Choose a reason for hiding this comment

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

I changed it unknowingly. Should I correct it to sentence-style capitalization and push it again?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, please :)

Copy link
Author

Choose a reason for hiding this comment

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

Done :-)

ha_integration_type: integration
---

The **IoTMeter** {% term integration %} allows you to monitor and manage your IoT meters within Home Assistant. This integration provides real-time data and control over your connected devices.
Copy link
Contributor

@c0ffeeca7 c0ffeeca7 Jun 25, 2024

Choose a reason for hiding this comment

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

When you say your IoT meters, is this the product you are referring to http://evracing.cz/iotmeter/iotmeter_EN.pdf?

Copy link
Author

Choose a reason for hiding this comment

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

Yes it is this product


The {% term integration %} adds the following sensors:

- Total power (unit: kW)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- Total power (unit: kW)
- **Total power** (unit: kW):

We use bold to mark UI strings. I also added a colon. Otherwise, It would look like this:
image

- Total power (unit: kW)
This sensor measures the total power being consumed at any given time. It is useful for monitoring overall power usage and identifying peak consumption periods.

- Total consumption energy (unit: kWh)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- Total consumption energy (unit: kWh)
- **Total energy consumption** (unit: kWh):

I took the liberty to rephrase this UI string, as it seems more logical. However, it is important that the UI string is the same as the one shown in the software. So please feel free to ignore the rephrase if this does not work with the software.

- Total consumption energy (unit: kWh)
This sensor tracks the total amount of energy consumed since the start of the measurement period. It helps in understanding long-term energy usage patterns and can be used for energy management and optimization.

- Total generation energy (unit: kWh)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- Total generation energy (unit: kWh)
- **Total energy generated** (unit: kWh):

- Total generation energy (unit: kWh)
This sensor measures the total amount of energy generated since the start of the measurement period. It is particularly useful for systems that include renewable energy sources, such as solar panels, and helps in tracking the efficiency and output of these systems.

- EVSE status
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- EVSE status
- **EVSE status**:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaits-parent Awaits the merge of an parent PR has-parent This PR has a parent PR in a other repo in-progress This PR/Issue is currently being worked on 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