Skip to content

McHughCyber/DiUS_Powersensor

 
 

Repository files navigation

DiUS Powersensor

coverage badge GitHub Release License

hacs Project Maintenance hacs_downloads

Discord Community Forum

Maintenance Status

This is a maintained fork of the original DiUS Powersensor integration by @drc38. The original repository has been inactive for several years, so this fork has been created to continue development and provide ongoing support for users.

Original Author: @drc38 Current Maintainer: @McHughCyber

We acknowledge and thank the original author for their excellent work in creating this integration. This fork maintains compatibility with the original while providing active maintenance, bug fixes, and new features.

Powersensor Home Assistant full integration prototype

This is an attempt at a standalone Powersensor integration with Home Assistant. Kudos to @izevaka for figuring out the sensor interface.

TO DO

  1. Make the connection more robust (reconnect/close etc)
  2. Add extra sensors
  3. Improve testing

Installation

HACS

HACS is recommended as it provides automated install and will notify you when updates are available.

This assumes you have HACS installed and know how to use it. If you need help with this, go to the HACS project documentation.

Add custom repository in HACS

  1. Click on HACS in your menu to open the HACS panel, then click on integrations (https://your.domain/hacs/integrations).
  2. Click on the 3 dots in the top right corner.
  3. Select "Custom repositories"
  4. Add the URL to the repository: https://github.com/McHughCyber/DiUS_Powersensor
  5. Select the integration category.
  6. Click the "ADD" button.

Once done, you should see the new repository, appearing in a list like this. Click the Download button

Manual Installation

  1. Using the tool of choice open the directory (folder) for your HA configuration (where you find configuration.yaml).
  2. If you do not have a custom_components directory (folder) there, you need to create it.
  3. In the custom_components directory (folder) create a new folder called dius.
  4. Download all the files from the custom_components/dius/ directory (folder) in this repository.
  5. Place the files you downloaded in the new directory (folder) you created.
  6. Restart Home Assistant
  7. In the HA UI go to "Integrations" click "+" and search for "DiUS_Powersensor"

Migrating from the Original Repository

If you're currently using the original integration from drc38/DiUS_Powersensor and want to migrate to this maintained fork:

HACS Users

  1. Remove the old custom repository:

    • Go to HACS → Integrations
    • Click the 3 dots on "DiUS Powersensor"
    • Select "Remove custom repository"
    • Uninstall the integration (if prompted)
  2. Add the new repository:

    • Follow the HACS installation instructions above using https://github.com/McHughCyber/DiUS_Powersensor
    • Install the integration
    • Restart Home Assistant

Your existing configuration will be preserved automatically. You may need to reconfigure the integration if there have been breaking changes (check release notes).

Manual Installation Users

  1. Remove the old integration files from custom_components/dius/
  2. Follow the manual installation steps above
  3. Restart Home Assistant

Your configuration entries should remain intact, but you may need to reconfigure if prompted.

Configuration

Configuration of the integration is done within the Integrations Panel in Home Assistant.

  1. Navigate to Integrations
  2. Click Add Integration
  3. Search for DiUS Powersensor
  4. Find your plug/gateway's IP address in the Powersensor mobile app

image

  1. Enter the IP address in the configuration, NB set your router to prevent the IP changing. Click Submit
  2. Click Configure on the newly created integration. By default the Main Power sensor and Plug sensor are selected, they can be unselected by clicking Configure. A power offset can also be applied to sensor readings eg -100W.

Contributions are welcome!

If you want to contribute to this please read the Contribution guidelines

Credits

This project was generated from @oncleben31's Home Assistant Custom Component Cookiecutter template.

Code template was mainly taken from @Ludeeus's integration_blueprint template


About

Home Assistant Custom Integration for DiUS Powersensors

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%