erikkastelec / hass-wem-portal Goto Github PK
View Code? Open in Web Editor NEWCustom component for retrieving sensor information from Weishaupt WEM Portal
License: MIT License
Custom component for retrieving sensor information from Weishaupt WEM Portal
License: MIT License
Hello Erik,
Is it possible to get even more info out of this? Like returnflow on heating, gassmoke temp and kwh usage graph?
Great intergration btw.
Logger: custom_components.wemportal
Source: custom_components/wemportal/sensor.py:131
Integration: wemportal (documentation, issues)
First occurred: 22. März 2021, 16:43:53 (4472 occurrences)
Last logged: 12:05:01
can't find hydraulik-korrektur_aufheizoptimierung_rücksetzen
can't find heizkreis_heizkreise_heizkreis_1-status
can't find heizkreis_heizkreise_heizkreis_1-warmwassersolltemperatur_aktuell
can't find heizkreis_heizkreise_heizkreis_1-warmwassertemperatur_aktuell
can't find heizkreis_heizkreise_heizkreis_1-pumpe_warmwasser
If I restart HA it is back working. That already occurred couple of times.
Started the component but got an IndexError. Let me know if you need anything for debugging.
Logger: wemportal
Source: custom_components/wemportal/wemportalapi.py:27
First occurred: 12:13:34 (1 occurrences)
Last logged: 12:13:34
Unexpected error fetching wem_portal_sensor data: list index out of range
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.8/site-packages/homeassistant/helpers/update_coordinator.py", line 149, in async_refresh
self.data = await self._async_update_data()
File "/srv/homeassistant/lib/python3.8/site-packages/homeassistant/helpers/update_coordinator.py", line 137, in _async_update_data
return await self.update_method()
File "/home/homeassistant/.homeassistant/custom_components/wemportal/sensor.py", line 385, in async_update_data
data = await hass.async_add_executor_job(api.fetch_data)
File "/usr/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/home/homeassistant/.homeassistant/custom_components/wemportal/wemportalapi.py", line 27, in fetch_data
data = processor.run([wemportalJob])[0]
IndexError: list index out of range
And that leads to:
Logger: homeassistant.components.sensor
Source: custom_components/wemportal/sensor.py:467
Integration: Sensor (documentation, issues)
First occurred: 12:13:34 (1 occurrences)
Last logged: 12:13:34
Error while setting up wemportal platform for sensor
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.8/site-packages/homeassistant/helpers/entity_platform.py", line 198, in _async_setup_platform
await asyncio.shield(task)
File "/home/homeassistant/.homeassistant/custom_components/wemportal/sensor.py", line 409, in async_setup_platform
entities.append(WemPortalSensor(coordinator, sensor_type, sensor_prefix))
File "/home/homeassistant/.homeassistant/custom_components/wemportal/sensor.py", line 428, in __init__
self._state = self.state
File "/home/homeassistant/.homeassistant/custom_components/wemportal/sensor.py", line 467, in state
state = self.coordinator.data[self.type]
TypeError: 'NoneType' object is not subscriptable
Component fails to start when using mode both or api
Error during setup of component wemportal
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/requests/models.py", line 971, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/local/lib/python3.10/site-packages/simplejson/init.py", line 525, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.10/site-packages/simplejson/decoder.py", line 372, in decode
obj, end = self.raw_decode(s)
File "/usr/local/lib/python3.10/site-packages/simplejson/decoder.py", line 402, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 239, in _async_refresh
self.data = await self._async_update_data()
File "/config/custom_components/wemportal/coordinator.py", line 29, in _async_update_data
return await self.hass.async_add_executor_job(self.api.fetch_data)
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/wemportal/wemportalapi.py", line 60, in fetch_data
self.fetch_api_data()
File "/config/custom_components/wemportal/wemportalapi.py", line 94, in fetch_api_data
self.get_data()
File "/config/custom_components/wemportal/wemportalapi.py", line 265, in get_data
).json()
File "/usr/local/lib/python3.10/site-packages/requests/models.py", line 975, in json
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 256, in _async_setup_component
result = await task
File "/config/custom_components/wemportal/init.py", line 65, in async_setup
await coordinator.async_config_entry_first_refresh()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 211, in async_config_entry_first_refresh
raise ex
homeassistant.exceptions.ConfigEntryNotReady: Expecting value: line 1 column 1 (char 0)
Originally posted by @dilki001 in #36 (comment)
Hey @erikkastelec,
first of all - thank you! Due to missing time I only created a dirty way of using Wemportal in HA based on the work of another dev. See: https://github.com/dm82m/wemportal-scripts
I am currently testing out your integration and if that works well I will shut down my version and stay with yours! :)
I am running HA in a virtualenv and encountered the following log error after installing your component and a server restart:
Logger: homeassistant.components.homeassistant
Source: components/homeassistant/__init__.py:122
Integration: Home Assistant Core Integration (documentation, issues)
First occurred: 8:20:55 (1 occurrences)
Last logged: 8:20:55
Platform error sensor.wemportal - No module named 'scrapyscript'
So I manually installed scrapyscript with its dependencies in my virtualenv. Maybe you could put that as a hint in your readme.
I am also in contact with Weishaupt and they asked me to reduce the scan interval to 30mins due to server performance problems. But I will now run with your default and see what happens.
And one additional question: are you accessing the experts page to extract the data? If so, it is asking for a specialist code here on my Weishaupt gas heating system. I have not found this code '11 - in my case' in your script. So how do you access it?
Best,
Dirk
Hello Erik,
since yesterday, i'm getting always an error after the start of HA:
Traceback (most recent call last):
File "/config/custom_components/wemportal/wemportalapi.py", line 71, in fetch_webscraping_data
self.data = processor.run([wemportal_job])[0]
IndexError: list index out of range
The module by itself is still working, but i'm getting only a small bunch of readings, a lot of readings are "not available".
Is there any change on WEM side?
br
Alex
Following data is missing:
home-assistant_2023-05-02T11-59-02.385Z.log
System cannot be started, the following error messages always appear, see appendix
Hey @erikkastelec,
thanks a lot for creating this Home Assistant integration! I'm currently using my own Docker solution which scrapes every 30 seconds. I saw in #1 that there was a request from Weishaupt to have at least 30 minutes interval so you set the minimum to 15 mins:
I agree with setting the default to 30 minutes but would ask you if you could reduce the minimum value to 1 minute (or at least 5 minutes), because I have some automations which rely on fresh data and would love to switch to your integration.
Imho it's not our problem that Weishaupt isn't providing the customer a better API since we pay a lot of money for the web interface and the heat pump.
Hi,
first of all big thank you for this integration :)
I am using it since I have my weishaupt WWP LS-8 B and it is an awesome way to provide overview and control of my heating via home assistant 👍
Unfortunately since the 1.3.1 release I am getting the following error (with my old configuration) after a restart - even thought the configuration check is fine:
sensor:
- platform: wemportal
username: !secret wemportal_usr
password: !secret wemportal_pwd
language: de
# every 17min - default 30min = 1800 - not recommended below 15min = 900
scan_interval: 1020
# every 3min - default 5min = 500 - should not be lower than 180 = 3 minutes
api_scan_interval: 180
mode: both
2022-04-21 13:02:39 ERROR (MainThread) [homeassistant.config] Invalid config for [wemportal]: expected a dictionary for dictionary value @ data['wemportal']. Got None. (See ?, line ?). Please check the docs at https://github.com/erikkastelec/hass-WEM-Portal 2022-04-21 13:02:39 ERROR (MainThread) [homeassistant.setup] Setup failed for custom integration wemportal: Invalid config. 2022-04-21 13:02:40 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform wemportal.sensor: Unable to set up component.
If I now switch to the configuration as it is documented, I am receiving the following error on configuration check and if I ignore the check and reboot the system fully, HA does not even start up any more until I remove the configuration yaml part of the wemportal integration.. :(
wemportal:
username: !secret wemportal_usr
password: !secret wemportal_pwd
language: de
# every 17min - default 30min = 1800 - not recommended below 15min = 900
scan_interval: 1020
# every 3min - default 5min = 500 - should not be lower than 180 = 3 minutes
api_scan_interval: 180
mode: both
2022-04-21 12:59:34 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [139934117552912] Error handling message: expected a dictionary for dictionary value @ data['wemportal']. Got None (invalid_format)
Any idea where my configuration is wrong?
HA added long term statistics with 2021.8.0 and increased the support for integrations with 2021.9.0 - any plans in adding that here to this plugin to be able to check some historical data?
See: https://developers.home-assistant.io/docs/core/entity/sensor/#long-term-statistics
what exactly is or should the language setting do? it defaults to english. my sensors are still german. even manually setting language: en
is not chaning that behaviour.
Hi,
I have the same issue mentioned in #35
As soon as I add the following lines for the wemportal in my configuration.yaml the "check configuration" keeps spinning.
wemportal:
username: !secret wemUsername
password: !secret wemPassword
When I restart the container manually in the UI I get "Wrapping up startup, not everything will be available until it is finished" for a while and in the log I get this:
2022-11-11 19:51:41.385 ERROR (MainThread) [homeassistant.setup] Setup failed for custom integration wemportal: Requirements for wemportal not found: ['python-Levenshtein==0.20.*'].
Do you have some idea how to resolve this?
Best
hey @erikkastelec
I tried but found no way how to set the device_class attribute. I guess that if it is not set for entities that are containing a temperature it is not possible to group them in one history-graph in Lovelace.
If you could point me into a direction, I can try to do it and create an PR.
Best,
Dirk
Hi,
I am running version 1.3.16 on
Home Assistant 2022.11.1
Supervisor 2022.10.2
Operating System 9.3
Frontend 20221102.1 - latest
At the moment I have the following error message in the log:
Traceback (most recent call last):
File "/config/custom_components/wemportal/wemportalapi.py", line 71, in fetch_webscraping_data
self.data = processor.run([wemportal_job])[0]
IndexError: list index out of range
On the weekend I added a second device into the wem portal. Since then only API calls are running (mode=both).
Please help.
Something stopped working...
Logger: custom_components.wemportal
Source: custom_components/wemportal/wemportalapi.py:70
Integration: Weishaupt WEM Portal (documentation, issues)
First occurred: 09:32:21 (1 occurrences)
Last logged: 09:32:21
There was a problem with getting data from WEM Portal. If this problem persists, open an issue at https://github.com/erikkastelec/hass-WEM-Portal/issues
Traceback (most recent call last):
File "/config/custom_components/wemportal/wemportalapi.py", line 70, in fetch_webscraping_data
self.data = processor.run([wemportal_job])[0]
IndexError: list index out of range
Hey there,
after updating to the newest homeassistent version I got the following error:
Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht
Logger: custom_components.wemportal
Source: custom_components/wemportal/wemportalapi.py:71
Integration: Weishaupt WEM Portal (documentation, issues)
First occurred: 06:56:35 (1 occurrences)
Last logged: 06:56:35
There was a problem with getting data from WEM Portal. If this problem persists, open an issue at https://github.com/erikkastelec/hass-WEM-Portal/issues
Traceback (most recent call last):
File "/config/custom_components/wemportal/wemportalapi.py", line 71, in fetch_webscraping_data
self.data = processor.run([wemportal_job])[0]
IndexError: list index out of range
There are just a few sensors that still working. Here an example for Vorlauf
Please let me know I you also got problems with the newest version or if I can help you with more information to solve the issue.
Have a nice day 😊
Best regards
Steffen
hey guys,
I am working with mode: both
and observing the issue that sometimes the availability of wemportal.com breaks. If this is the case the value of the sensors provided by wemportal.com switches to unavailable and is not reconnecting - even if wemportal will be back online. The only way getting new data is restarting my Home Assistant instance.
Could there be any "observation" be implemented in the component itself that will reconnect in these cases?
Or is someone having any alternative in mind? Like creating an automation that observers the status of the sensor and restarts the component in case the sensor is unavailable?
Best,
Dirk
I have a working HA system and I wanted to add this WEM Portal integration.
As soon as I add it to my configuration and I go to "Developer tools" -> "Check configuration", it keeps spinning and never validates or invalidates the configuration.
Anyone else have this issue?
I have it in my configuration.yaml like this:
wemportal:
language: en
mode: api
username: xxx@xxx
password: xxxxx
Logger: homeassistant.components.sensor
Source: components/sensor/init.py:597
Integration: Sensor (documentation, issues)
First occurred: 15:14:12 (1 occurrences)
Last logged: 15:14:12
Sensor sensor.heizkreis_heizkreise_heizkreis_2_pumpe_warmwasser has device class None, state class None and unit thus indicating it has a numeric value; however, it has the non-numeric value: Ein (<class 'str'>); Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author.
First of all: thanks for your great project.
In "both" mode, I see 78 wemportal entities and I am bit lost between them. Some of them are in german, some in english due to issue #22. Some of them have a prefix of "heat_pump", "heating_circuits" or "wez", others have none of these.
Could you maybe add a "Heat Pump" device? That would allow to add all entities to an area in one step. Also all sensors or all controls could be added to a dashboard in one step.
Otherwise, I suggest to add some common entity prefixes that can be used in entity filtering of the lovelace cards. Something like:
It worked and suddenly it stopped. Logs:
Logger: homeassistant.setup
Source: custom_components/wemportal/init.py:44
Integration: wemportal (documentation, issues)
First occurred: 13:44:59 (1 occurrences)
Last logged: 13:44:59
Error during setup of component wemportal
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 235, in _async_setup_component
result = await task
File "/config/custom_components/wemportal/init.py", line 44, in async_setup
if config[DOMAIN].get(CONF_MODE) == "web":
KeyError: 'wemportal'
Just found out that the plugin is currently not working on my side:
Logger: custom_components.wemportal
Source: helpers/update_coordinator.py:193
Integration: wemportal (documentation, issues)
First occurred: 21:33:05 (1 occurrences)
Last logged: 21:33:05
Timeout fetching wem_portal_sensor data
Hello, I have a question about the request at the time for the hot water push function. Where can I find this function in the current version. I refer to #7
Thank you very much
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
Hey @erikkastelec
I am not 100% sure, but it seems that we have a memory leak. Maybe also due to changes on wemportal.com
The last memory reduction was due to a server restart with disabled hass-WEM-Portal plugin. It SEEMS that the memory is not anymore increasing. Will keep an eye on it and give a new information in a couple of hours.
Best,
Dirk
I had the situation a couple of times that the sensor names are switching. I can’t tell when this exactly happens but what happens is that one time the sensor is called sensor.heizkreis_heizkreise_heizkreis_1_aussentemperatur_aktuell_hzk1
And another time the same sensor gets the name sensor.hydraulik_aussentemperatur_aktuell
. The other sensor is then getting the state ‚unavailable‘ and is not available. Every time this happens I switch the sensor in my dashboard and it is back working but then suddenly the switch is done again. The same happens with sensor.heizkreis_heizkreise_heizkreis_1_warmwassertemperatur_aktuell
and sensor.heizkreis_heizkreise_heizkreis_2_warmwassertemperatur_aktuell
Hey guys,
Floats are split by point in HA and not in comma. We use comma here due to wemportal is using comma. We should convert them before storing.
Best,
Dirk
I'm not shure wether my problem ist correctly addressed here, but everything else works in my home-assistant, operated on raspi.
Since updating HA and WEM-Portal, WEM does not work anymore.
Problem:
Integration error: wemportal - Requirements for wemportal not found: ['python-Levenshtein==0.20.*'].
Log:
Unable to install package python-Levenshtein==0.20.*: error: subprocess-exited-with-error × pip subprocess to install backend dependencies did not run successfully. │ exit code: 1 ╰─> [34 lines of output] Looking in links: https://wheels.home-assistant.io/musllinux/ Collecting cmake Using cached https://wheels.home-assistant.io/musllinux/cmake-3.22.2-cp310-cp310-musllinux_1_2_armv7l.whl (17.8 MB) Collecting ninja Using cached ninja-1.11.1.tar.gz (27 kB) Installing build dependencies: started Installing build dependencies: finished with status 'done' Getting requirements to build wheel: started Getting requirements to build wheel: finished with status 'done' Preparing metadata (pyproject.toml): started Preparing metadata (pyproject.toml): finished with status 'done' Building wheels for collected packages: ninja Building wheel for ninja (pyproject.toml): started Building wheel for ninja (pyproject.toml): finished with status 'error' error: subprocess-exited-with-error × Building wheel for ninja (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [9 lines of output] Traceback (most recent call last): File "/tmp/pip-build-env-l2xtm6um/overlay/lib/python3.10/site-packages/skbuild/setuptools_wrap.py", line 612, in setup cmkr = cmaker.CMaker(cmake_executable) File "/tmp/pip-build-env-l2xtm6um/overlay/lib/python3.10/site-packages/skbuild/cmaker.py", line 148, in init self.cmake_version = get_cmake_version(self.cmake_executable) File "/tmp/pip-build-env-l2xtm6um/overlay/lib/python3.10/site-packages/skbuild/cmaker.py", line 103, in get_cmake_version raise SKBuildError( Problem with the CMake installation, aborting build. CMake executable is cmake [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for ninja Failed to build ninja ERROR: Could not build wheels for ninja, which is required to install pyproject.toml-based projects [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error × pip subprocess to install backend dependencies did not run successfully. │ exit code: 1 ╰─> See above for output. note: This error originates from a subprocess, and is likely not a problem with pip.
I don't know what version it worked lastes, but my SW is updated quiet often .
Versions:
Home Assistant 2022.11.1
Supervisor 2022.10.2
Operating System 9.3
Frontend 20221102.1
HACS 1.28.3
WEM-Portal 1.3.14 (now 1.3.16)
Anything missing?
Any solutions or hints?
Kind regards
Marcus
Hi,
unfortunately I am not able to find any option how I can identify which sensors are created by this integration.
From logs in debug mode I found a list of following.
Never the less I am not sure if these are all or I am missing (just unable to identify because I don't know their name)...
Is there some option to filter for entities created by this integration?
heizkreis-aussentemperatur
heizkreis-at_mittelwert
heizkreis-at_langzeitwert
heizkreis-raumsolltemperatur
heizkreis-vorlaufsolltemperatur
heizkreis-vorlauftemperatur
wärmepumpe-warmwassertemperatur
wärmepumpe-leistungsanforderung
wärmepumpe-solltemperatur
wärmepumpe-schaltdifferenz_dynamisch
wärmepumpe-lwt
wärmepumpe-rücklauftemperatur
wärmepumpe-drehzahl_pumpe
wärmepumpe-volumenstrom
wärmepumpe-stellung_umschaltventil
wärmepumpe-version_wwp-sg
wärmepumpe-version_wwp-cpu
wärmepumpe-soll_frequenz_verdichter
wärmepumpe-ist_frequenz_verdichter
wärmepumpe-luftansaugtemperatur
wärmepumpe-wärmetauscher_ag_eintritt
wärmepumpe-wärmetauscher_ag_mitte
wärmepumpe-druckgas
wärmepumpe-wärmetauscher_innen
wärmepumpe-kältemittel_innen
wärmepumpe-betriebsstd.verdichter
wärmepumpe-schaltspiele_verdichter
wärmepumpe-schaltspiele_abtauen
wärmepumpe-aussengerät_variante
2.wez-status_e-heizung_1
2.wez-status_e-heizung_2
2.wez-betriebsstunden_e1
2.wez-betriebsstunden_e2
2.wez-schaltspiele_e1
2.wez-schaltspiele_e2
statistik-gesamt_energie_tage
statistik-gesamt_energie_monate
statistik-gesamt_energie_jahre
statistik-heizen_energie_tage
statistik-heizen_energie_monat
statistik-heizen_energie_jahre
statistik-ww_energie_tag
statistik-ww_energie_monat
statistik-ww_energie_jahr
statistik-kühlen_energie_tage
statistik-kühlen_energie_monate
statistik-kühlen_energie_jahre
This custom integration uses deprecated DEVICE_CLASS_*
constants in its codebase.
The DEVICE_CLASS_*
constants have been deprecated and replaced in Home Assistant Core 2021.12 (over a year ago). I would highly suggest updating/migrating this integration to the new enums.
For example, for the device classes supported by the sensor
platform, there is now a SensorDeviceClass
enum. So if a sensor previously used the DEVICE_CLASS_ENERGY
constant, it should now use SensorDeviceClass.ENERGY
. Other platforms (like binary_sensor
, and number
) provide similar enumerations for their supported device classes.
The migration thus only consists of replacing constants with an enumeration member and is, therefore, very low impact and should be fairly straightforward.
If I can help resolve any questions regarding this change or migration, feel free to ask or respond to this issue. I'm happy to help!
Kindest regards,
../Frenck
currently not working and wemportal.com is reachable and responding.
Logger: homeassistant.setup
Source: helpers/update_coordinator.py:178
First occurred: 11:02:10 (1 occurrences)
Last logged: 11:02:10
Error during setup of component wemportal
Traceback (most recent call last):
File "/config/custom_components/wemportal/coordinator.py", line 29, in _async_update_data
return await self.hass.async_add_executor_job(self.api.fetch_data)
asyncio.exceptions.CancelledError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 205, in _async_refresh
self.data = await self._async_update_data()
File "/config/custom_components/wemportal/coordinator.py", line 28, in _async_update_data
async with async_timeout.timeout(DEFAULT_TIMEOUT):
File "/usr/local/lib/python3.10/site-packages/async_timeout/__init__.py", line 129, in __aexit__
self._do_exit(exc_type)
File "/usr/local/lib/python3.10/site-packages/async_timeout/__init__.py", line 212, in _do_exit
raise asyncio.TimeoutError
asyncio.exceptions.TimeoutError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 235, in _async_setup_component
result = await task
File "/config/custom_components/wemportal/__init__.py", line 65, in async_setup
await coordinator.async_config_entry_first_refresh()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 178, in async_config_entry_first_refresh
raise ex
homeassistant.exceptions.ConfigEntryNotReady
First of all: Great extension, thanks for maintaining this @erikkastelec !
Currently the documentation suggests to set the crawling interval at most to 15min: https://github.com/erikkastelec/hass-WEM-Portal#configuration
Now there are some values in the web portal, that I would ideally have scraped in 30sec intervals or at least every minute (especially the "Leistungsanforderung" or "Stellung Umschaltventil" value from the web portal).
With an interval like 15min, the graphs in home assistant have a lot of delay (e.g. I notice that the power consumption as reported by the Fronius inverter has gone up a lot because of hot water generation, but the this integration only shows it delayed... sometimes the hot water generation is not recorded at all because it "only took 10min" and it happened between two scans.
So maybe the above can be fairly easily achieved by keeping the web session of the scraper and only press the "reload button" here:
2023-02-22 16:33:13.482 ERROR (SyncWorker_6) [custom_components.wemportal] There was a problem with getting data from WEM Portal. If this problem persists, open an issue at https://github.com/erikkastelec/hass-WEM-Portal/issues
Traceback (most recent call last):
File "/config/custom_components/wemportal/wemportalapi.py", line 71, in fetch_webscraping_data
self.data = processor.run([wemportal_job])[0]
IndexError: list index out of range
2023-02-22 16:33:17.803 WARNING (MainThread) [homeassistant.helpers.frame] Detected integration that called async_setup_platforms instead of awaiting async_forward_entry_setups; this will fail in version 2023.3. Please report issue to the custom integration author for hacs using this method at custom_components/hacs/init.py, line 171: hass.config_entries.async_setup_platforms(
2023-02-22 16:33:20.448 WARNING (MainThread) [homeassistant.setup] Setup of wemportal is taking over 10 seconds.
Thanks for your great extension!
Basically everything works fine but i get unexpected values for Zirkulationspumpe.
In the wemportal i see either Aus or Ein. So i would expect to get 0 and 1 or Aus and Ein. Both would be fine.
However, what i get is a series of 0 values with short breaks in-between.
Would be nice to get an enhancement here so that the extension gives me 0 and 1.
Thanks a lot for your efforts!
Robert
Hi guys,
thanks for the homeassistant-Addon.
I was wondering if it is possible to trigger things from homeassistant to the heater.
For example to activate the additional pump you can activate to circulate the water so that it is hot at the faucet.
greetings Stephan
Home Assistant 2022.11.1
Supervisor 2022.10.2
Operating System 9.3
Frontend 20221102.1 - latest
This error originated from a custom integration.
Logger: custom_components.wemportal
Source: custom_components/wemportal/wemportalapi.py:71
Integration: Weishaupt WEM Portal (documentation, issues)
First occurred: 3 November 2022 at 23:10:45 (19 occurrences)
Last logged: 08:20:22
There was a problem with getting data from WEM Portal. If this problem persists, open an issue at https://github.com/erikkastelec/hass-WEM-Portal/issues
Traceback (most recent call last):
File "/config/custom_components/wemportal/wemportalapi.py", line 71, in fetch_webscraping_data
self.data = processor.run([wemportal_job])[0]
IndexError: list index out of range
Hi @erikkastelec,
I want to push my wemportal sensor values to a influxdb for grafana dashboard visualization. As I'm not using Home Assistant, I needed a standalone python module to scrape data from wemportal. So, I created one thanks to your code examples.
It's here (very early state):
https://github.com/floek/wemportal
Maybe it's usefull for the community.
Best,
floek
With the update to 1.5.x the new way configuration is used. Upon first setup you are greeted with a dialog with two inputs and no
explanation what they are or what values are expected.
This is what the dialog looks like when setting it up.
I think, especially for new users of the integration, some labels (or placeholder values) for the inputs should be there.
Hey guys,
as you already know, HA has introduced the energy dashboard feature and I really like it. What I did so far was, that I created a template sensor in configuration.yaml like this:
- platform: template
sensors:
wtc_g_pc_tageswarmemenge_vortag_gesamt_we0_m3:
unit_of_measurement: "m³"
value_template: '{{ states("sensor.wtc_g_pc_tageswarmemenge_vortag_gesamt_we0") | replace(",",".") | float / 10 }}'
so I am using the gas energy used yesterday and transform it to m3 by dividing the value through 10. m3 is needed by the energy dashboard, that is why I am doing that.
then I use the customize.yaml to enable statistics for this new sensor by:
sensor.wtc_g_pc_tageswarmemenge_vortag_gesamt_we0_m3:
state_class: total_increasing
icon: mdi:gas-cylinder
device_class: gas
and then I add this new sensor to the energy dashboard of HA.
The problem I encounter is, that if I restart HA or the hass-WEM-Portal plugin itself runs in failure and gets back online the data is re-requested and thus my custom sensor gets new data and that leads to the situation that the energy dashboard adds the amount AGAIN and that leads to complete wrong data.
so on a perfect day (no HA server restart and no outage of the wemportal) it is correct:
but on a day with one or more restarts its a pain:
Is anyone of you having an idea on how to solve that?
Best,
Dirk
Hi,
my HA log is showing some warnings.
Logger: homeassistant.components.number Source: components/number/__init__.py:251 Integration: Nummer (documentation, issues) First occurred: 12:00:24 (6 occurrences) Last logged: 12:00:24 Entity None (<class 'custom_components.wemportal.number.WemPortalNumber'>) is using deprecated NumberEntity features which will be unsupported from Home Assistant Core 2022.10, please report it to the custom integration author.
Logger: homeassistant.components.number Source: components/number/__init__.py:231 Integration: Nummer (documentation, issues) First occurred: 12:00:24 (1 occurrences) Last logged: 12:00:24 custom_components.wemportal.number::WemPortalNumber is overriding deprecated methods on an instance of NumberEntity, this is not valid and will be unsupported from Home Assistant 2022.10. Please report it to the custom integration author.
Are these known problems and do you know how to fix? Or can I ignore those messages?
Thanks
floppybl
Hi,
the integration keeps crashing for me after the migration to 1.5. I added username/password in the config_flow, but get the following on repeat:
2023-04-26 11:52:30.222 ERROR (MainThread) [custom_components.wemportal] Creating new wemportal api instance
2023-04-26 11:52:30.226 DEBUG (MainThread) [custom_components.wemportal] Finished fetching WemPortal update data in 6.256 seconds (success: False)
2023-04-26 11:52:40.908 DEBUG (SyncWorker_7) [custom_components.wemportal] Fetching api device data
2023-04-26 11:52:41.151 DEBUG (SyncWorker_7) [custom_components.wemportal] Fetching api parameters data
2023-04-26 11:52:45.265 DEBUG (SyncWorker_7) [custom_components.wemportal] Fetching fresh api data
2023-04-26 11:52:45.778 ERROR (MainThread) [custom_components.wemportal] Creating new wemportal api instance
I cleared my config yaml and deleted any old entities (just in case), but no difference.
Hi @erikkastelec,
is it possible to create an input / select option for the warm water temperature?
Best regards
Ingo
This should be the value according to Postman:
"ParameterID": "NormalWW",
"Name": "WW-Soll~temperatur Normal",
"DataType": 3,
"MinValue": 0.0,
"MaxValue": 100.0,
"DefaultValue": "500",
"IsReadable": true,
"IsWriteable": true,
"EnumValues": null
Logger: homeassistant.setup
Source: helpers/update_coordinator.py:178
First occurred: 14:08:40 (1 occurrences)
Last logged: 14:08:40
Error during setup of component wemportal
Traceback (most recent call last):
File "/config/custom_components/wemportal/coordinator.py", line 29, in _async_update_data
return await self.hass.async_add_executor_job(self.api.fetch_data)
asyncio.exceptions.CancelledError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 205, in _async_refresh
self.data = await self._async_update_data()
File "/config/custom_components/wemportal/coordinator.py", line 28, in _async_update_data
async with async_timeout.timeout(DEFAULT_TIMEOUT):
File "/usr/local/lib/python3.10/site-packages/async_timeout/init.py", line 129, in aexit
self._do_exit(exc_type)
File "/usr/local/lib/python3.10/site-packages/async_timeout/init.py", line 212, in _do_exit
raise asyncio.TimeoutError
asyncio.exceptions.TimeoutError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 235, in _async_setup_component
result = await task
File "/config/custom_components/wemportal/init.py", line 65, in async_setup
await coordinator.async_config_entry_first_refresh()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 178, in async_config_entry_first_refresh
raise ex
homeassistant.exceptions.ConfigEntryNotReady
EDIT: Full shutdown and reboot performed and now working, sorry, cant delete it.
Hello, I noticed today that since the last update, the statistics of the "room_setpoint_temperature" entity are going crazy. The value seems to be unreadable every now and then and is set to 0 at this moment. Could it be related to the customization of the "heat_output" entity? Thank you for the effort.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.