Python module for fetching wemportal data.
Project description
Python wemportal module
I wanted to scrape the Weishaupt WEM Portal without using Home Assistant. @erikkastelec created a nice project hass-WEM-Portal, so I used his code to create this python module for standalone scraping of WEM Portal.
It utilizes the mobile api for the most of the data. The statistics are collected via web api.
Installation
pip install wemportal
Example usage
from wemportal.wem_portal import WemPortal
# Create API object
api = WemPortal(
username="<WEM Portal Username>",
password="<WEM Portal Password>"
)
# Fetch data
api.login()
devices = api.fetch_devices()
api.logout()
# Print values
for device in devices:
print(f"== Device {device.name} ==\n")
print("Values:")
for data in device.get_parameter_values():
print(f"\t{data['ParameterId']}: {data['ValueNumericValue']} {data['ValueUnit']}")
print("\nHot Water Statistics:")
for data in device.hot_water_statistic.values:
print(f"\t{data.datetime.date()}: {data.value:.2f} {device.hot_water_statistic.unit}")
print("\nHeating Statistics:")
for data in device.heating_statistic.values:
print(f"\t{data.datetime.date()}: {data.value:.2f} {device.heating_statistic.unit}")
Reporting bugs or incorrect results
If you find a bug, please create an issue in the repo issues tracker.
Please contribute
It was created for myself, but if you find it useful: Please contribute.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wemportal-0.0.5.tar.gz.
File metadata
- Download URL: wemportal-0.0.5.tar.gz
- Upload date:
- Size: 9.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
11e1459e1ee412f6d35dd5f2d6ecb37da2d2cab01c3d325c189cd5a5d9032f62
|
|
| MD5 |
4373a33a7fe8eca468dc1c6d068f53e8
|
|
| BLAKE2b-256 |
062260f725eeda8cc40747b8d0fe5856b020f2661cd1771d8b0275825285cf53
|
File details
Details for the file wemportal-0.0.5-py3-none-any.whl.
File metadata
- Download URL: wemportal-0.0.5-py3-none-any.whl
- Upload date:
- Size: 11.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f725786dac976bbbb0f251776d42703e79196a8002946c6261ef9b99413da0ae
|
|
| MD5 |
0850ff2eeccdcd2857753f843574b997
|
|
| BLAKE2b-256 |
50152587f8eaa234b5c8c0a6b63c2e99ed6bb75fc7c2f8468696855662dd6c67
|