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.

Files for pymillheat, version 1.0.4
Filename, size File type Python version Upload date Hashes
Filename, size pymillheat-1.0.4-py3-none-any.whl (5.5 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size pymillheat-1.0.4.tar.gz (4.0 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page