core icon indicating copy to clipboard operation
core copied to clipboard

Add new integration Discovergy

Open jpbede opened this issue 3 years ago β€’ 74 comments

Breaking change

None

Proposed change

This PR adds a new integration for Discovergy smart meters (electricity & gas).

Type of change

  • [ ] Dependency upgrade
  • [ ] Bugfix (non-breaking change which fixes an issue)
  • [x] New integration (thank you!)
  • [ ] New feature (which adds functionality to an existing integration)
  • [ ] Breaking change (fix/feature causing existing functionality to break)
  • [ ] Code quality improvements to existing code or addition of tests

Additional information

  • This PR fixes or closes issue: -
  • This PR is related to issue: -
  • Link to documentation pull request: https://github.com/home-assistant/home-assistant.io/pull/18850

Checklist

  • [x] The code change is tested and works locally.
  • [x] Local tests pass. Your PR cannot be merged unless tests pass
  • [x] There is no commented out code in this PR.
  • [x] I have followed the development checklist
  • [x] The code has been formatted using Black (black --fast homeassistant tests)
  • [x] Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • [x] The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • [x] New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • [x] Untested files have been added to .coveragerc.

The integration reached or maintains the following Integration Quality Scale:

  • [x] No score or internal
  • [ ] πŸ₯ˆ Silver
  • [ ] πŸ₯‡ Gold
  • [ ] πŸ† Platinum

To help with the load of incoming pull requests:

jpbede avatar Aug 08 '21 18:08 jpbede

Hi @jpbede,

It seems you haven't yet signed a CLA. Please do so here.

Once you do that we will be able to review and accept this pull request.

Thanks!

homeassistant avatar Aug 08 '21 18:08 homeassistant

Thanks @ludeeus and @tkdrob for the fast review. I've implemented your suggestions. Additionally i've disabled the phase-specific sensor by default, as suggested in the PR for the documentation.

jpbede avatar Aug 09 '21 11:08 jpbede

Thanks @ludeeus for this second review. I've also implemented that suggestions.

jpbede avatar Aug 09 '21 14:08 jpbede

Thanks @ludeeus for this third review. I've also implemented that suggestions and merged the current dev into the branch.

jpbede avatar Aug 12 '21 10:08 jpbede

Thanks @Danielhiversen for the review. I've implemented your feedback except the last one about native_value.

jpbede avatar Sep 16 '21 16:09 jpbede

Is there anything else needed to get this merged ? :)

jpbede avatar Sep 26 '21 08:09 jpbede

Is there anything needed or i can do to get this merged ? :)

jpbede avatar Nov 01 '21 12:11 jpbede

Is there anything needed or i can do to get this merged ? :)

I know 3 months seems like a long time to get an integration in. There are PRs that remain open for a year before merging. This is a very activate project and so they have to balance between PRs from contributes and other things they want to get done to push the platform further towards the mainstream. Patience is key πŸ˜‰

tkdrob avatar Nov 01 '21 15:11 tkdrob

Yeah, i know, i just wanted to know if there is anything missing in this PR ☺️ If it is just waiting then everything is fine and i'm going to update this branch regularly.

jpbede avatar Nov 01 '21 15:11 jpbede

I am very interested in testing and helping with this integration. Please let me know if I can assist with anything.

petrusb83 avatar Feb 20 '22 14:02 petrusb83

@petrusb83 I would be happy if you could test this integration with your Discovergy account :).

jpbede avatar Mar 03 '22 10:03 jpbede

@petrusb83 I would be happy if you could test this integration with your Discovergy account :).

I got it set up and it is working perfectly. No issues so far.

petrusb83 avatar Mar 03 '22 11:03 petrusb83

I am also interested in testing. I am not really familiar how to test a pull request in my HA-Docker-Container. Any hints?

andbez avatar Mar 24 '22 12:03 andbez

I am also interested in testing. I am not really familiar how to test a pull request in my HA-Docker-Container. Any hints?

Thanks for willing to test. What you could do is, creating a folder custom_components in your HASS config folder, downloading the discovergy folder and place it there. Don't forget to restart HASS.

jpbede avatar Apr 01 '22 11:04 jpbede

