thomasgermain / pymultiMATIC

Python interface with Vaillant multiMATIC
MIT License
56 stars 11 forks source link

Senso app #101

Closed xaviergriffon closed 1 year ago

xaviergriffon commented 1 year ago

Compatibility with Senso APIs. Most of the code is name or schema mapping. There are some specifics for the Quick Veto part and the time program.

I have provided examples of JSON passed in different situations and unit tests to interpret them. With a fork of your vaillant-component, I'm using this code for some times with heating zones and a hot water circuit. I performed tests of temperature change (Quick Veto), shutdown and resumption of the configured program on the boiler.

I'm not a Python developer, any comments are welcome ;)

codecov-commenter commented 1 year ago

Codecov Report

Base: 85.64% // Head: 98.32% // Increases project coverage by +12.68% :tada:

Coverage data is based on head (7dfbacf) compared to base (5c47b55). Patch coverage: 95.02% of modified lines in pull request are covered.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files ```diff @@ Coverage Diff @@ ## senso_app #101 +/- ## ============================================== + Coverage 85.64% 98.32% +12.68% ============================================== Files 27 27 Lines 1790 1910 +120 ============================================== + Hits 1533 1878 +345 + Misses 257 32 -225 ``` | [Impacted Files](https://codecov.io/gh/thomasgermain/pymultiMATIC/pull/101?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Thomas+Germain) | Coverage Δ | | |---|---|---| | [pymultimatic/systemmanager.py](https://codecov.io/gh/thomasgermain/pymultiMATIC/pull/101?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Thomas+Germain#diff-cHltdWx0aW1hdGljL3N5c3RlbW1hbmFnZXIucHk=) | `93.25% <63.63%> (-0.65%)` | :arrow_down: | | [pymultimatic/model/mapper.py](https://codecov.io/gh/thomasgermain/pymultiMATIC/pull/101?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Thomas+Germain#diff-cHltdWx0aW1hdGljL21vZGVsL21hcHBlci5weQ==) | `97.16% <92.59%> (-0.93%)` | :arrow_down: | | [pymultimatic/api/payloads.py](https://codecov.io/gh/thomasgermain/pymultiMATIC/pull/101?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Thomas+Germain#diff-cHltdWx0aW1hdGljL2FwaS9wYXlsb2Fkcy5weQ==) | `98.18% <97.67%> (-1.82%)` | :arrow_down: | | [pymultimatic/api/schemas.py](https://codecov.io/gh/thomasgermain/pymultiMATIC/pull/101?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Thomas+Germain#diff-cHltdWx0aW1hdGljL2FwaS9zY2hlbWFzLnB5) | `100.00% <100.00%> (ø)` | | | [pymultimatic/api/urls\_senso.py](https://codecov.io/gh/thomasgermain/pymultiMATIC/pull/101?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Thomas+Germain#diff-cHltdWx0aW1hdGljL2FwaS91cmxzX3NlbnNvLnB5) | `100.00% <100.00%> (+100.00%)` | :arrow_up: | | [pymultimatic/model/common.py](https://codecov.io/gh/thomasgermain/pymultiMATIC/pull/101?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Thomas+Germain#diff-cHltdWx0aW1hdGljL21vZGVsL2NvbW1vbi5weQ==) | `97.43% <100.00%> (+0.21%)` | :arrow_up: | | [pymultimatic/model/mode.py](https://codecov.io/gh/thomasgermain/pymultiMATIC/pull/101?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Thomas+Germain#diff-cHltdWx0aW1hdGljL21vZGVsL21vZGUucHk=) | `100.00% <100.00%> (ø)` | | | [pymultimatic/model/timeprogram.py](https://codecov.io/gh/thomasgermain/pymultiMATIC/pull/101?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Thomas+Germain#diff-cHltdWx0aW1hdGljL21vZGVsL3RpbWVwcm9ncmFtLnB5) | `100.00% <100.00%> (ø)` | | | [pymultimatic/model/zone.py](https://codecov.io/gh/thomasgermain/pymultiMATIC/pull/101?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Thomas+Germain#diff-cHltdWx0aW1hdGljL21vZGVsL3pvbmUucHk=) | `98.14% <100.00%> (+0.07%)` | :arrow_up: | | ... and [1 more](https://codecov.io/gh/thomasgermain/pymultiMATIC/pull/101?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Thomas+Germain) | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Thomas+Germain). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Thomas+Germain)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

hvbargen commented 1 year ago

This looks very promising. I called some URLs wth the get_response.py script and the responses look reasonable. I didn't test HA integration (and I don't quite know how to do this: using a different repository and branch with HA).

xaviergriffon commented 1 year ago

This looks very promising. I called some URLs wth the get_response.py script and the responses look reasonable. I didn't test HA integration (and I don't quite know how to do this: using a different repository and branch with HA).

If you want to try it on HA, you can add my current branch of Vaillant-component to the HACS repositories. It points to the senso_app branch that started this PR. Please note that this branch will not be maintained and is under development.

For the moment, when configuring, you must select the MULTIMATIC or SENSO application. image

hvbargen commented 1 year ago

I have installed this in my HA. See my feedback comment in vaillant-component #190.

+1 from me (as a user) for merging this.

One more thing: The setup assistent is fine, but once setup, it seems these settings cannot be controlled or changed using the UI? I don't know if this is specific to this PR or if it's a general issue of vaillant-component.

thomasgermain commented 1 year ago

I tested it for few hours with 1.13.0 version of the multimatic integration. This works well for multimatic.

@xaviergriffon can I merge it and release ?

Next step is to modify the integration itself

xaviergriffon commented 1 year ago

Yes @thomasgermain, I think the pymultiMATIC part contains the essentials for the second part in the integration.

thomasgermain commented 1 year ago

Here is it: https://github.com/thomasgermain/pymultiMATIC/releases/tag/0.7.0b1

version is also available in pypi: https://pypi.org/project/pymultiMATIC/0.7.0b1/