erikkastelec / hass-WEM-Portal

Custom component for retrieving sensor information from Weishaupt WEM Portal
MIT License
49 stars 10 forks source link

Integrate Weishaupt API instead of using WEM Portal #9

Closed simonstamm closed 2 years ago

simonstamm commented 3 years ago

Hey @erikkastelec,

a while ago I switched to (currently undocumented?) API endpoints instead of scraping the web interface, because it was more reliable. Unfortunately a lot of informations are currently missing (or I was not able to find out the correct endpoint) which are visible in the WEM Portal. Maybe you're able to dig deeper into the API, because there it's also possible to change the temperature and stuff like that very easily (which helps with #7).

Headers User-Agent: WeishauptWEMApp Accept: application/json X-Api-Version: 2.0.0.0

Login Endpoint URL: https://www.wemportal.com/app/Account/Login Request: POST Body:

Name:<username>
PasswordUTF8:<password>
AppID:de.weishaupt.wemapp
AppVersion:2.0.2
ClientOS:Android

Get all devices attached to the account You'll use these module indexes within the next request. URL: https://www.wemportal.com/app/Device/Read Request: GET

Getting data from device URL: https://www.wemportal.com/app/DataAccess/Read Request: POST Body:

{
    "DeviceID": <0000>,
    "Modules": [
        {
            "ModuleIndex": 1,
            "ModuleType": 3,
            "Parameters": [
                {
                    "ParameterID": "Warmwassertemperatur"
                }
            ]
        }
    ]
}

List all values which can be updated and retrieved That will fix the problem mentioned from you in #7 because there is a parameter called IsWriteable where you receive the name of the parameter which can be updated (also with e.g. MinValue and MaxValue). URL: https://www.wemportal.com/app/EventType/Read Request: POST Body:

DeviceID:<0000>
ModuleIndex:1
ModuleType:3
erikkastelec commented 2 years ago

Integration seems to work fine, so I made a new release (you can install it via HACS store now). I will be closing this issue. If you encounter any problems or have any questions, open a new issue.

Hagiman commented 2 years ago

One more Requests/Hint:

It seems that you limits the max values for WW normal and WW absenk By the value 60.

In the Weishaupt Portal this Limit is Not fix at the value 60. Instead it depends on another value which you can Set in the fachmann Environment. In the Pictures Below i Set the max Value in the Fachmann settings to 61 degrees. After that i can select 61 deg as WW Normal Temperatur. In your Implementation the max Value stays at 60 deg.

Maybe you can adapt this or Provider User min max values. In Future i possible need a higher max Temp to use may Warmwasserspeicher as an Energy storage if my PV Produces to much Power.

Thank you in advance

Greetings Steffen

Steffen H @.***> schrieb am So., 17. Apr. 2022, 21:57:

Hi erikkastelec,

after some searching I found all entities like WW normal WW Absenk HK 2 Raum Absenk select.nachladung ....

and can change their Values via Home Assistent.

Really great Work ! Thank you very much.

Best greetings Steffen

P.S. Heizkennlinie is the only think I have not found until now

Steffen H @.***> schrieb am So., 17. Apr. 2022, 21:16:

Thanks,

now it works again without Error like before.

One more question: Where could I find this information and some more information about what i have to do to change specific values like warmwassertemperatur or something simular?

Erik Kastelec @.***> schrieb am So., 17. Apr. 2022, 21:01:

You have to remove wemportal config under sensors and put this somewhere in your yaml configuration file:

wemportal:

scan_interval: 1800

#api_scan_interval: 300
#language: en
#mode: both
username: your_username
password: your_password

— Reply to this email directly, view it on GitHub https://github.com/erikkastelec/hass-WEM-Portal/issues/9#issuecomment-1100932913, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVQWT5LJ2LFYVYPACBADSD3VFRNX7ANCNFSM42XOTDRA . You are receiving this because you commented.Message ID: @.***>

Hagiman commented 2 years ago

Hi erikkastelec,

after some searching I found all entities like WW normal WW Absenk HK 2 Raum Absenk select.nachladung ....

and can change their Values via Home Assistent.

Really great Work ! Thank you very much.

Best greetings Steffen

P.S. Heizkennlinie is the only think I have not found until now

Steffen H @.***> schrieb am So., 17. Apr. 2022, 21:16:

Thanks,

now it works again without Error like before.

One more question: Where could I find this information and some more information about what i have to do to change specific values like warmwassertemperatur or something simular?

Erik Kastelec @.***> schrieb am So., 17. Apr. 2022, 21:01:

You have to remove wemportal config under sensors and put this somewhere in your yaml configuration file:

wemportal:

scan_interval: 1800

#api_scan_interval: 300
#language: en
#mode: both
username: your_username
password: your_password

— Reply to this email directly, view it on GitHub https://github.com/erikkastelec/hass-WEM-Portal/issues/9#issuecomment-1100932913, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVQWT5LJ2LFYVYPACBADSD3VFRNX7ANCNFSM42XOTDRA . You are receiving this because you commented.Message ID: @.***>