-
Notifications
You must be signed in to change notification settings - Fork 10
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integrate Weishaupt API instead of using WEM Portal #9
Comments
I tested it out and it works well. How did you manage to get the endpoints of the API? I tried using mitm proxy, but I couldn't get ssl cert to work with the wem app. I Will try to implement it soon and if it works as expected it can be added as official Homeassistant integrations, which was previously not possible, due to web scraping. |
You can download the Android app and decompile it with e.g. the Bytecode Viewer. Then you see e.g. in
With that way you will be able to get all endpoints. POST
In addition to that Thanks for looking into it and your effort @erikkastelec! :) |
@erikkastelec any updates here? |
I managed to implement a basic version of this but did not finish and test everything yet, as I had quite a few things on my plate. Unfortunately, not all the data is available through the API, so web scraping will still be needed, to get some of it. I think that the best approach would be to keep the web scraping part and use the API to update some of the data more often. I will get to it when I am done with exams but can push the code if you want to take a look at it. |
I finished the basic functionality, but still need to implement the logic for changing some of the settings, which are available in the app. (#7) I need a few days to find any bugs that were missed and will make a release then. If any of you want to test it, you can manually add it to custom_components folder in the Homeassistant config. |
Thanks Erik! Why are u using web and app together? Will there be a way to let the user define if he prefers scraping or app services? I guess I will test it out tomorrow. Best, Dirk |
Amount of data available via the API is quite limited. For majority of users API should suffice, so I will implement an option to turn off the webscraping. |
tested this version but it seems there is an dependency problem:
|
Did you restart the Homeassistant completely. I think that restarting from the UI does not install the missing dependencies. |
but there is no new dependency in manifest.json, maybe you missed to put it into the PR |
Fuzzywuzzy is the new dependency listed in the manifest. Check out the dev branch. |
Hi Erik, Thanks in advance |
Currently API is used only for gathering data, but I plan to implement this in the future #7 |
Hi @simonstamm and all, can someone point me to the right syntax for writing parameters to the API? [EDIT: In fact it was changing the value: the example below sets the value actually to 0, which was not visisble with the boolean WW-Push, but e.g. with temperature values. Using "NumericalValue" instead of just "Value" and removing the "" around the number were needed.] POST https://www.wemportal.com/app/DataAccess/Write
|
After some trial and error - this works: { "DeviceID": ####, "Modules": [ { "ModuleIndex": 0, "ModuleType": 3, "Parameters": [ { "ParameterID": "WW-Push", "NumericValue": 1.0 } ] } ] } And analogous with "NormalWW" to set the target water temperature. |
@iridium2001
Very nice. How exactly can I use this information within Home Assistent to
send the values?
Or do you plan to implement this feature within the WEM-Portal feature?
Thanks for your effort!
iridium2001 ***@***.***> schrieb am Fr., 11. Feb. 2022, 21:37:
… After some trial and error - this works:
{ "DeviceID": ####, "Modules": [ { "ModuleIndex": 0, "ModuleType": 3,
"Parameters": [ { "ParameterID": "WW-Push", NumericValue": 1.0 } ] } ] }
And analogous with "NormalWW" to set the target water temperature.
—
Reply to this email directly, view it on GitHub
<#9 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AVQWT5K6JRUSGH2SOJBIQB3U2VXQZANCNFSM42XOTDRA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you commented.Message ID:
***@***.***>
|
I'm afraid my python skills are not that great that I'd dare to make an addition to the code from @erikkastelec. So I hope that more experienced people can make use of this information. :-) |
I see that there is quite some interest in this functionality, so I will try to add this by the end of the week. If anyone else is already working on this, please let me know. |
@erikkastelec this is great news! Tonight I'll try to figure out how the API write call handles the enums. |
Great! I am looking Forward to test/use it ;-)
Thanks erikkastelec
Erik Kastelec ***@***.***> schrieb am Mo., 14. Feb. 2022,
09:31:
… I see that there is quite some interest in this functionality, so I will
try to add this by the end of the week. If anyone else is already working
on this, please let me know.
—
Reply to this email directly, view it on GitHub
<#9 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AVQWT5ICJV2CYYIMMJZHXZTU3C4WHANCNFSM42XOTDRA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you commented.Message ID:
***@***.***>
|
Regarding other parameters: I could set the mode "Betriebsart" (which is labeled as "data type 1") in the same way as the water temperature or the push function. This is in ModuleType 2 and has the following values: "Betriebsart",
My wishlist for accessible controls in HA would be: from ModuleType 3: and from ModuleType 2: Some people might like these as well. Personally I would not touch "Komfort/Normal/Absenk" temperatures in HA. This is for setting temperature levels for all heating programs. Also located in ModuleType 2: As far as I can tell, this is basically all I what can be usefully adjusted via the API. It might be possible to set certain time-related functions for vacation and party-mode, but this might be tricky and (once the above is implemented) can be done also via HA if needed. |
Hi @erikkastelec I'm working on a similar integration for Homey but I'm having issues with reading the temperatures. Could you point me in the right direction? |
If you already managed to implement login than you can send a GET request to /device/read to get all the available modules. By sending a POST request to /EventType/Read you can get parameters that are present inside a specific module.
After that you can request data by sending a POST request to /DataAccess/Read . Example for room temperature (ModuleType and ModuleIndex can change depending on the device, so you should not hardcode anything):
If you need anything else let me know. I can also send you a Postman file export if you want. |
@erikkastelec that is indeed what I am seeing as well, but good to know that it is not related to me :) |
Is anyone else experiencing any issues with the WEM mobile app? I first encountered this issue on Friday and I am stuck waiting for them to fix it. |
I do not use the mobile app |
I'm getting the right current values at least at the info page.
Erik Kastelec ***@***.***> schrieb am So., 20. März 2022,
18:35:
… Is anyone else experiencing any issues with the WEM mobile app?
I spent a few hours looking for issues in the API calls I make and
realized that can't update anything from the mobile app either. Data also
isn't being updated.
I first encountered this issue on Friday and I am stuck waiting for them
to fix it.
—
Reply to this email directly, view it on GitHub
<#9 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AVQWT5LJGIJ7D2LGMS7UTH3VA5OVZANCNFSM42XOTDRA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you commented.Message ID:
***@***.***>
|
For me the Android app also works fine. |
Hi erikkastelec,
Could you already achive any progress in the topic of triggering/setting
commands/values (e.g. Warmwasserpush, Hot Water Temperatur ) via the wem
Portal/ API in Home Assistent?
Thanks in advance
Steffen
Erik Kastelec ***@***.***> schrieb am Mo., 21. März 2022,
08:22:
… Everything worked fine on the website, but when I used the API or mobile
app the values were not updating, but all the response codes were still 200
OK
It started to work today at 7:30. Lost quite a few hours wondering what I
am doing wrong when calling the API, but everything works fine now.
[image: weishaupt]
<https://user-images.githubusercontent.com/34520112/159219020-97318804-c022-4d4c-88e4-939a5c6dc464.png>
—
Reply to this email directly, view it on GitHub
<#9 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AVQWT5IC4M3AAA2D3TG67Z3VBAPUZANCNFSM42XOTDRA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you commented.Message ID:
***@***.***>
|
I am just finishing a few things. Integration should be ready for testing in a day or two and then released through HACS after a week or two of testing. All the settings that are available through the mobile app will be available in this integration. |
Very nice! Thanks a lot. I am looking Forward to the Release :-)
Erik Kastelec ***@***.***> schrieb am Do., 31. März 2022,
21:51:
… I am just finishing a few things. Integration should be ready for testing
in a day or two and then released through HACS after a week or two of
testing. All the settings that are available through the mobile app will be
also available in this integration.
—
Reply to this email directly, view it on GitHub
<#9 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AVQWT5NC4FGP3QB3W7BIWTLVCX64XANCNFSM42XOTDRA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
This will take a few more days. Last few days changing any value inside the app does nothing or the change happens a few hours later and I can't test anything. |
Will try to test this on the weekend |
Integration is ready for testing. For anyone not familiar with the process:
|
What exactly was changed? |
All the values that can be changed via WEM mobile app can now be changed inside Homeassistant. |
Hi erikkastelec,
First of all thank you For shareing your newst Features with us.
I tried to Install the new Dev Version by placing the Files from the Dev
Branch in the wemportal folder to test your new features.
Unfourtunately after restarting HA I get the following Error Massages.
What do I have to change in the basic setup which Looks Like in the
pictures appended?
Thanks for your Help in advance.
Steffen
Logger: homeassistant.setup
Source: setup.py:162
First occurred: 20:46:00 (1 occurrences)
Last logged: 20:46:00
Setup failed for custom integration wemportal: Invalid config.
Erik Kastelec ***@***.***> schrieb am Mi., 13. Apr. 2022,
22:01:
… All the values that can be changed via WEM mobile app can now be changed
via Homeassistant.
—
Reply to this email directly, view it on GitHub
<#9 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AVQWT5LK5WAEMEQRRG7ZQ63VE4RYBANCNFSM42XOTDRA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
You have to remove wemportal config under sensors and put this somewhere in your yaml configuration file:
|
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
<#9 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AVQWT5LJ2LFYVYPACBADSD3VFRNX7ANCNFSM42XOTDRA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
This information was in the README of development branch. If you go to https://your_homeassistant_ip/config/entities and search for wemportal you should get all the available entities for this integration. All the entities of type number of select are used for changing settings. This way you should be able to find all the entities you want to include into your dashboard. |
Hello @erikkastelec , thanks for your effort! Currently I only see these "select" entities and no "number" entities. Is this expected or do I need to configure something differently? |
Entities depend on the type of device that you have. This could be normal. Are you missing any settinngs that are available in wem app? |
Integration seems to work fine, so I made a new release (you can install it via HACS store now). |
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
>> <#9 (comment)>,
>> or unsubscribe
>> <https://github.com/notifications/unsubscribe-auth/AVQWT5LJ2LFYVYPACBADSD3VFRNX7ANCNFSM42XOTDRA>
>> .
>> You are receiving this because you commented.Message ID:
>> ***@***.***>
>>
>
|
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
> <#9 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AVQWT5LJ2LFYVYPACBADSD3VFRNX7ANCNFSM42XOTDRA>
> .
> You are receiving this because you commented.Message ID:
> ***@***.***>
>
|
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:
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:
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
andMaxValue
).URL: https://www.wemportal.com/app/EventType/Read
Request: POST
Body:
The text was updated successfully, but these errors were encountered: