Skip to main content

Python module for fetching wemportal data.

Project description

Python wemportal module

Test and lint

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 in puppet-lint or its results, 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.1.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

wemportal-0.0.1-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file wemportal-0.0.1.tar.gz.

File metadata

  • Download URL: wemportal-0.0.1.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.1

File hashes

Hashes for wemportal-0.0.1.tar.gz
Algorithm Hash digest
SHA256 aa3692f267f51d813140c563bff01d6e86b3e568092fbe839aa539726c605db8
MD5 836f4f8f39823d22e3aecae7d6c5968b
BLAKE2b-256 f39e0fbcd45ec201ddc6b93626a22a7ee0068414b79415bfe42bc3b8ed66eda6

See more details on using hashes here.

File details

Details for the file wemportal-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: wemportal-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 10.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.1

File hashes

Hashes for wemportal-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2ae967680c6019c48b55d6c58011f36564c0361d18dd307ca5ee1d7b9f5f8bb2
MD5 51e50969913ac0813ae93ed018b78fd4
BLAKE2b-256 f2173a299f383f9411d0705e551579cd42587365d4cfd1e7317871c1ac8ad386

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