Skip to main content

Python client to communicate with Moodo API

Project description

pymoodo

Python client to communicate with Moodo API.

How to use

import asyncio
import sys
import logging
from pymoodo import Controller

async def main(email, password):
    controller = await Controller(email, password)

    # Turn on MoodoBox
    for id in controller.boxes:
        controller.boxes[id].turn_on(100)
        # controller.boxes[id].set_fan_speed(21)

        controller.boxes[id].slots[0].set_fan_speed(100)
        controller.boxes[id].slots[1].set_fan_speed(100)
        controller.boxes[id].slots[2].set_fan_speed(100)
        controller.boxes[id].slots[3].set_fan_speed(100)

        for slot_id in controller.boxes[id].slots:
            slot = controller.boxes[id].slots[slot_id]
            slot.turn_on()
            slot.set_fan_speed(100)

        for slot_id in controller.boxes[id].slots:
            slot = controller.boxes[id].slots[slot_id]
            slot.turn_off()

        controller.boxes[id].turn_off()

        while True:
            pass

if __name__ == "__main__":
    if len(sys.argv) == 3:
        asyncio.get_event_loop().run_until_complete(main(sys.argv[1], sys.argv[2]))
    else:
        print('Run example with arguments <email> <password>')

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

pymoodo-0.0.4.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pymoodo-0.0.4-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file pymoodo-0.0.4.tar.gz.

File metadata

  • Download URL: pymoodo-0.0.4.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.6 CPython/3.9.5 Windows/10

File hashes

Hashes for pymoodo-0.0.4.tar.gz
Algorithm Hash digest
SHA256 1342aeb0b5bc2b063462048b51239b80ca7bdf506c3e021e18f590a6e4e467c2
MD5 7c06a62c26cb8af97017b53fe798efa6
BLAKE2b-256 5b37b880803d2356f10030af24c6e24d72a40e706ed19303eddef058c5e34190

See more details on using hashes here.

File details

Details for the file pymoodo-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: pymoodo-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 6.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.6 CPython/3.9.5 Windows/10

File hashes

Hashes for pymoodo-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 3d2e7cc26161174a530a99d9126dffef162fbd559b209b2663e28aea1d74f53e
MD5 9c010961a9d7056886a92cc996e8ac78
BLAKE2b-256 a6a9f973ded7ed8b8baf6f5c48239e663a9a798cb2933b2b9e25128af3e296d0

See more details on using hashes here.

Supported by

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