Skip to main content

Python client to communicate with Moodo API

Project description

pymoodo

Python client to communicate with Moodo API.

How to use

from pymoodo import Controller
import asyncio
import sys
import logging

logging.basicConfig(format='%(asctime)s %(name)-12s %(levelname)-8s %(message)s',
                    datefmt='%d-%m %H:%M',
                    level=logging.DEBUG)

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.3.tar.gz (5.8 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.3-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pymoodo-0.0.3.tar.gz
  • Upload date:
  • Size: 5.8 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.3.tar.gz
Algorithm Hash digest
SHA256 734c391c1d929af5cb1adbfabcfe783be4af9789d140e413f4d6dd3deba1053d
MD5 dbdd67dbf22a2b930c5811e79744310b
BLAKE2b-256 e041c424c41f354a154e41135fbe01871ae6238e90258f26abb53cda199110fc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pymoodo-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 6.7 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e7d7c0557e3b477f7997ca53867cf8d5158726e90dc0d4e6c5043a2e8b572b47
MD5 84584efc5d0c1f67641f479d96adc1f8
BLAKE2b-256 811dbeb777af5758213833091299da6941f007ab31f839ea788d388cda71492f

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