Skip to main content

Python module for fetching wemportal data.

Project description

Python wemportal module

Tests PyPi

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

wemportal-0.0.5.tar.gz (9.3 kB view details)

Uploaded Source

Built Distribution

wemportal-0.0.5-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

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

Hashes for wemportal-0.0.5.tar.gz
Algorithm Hash digest
SHA256 11e1459e1ee412f6d35dd5f2d6ecb37da2d2cab01c3d325c189cd5a5d9032f62
MD5 4373a33a7fe8eca468dc1c6d068f53e8
BLAKE2b-256 062260f725eeda8cc40747b8d0fe5856b020f2661cd1771d8b0275825285cf53

See more details on using hashes here.

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

Hashes for wemportal-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 f725786dac976bbbb0f251776d42703e79196a8002946c6261ef9b99413da0ae
MD5 0850ff2eeccdcd2857753f843574b997
BLAKE2b-256 50152587f8eaa234b5c8c0a6b63c2e99ed6bb75fc7c2f8468696855662dd6c67

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page