Skip to main content

Library for interacting with millheat api

Project description

pymillheat

Python3 wrapper for interacting with millheat api.

Features:

  • Temperature readings.
  • Ability to change set temperature.
  • Turn the device on/off.
  • Device ID, room ID, user ID.

Install

pip3 install pymillheat

Example

import pymillheat
import asyncio

async def main():
    await mill.open_connection()

    mill.access_token
    mill.authorization_code
    mill.refresh_token

    await mill.refresh_access_token()

    await mill.get_home_list()
    mill.homes_information

    await mill.get_room_by_home(home_id)
    mill.rooms_information

    await mill.get_device_by_room(room_id)
    mill.devices_information

    await mill.get_independent_devices(home_id)
    mill.independent_devices_information

    await mill.switch_control_device(device_id, status, retry=1)
    await mill.temperature_control_device(device_id, status, hold_temp=None, retry=1)

if __name__ == "__main__":
    loop = asyncio.get_event_loop()
    mill = Mill(
        access_key="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
        secret_token="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
        username="example@mail.com",
        password="password123",
        loop=loop,
    )
    try:
        loop.run_until_complete(main())
    except (KeyboardInterrupt, SystemExit):
        pass
    finally:
        loop.run_until_complete(mill.close_connection())

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

pymillheat-1.0.4.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

pymillheat-1.0.4-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file pymillheat-1.0.4.tar.gz.

File metadata

  • Download URL: pymillheat-1.0.4.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.29.1 CPython/3.6.0

File hashes

Hashes for pymillheat-1.0.4.tar.gz
Algorithm Hash digest
SHA256 ec94ad995fd1d5a4eee0468d0bc0ef881945b48937752c132218673a1c5c76ec
MD5 84558a366f123ef54460176a642abe60
BLAKE2b-256 247a902d93c7c31bbafce2ce0f3c62e3671750c29b3220d41b189be16399a30d

See more details on using hashes here.

File details

Details for the file pymillheat-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: pymillheat-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.29.1 CPython/3.6.0

File hashes

Hashes for pymillheat-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 1fa6cf8692a5edf3fb298bc7b3dce9dfa3399aa4ed1828c410d3b12d23a04534
MD5 a0691f1faebdaf25605674f3c3759d7b
BLAKE2b-256 1f0ec2d7abb07cf5e056ae4fe213ba6d1bc1b4d06637759cb084ba6eb5177b13

See more details on using hashes here.

Supported by

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