Skip to main content

Control the IPX800V5 and its extensions.

Project description

pypx800v5 - Python GCE IPX800 V5

Control the IPX800 V5, its extensions and objects:

  • Thermostat
  • Counter
  • Tempo
  • X-8R
  • X-8D
  • X-24D
  • X-Dimmer
  • X-PWM
  • X-THL
  • X-4VR
  • X-4FP
  • X-Display (v1 and v2)

IPX800 parameters

  • host: ip or hostname (mandatory)
  • port: (default: 80)
  • api_key: (mandatory)
  • request_timeout: timeout for request in seconds (default: 30)
  • request_retries_count: retry request if an error occured (default: 5)
  • request_retries_delay: delay in seconds before trying request (default: 0.5)
  • session: aiohttp.client.ClientSession

Example

import asyncio

from pypx800v5 import *


async def main():
    async with IPX800(host='192.168.1.123', api_key='xxx') as ipx:
        await ipx.ping()
        await ipx.init_config()

        relay = IPX800Relay(ipx, 0)
        print(await relay.status)
        await relay.on()

        opencoll = IPX800OpenColl(ipx, 0)
        print(await opencoll.status)
        await opencoll.on()

        input = IPX800DigitalInput(ipx, 2)
        print(await input.status)

        input = IPX800AnalogInput(ipx, 0)
        print(await input.status)
        
        input = IPX800OptoInput(ipx, 0)
        print(await input.status)

        light = X8R(ipx, 0, 7)
        print(await light.status)
        await light.on()

        pwm = XPWM(ipx, 0, 6)
        print(await pwm.status)
        print(await pwm.level)
        await pwm.set_level(90)

        light = XDimmer(ipx, 0, 2)
        print(await light.status)
        print(await light.level)
        await light.on()

        input = X24D(ipx, 0, 14)
        print(await input.status)

        capteur = XTHL(ipx, 0)
        print(await capteur.temperature)
        print(await capteur.humidity)
        print(await capteur.luminosity)

        tempo = Tempo(ipx, 0)
        print(tempo.name)
        print(await tempo.status)
        print(await tempo.time)

        x010v_output = X010V(ipx, 0, 2)
        print(await x010v_output.status)
        print(await x010v_output.level)
        await x010v_output.on()

        xdisplay = XDisplay(ipx, 0)
        await xdisplay.refresh_screens()
        for screen in xdisplay.screens:
            print(f"{screen.id} - {screen.name} - {screen.type}")
        print(f"screen status ? {await xdisplay.screen_status}")
        print(f"screen locked ? {await xdisplay.screen_lock_status}")
        print(f"current screen ? {await xdisplay.current_screen_id}")
        await xdisplay.set_screen(0)
        print(f"current screen ? {await xdisplay.current_screen_id}")

if __name__ == "__main__":
    loop = asyncio.get_event_loop()
    loop.run_until_complete(main())

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

pypx800v5-1.4.1.tar.gz (12.8 kB view details)

Uploaded Source

Built Distribution

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

pypx800v5-1.4.1-py3-none-any.whl (19.3 kB view details)

Uploaded Python 3

File details

Details for the file pypx800v5-1.4.1.tar.gz.

File metadata

  • Download URL: pypx800v5-1.4.1.tar.gz
  • Upload date:
  • Size: 12.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for pypx800v5-1.4.1.tar.gz
Algorithm Hash digest
SHA256 a7c8193ea57c27315ce92abbc64aec800d1f87c4adccacf5e98b5f7d0afd9e08
MD5 32c4cd9f5cef994f9097d841f22cd269
BLAKE2b-256 6c12852d0aaa94d1757b4986f49c4456183efd2c20bac2f13d0e1125838506ba

See more details on using hashes here.

File details

Details for the file pypx800v5-1.4.1-py3-none-any.whl.

File metadata

  • Download URL: pypx800v5-1.4.1-py3-none-any.whl
  • Upload date:
  • Size: 19.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for pypx800v5-1.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2f93b47983ff3e236f9101985cae42144dfacea6c58edef2a850468225a93a62
MD5 9649d4e2dfdf357b70caa6f978304dba
BLAKE2b-256 d8339e7e5199e1c3371bb5fa08f6b093f2d4453457877480185f21c3e13a8f79

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