Python API for ELV MAX! Cube
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
Johann Schmitz ad1f2aae5d Update Makefile 1年前
src/pymax Parse measured temperature data from heater thermostat 3年前
tests -fixed some tabbing issues 3年前
.gitignore Updated .gitignore 4年前
.travis.yml Updated Makefile and travis.yml 4年前
LICENSE.txt Initial commit 4年前
Makefile Update Makefile 1年前
README.md Updated readme 4年前
requirements.txt Added more tests 4年前
setup.cfg Added setup.py/setup.cfg 4年前
setup.py Release 0.5 3年前

README.md

pymax

Build Status Coverage Status

Basics

Requirements

Supported Python versions: Python 2.7.9+, 3.3, 3.4, 3.5, 3.6 (nightly) and PyPy 2.5.0.

Installation

If you are on Gentoo Linux, run

emerge dev-python/pymax --ask

otherwise use pip

pip install pymax

Usage

Discovery

To find any cube in your network:

from pymax.cube import Discovery

response = Discovery().discover()
print(response)

To find a specific cube in your network:

from pymax.cube import Discovery
response = Discovery().discover(cube_serial=u'LEQ1154727', discovery_type=Discovery.DISCOVERY_TYPE_NETWORK_CONFIG)
print(response)
>>> LEQ1154727: IP: 10.10.10.153, Netmask: 255.255.255.0, Gateway: 10.10.10.1, DNS1: 10.10.10.1, DNS2: 0.0.0.0

Connecting

from pymax.cube import Cube, Connection

cube = Cube('192.168.1.123')
# or
cube = Cube('192.168.1.123', 62910)
# or
cube = Cube(address='192.168.1.123', port=62910)
# or
cube = Cube(Connection(('192.168.1.123', 62910))

try:
    cube.connect()
    
    # fun code here
finally:
    cube.disconnect()

The Cube object implements a context manager, so it's easier to write:

from pymax.cube import Cube

with Cube('192.168.1.123') as cube:
    # fun code here

or, together with a discovery query:

response = Discovery().discover(cube_serial=u'LEQ1154727', discovery_type=Discovery.DISCOVERY_TYPE_NETWORK_CONFIG)
with Cube(response.ip_address) as cube:
    print(cube)

Basic Usage

with Cube(response.ip_address) as cube:
    for room in cube.rooms:
        print("%s:" % room.name)
        for device in room.devices:
            print("  %s (%s), serial: %s" % (device.name, device.type, device.serial))

Protocol

Resources:

License

See LICENSE.txt