Python API for ELV MAX! Cube
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
Johann Schmitz ad1f2aae5d Update Makefile il y a 1 an
src/pymax Parse measured temperature data from heater thermostat il y a 3 ans
tests -fixed some tabbing issues il y a 3 ans
.gitignore Updated .gitignore il y a 4 ans
.travis.yml Updated Makefile and travis.yml il y a 4 ans
LICENSE.txt Initial commit il y a 4 ans
Makefile Update Makefile il y a 1 an
README.md Updated readme il y a 4 ans
requirements.txt Added more tests il y a 4 ans
setup.cfg Added setup.py/setup.cfg il y a 4 ans
setup.py Release 0.5 il y a 3 ans

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