Hi, integration works perfect. Just two questions:

  1. I saw that power1-3 are disabled by default, but I see no possibility in the device-config to enable them (I don't have them listed). Is this the intended behaviour?
  2. I have a sensor called "Total Production", which shows - since the beginning - 0,2021001 kWh. What is the meaning of this sensor? (btw I don't produce energy)

Nevertheless, Thanks for this integration and crossing fingers, that it will soon become official.

Joerg

derjoerg avatar Apr 07 '22 09:04 derjoerg

@derjoerg thanks for testing.

  1. I saw that power1-3 are disabled by default, but I see no possibility in the device-config to enable them (I don't have them listed). Is this the intended behaviour?

You should have an option called "+3 hidden entities" under the sensors, if you click on it, it will expand and you will see the 3 disabled entities. If you click on one of it, it will open a modal with additional settings where you can enable it.

CleanShot 2022-04-07 at 11 30 08

  1. I have a sensor called "Total Production", which shows - since the beginning - 0,2021001 kWh. What is the meaning of this sensor? (btw I don't produce energy)

Discovergy usually installs a 2-way meter suitable for solar production. Since I cannot distinguish whether you are producing energy or not when the integration gets activated, the total production sensor is activated by default. You can deactivate it in the same way as you activate a sensor.

jpbede avatar Apr 07 '22 09:04 jpbede

Mine has been running beautifully since 20 Feb with no issues. The next step is to think how I am going to use more energy locally instead of pushing it to the grid. I am having a smart water boiler install that will heat my water if I have excess solar. Getting only 7 euro cent per kWh I put into the grid!!! image

petrusb83 avatar Apr 07 '22 09:04 petrusb83

I can second that. :1st_place_medal: This is also working nicely for me for the last 6 months! I did not see any problems with the integration so far. Absolutely happy with the integration. Still it would be great to have it in the official distribution ;D

schlac avatar Apr 07 '22 10:04 schlac

Thank you everyone for testing. Appreciate that!

jpbede avatar Apr 07 '22 13:04 jpbede

You should have an option called "+3 hidden entities" under the sensors, if you click on it, it will expand and you will see the 3 disabled entities. If you click on one of it, it will open a modal with additional settings where you can enable it.

No :(

grafik

derjoerg avatar Apr 08 '22 08:04 derjoerg

No :(

Okay, it could be that Discovergy does not provide this data via the API for your meter. Do you have it in the Discovergy portal?

jpbede avatar Apr 08 '22 08:04 jpbede

I see Phase 1-3 and also Spannung 1-3 in the portal grafik

derjoerg avatar Apr 08 '22 08:04 derjoerg

I see Phase 1-3 and also Spannung 1-3 in the portal

Okay, then the keys for this are different. Could you please update the integration, I added the diagnostic function yesterday. Could you then email me the text file ([email protected]) and I'll look into it and add support for it.

jpbede avatar Apr 08 '22 08:04 jpbede

Email is out

derjoerg avatar Apr 08 '22 08:04 derjoerg

@derjoerg if you update the integration again, it should now detect the other sensors.

jpbede avatar Apr 08 '22 16:04 jpbede

Perfect,

works like a charme!

derjoerg avatar Apr 10 '22 19:04 derjoerg

I installed this integration too, works like i charme! Perfect!

wunni1 avatar Apr 14 '22 21:04 wunni1

Just as an FYI: Still works like a charme :)

derjoerg avatar Jun 27 '22 20:06 derjoerg

Hello guys, I'm new to HA and tried to integrate this integration into HA. But I can't get any further, I installed that using HACS. But from there it gets stuck, I have to enter data somewhere to log in or not.

Greetings Maggi

Maggi0r avatar Jul 21 '22 09:07 Maggi0r

Hello guys, I'm new to HA and tried to integrate this integration into HA. But I can't get any further, I installed that using HACS. But from there it gets stuck, I have to enter data somewhere to log in or not.

Thanks for testing! Just follow this link and you will be prompted for your login credentials: https://my.home-assistant.io/redirect/config_flow_start/?domain=discovergy

jpbede avatar Jul 21 '22 10:07 jpbede