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.
This is an attempt at a standalone Powersensor integration with Home Assistant. Kudos to @izevaka for figuring out the sensor interface.
- Make the connection more robust (reconnect/close etc)
- Add extra sensors
- Improve testing
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
- Click on HACS in your menu to open the HACS panel, then click on integrations (https://your.domain/hacs/integrations).
- Click on the 3 dots in the top right corner.
- Select "Custom repositories"
- Add the URL to the repository:
https://github.com/McHughCyber/DiUS_Powersensor - Select the integration category.
- Click the "ADD" button.
Once done, you should see the new repository, appearing in a list like this. Click the Download button
- Using the tool of choice open the directory (folder) for your HA configuration (where you find
configuration.yaml). - If you do not have a
custom_componentsdirectory (folder) there, you need to create it. - In the
custom_componentsdirectory (folder) create a new folder calleddius. - Download all the files from the
custom_components/dius/directory (folder) in this repository. - Place the files you downloaded in the new directory (folder) you created.
- Restart Home Assistant
- In the HA UI go to "Integrations" click "+" and search for "DiUS_Powersensor"
If you're currently using the original integration from drc38/DiUS_Powersensor and want to migrate to this maintained fork:
-
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)
-
Add the new repository:
- Follow the HACS installation instructions above using
https://github.com/McHughCyber/DiUS_Powersensor - Install the integration
- Restart Home Assistant
- Follow the HACS installation instructions above using
Your existing configuration will be preserved automatically. You may need to reconfigure the integration if there have been breaking changes (check release notes).
- Remove the old integration files from
custom_components/dius/ - Follow the manual installation steps above
- Restart Home Assistant
Your configuration entries should remain intact, but you may need to reconfigure if prompted.
Configuration of the integration is done within the Integrations Panel in Home Assistant.
- Navigate to Integrations
- Click Add Integration
- Search for DiUS Powersensor
- Find your plug/gateway's IP address in the Powersensor mobile app
- Enter the IP address in the configuration, NB set your router to prevent the IP changing. Click Submit
- 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.
If you want to contribute to this please read the Contribution guidelines
This project was generated from @oncleben31's Home Assistant Custom Component Cookiecutter template.
Code template was mainly taken from @Ludeeus's integration_blueprint template
