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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add explicit support for Luxembourg Smarty meter in dsmr integration #43975

Merged
merged 3 commits into from
Dec 27, 2020

Conversation

RobBie1221
Copy link
Contributor

@RobBie1221 RobBie1221 commented Dec 5, 2020

Breaking change

Proposed change

Before connection validation in dsmr integration, Smarty meters used to work with the integration. This broke because Smarty is using a slightly different specification. As of library version 0.24, this is fully supported from the library. This PR adds explicit support for the Smarty meter restoring the functioning of it.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • 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

Example entry for configuration.yaml:

# Example configuration.yaml

Additional information

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Black (black --fast homeassistant tests)
  • 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:

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

The integration reached or maintains the following Integration Quality Scale:

  • No score or internal
  • 馃 Silver
  • 馃 Gold
  • 馃弳 Platinum

To help with the load of incoming pull requests:

@project-bot project-bot bot added this to Needs review in Dev Dec 5, 2020
@project-bot project-bot bot moved this from Needs review to By Code Owner in Dev Dec 5, 2020
@adonno
Copy link

adonno commented Dec 6, 2020

out of curiosity will that also take care of the decryption?

@RobBie1221
Copy link
Contributor Author

RobBie1221 commented Dec 6, 2020

No it won't. It will just map the correct OBIS references as described here:
https://smarty.creos.net/wp-content/uploads/P1PortSpecification.pdf
For decryption there is no PyPi package available, if someone makes it available there, we can theoretically add it.

@adonno
Copy link

adonno commented Dec 6, 2020

Thank you for the info the only ones doing encryption :-( WHY ....

@zuidwijk
Copy link

zuidwijk commented Dec 6, 2020

No it won't. It will just map the correct OBIS references as described here:

https://smarty.creos.net/wp-content/uploads/P1PortSpecification.pdf

For decryption there is no PyPi package available, if someone makes it available there, we can theoretically add it.

I'm quite new to Python, yet I know there is a python script which decrypt te serial data. Is that possible to use as kind of wrapper?

@RobBie1221
Copy link
Contributor Author

As this is code communicating with a device, it needs to be put in a library and published on PyPi. As mentioned, if someone can make the script available as library on PyPi, it can integrated in HA.

@Trefex
Copy link

Trefex commented Dec 8, 2020

Thank you for the info the only ones doing encryption :-( WHY ....

https://github.com/mweimerskirch/smarty_dsmr_proxy

@zuidwijk
Copy link

zuidwijk commented Dec 8, 2020

Thank you for the info the only ones doing encryption :-( WHY ....

https://github.com/mweimerskirch/smarty_dsmr_proxy

This is the python code I mentioned... what if this could be integrated into HA (I'm looking into this to see if I can make this to a pypi library).

Meanwhile I've received information from usriot that they are able to enable decryption in their serial module. If that's true and working, than I can supply ethernet dongles with decryption build in ... fingers crossed, hoping for a positive reaction.

@Trefex
Copy link

Trefex commented Dec 14, 2020

Is there something blocking here?

I am stuck in old version.

Thanks a lot !

@RobBie1221
Copy link
Contributor Author

It needs a review from a core developer.

@Trefex
Copy link

Trefex commented Dec 25, 2020

@RobBie1221 i see another PR of yours was already merged. Do we know if there is something blocking?

@RobBie1221
Copy link
Contributor Author

@RobBie1221 i see another PR of yours was already merged. Do we know if there is something blocking?

As said, it needs review. It's up to the core team to do that. You could copy the source to the custom_components folder to be able to update home assistant.

Copy link
Member

@MartinHjelmare MartinHjelmare left a comment

Choose a reason for hiding this comment

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

Remove the platform schema change and we can merge.

Dev automation moved this from By Code Owner to Review in progress Dec 27, 2020
Copy link
Member

@MartinHjelmare MartinHjelmare left a comment

Choose a reason for hiding this comment

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

Thanks!

We can clean up the tests and continue the improvement work in other PRs.

Dev automation moved this from Review in progress to Reviewer approved Dec 27, 2020
@MartinHjelmare MartinHjelmare merged commit 9531b08 into home-assistant:dev Dec 27, 2020
Dev automation moved this from Reviewer approved to Done Dec 27, 2020
@MartinHjelmare
Copy link
Member

MartinHjelmare commented Dec 27, 2020

Noticed we're missing a docs PR. Please link that asap.

@RobBie1221 RobBie1221 deleted the dsmr_smarty branch December 27, 2020 08:49
@RobBie1221
Copy link
Contributor Author

Thanks! I'll make the docs PR today.

@RobBie1221
Copy link
Contributor Author

RobBie1221 commented Dec 27, 2020

Added docs PR: home-assistant/home-assistant.io#16025

@Trefex
Copy link

Trefex commented Dec 27, 2020

Thanks a lot for the progress @RobBie1221 !

KJonline pushed a commit to Pyhass/core that referenced this pull request Dec 28, 2020
* 'dev' of https://github.com/home-assistant/core:
  Fix Tasmota device triggers (home-assistant#44574)
  Improve nest setup error handling (home-assistant#44385)
  Tado: add full list of devices (home-assistant#44475)
  Simplify nest event handling (home-assistant#44367)
  Add explicit support for Luxembourg Smarty meter in dsmr integration (home-assistant#43975)
  Fully remove Avri integration (home-assistant#44478)
  Add Olivia voice to Amazon Polly TTS (home-assistant#44513)
  Bump pydeconz to version 77 (home-assistant#44514)
  Add album art support in the mpd component (home-assistant#44527)
  Fix falsey comparisons in NWS weather (home-assistant#44486)
  Upgrade huawei-lte-api to 1.4.17 (home-assistant#44499)
  Update README.rst to avoid redirects (home-assistant#44519)
  Handle missing Somfy devices during update (home-assistant#44425)
  Convert mpd component to use the async MPDClient (home-assistant#44384)
  Bump pywemo to 0.5.6 (home-assistant#44440)
  Support auto as Dyson fan on device state (home-assistant#44472)
  [ci skip] Translation update
  Remove useless async_add_executor_job (home-assistant#44496)
  Fix the docstring in type_fans.py (home-assistant#44511)
@github-actions github-actions bot locked and limited conversation to collaborators Dec 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Dev
  
Done
Development

Successfully merging this pull request may close these issues.

DSMR integration isn't working anymore after updating from 0.113.1 to 0.116.x and 0.117.2
6 participants