Skip to main content

asyncio-orvibo

Control Orvibo devices with Python 3 using asyncio (single threaded with event loop). Currently supports the S20 WiFi Smart Switch and AllOne IR.

Usage

from asyncio_orvibo import s20
import asyncio
import traceback
async def test_switch_all_off_on():
    dict_devices = await s20.S20.discovery()
    for _,s in dict_devices.items():
        if await s.state_change(0):
            print("State off OK %s",s)
        else:
            print("State off FAIL %s",s)
    await asyncio.sleep(5)
    for _,s in dict_devices.items():
        if await s.state_change(1):
            print("State on OK %s",s)
        else:
            print("State on FAIL %s",s)
loop = asyncio.get_event_loop()
try:
    loop.run_until_complete(test_switch_all_off_on())
except:
    traceback.print_exc()

################################################

from asyncio_orvibo import allone
import asyncio
import traceback
import binascii
async def test_emit(k):
    dict_devices = await allone.AllOne.discovery()
    payload = binascii.unhexlify(k)
    for _,a in dict_devices.items():
        rv = await a.emit_ir(payload)
        if rv:
            print("Emit OK %s %s",a,binascii.hexlify(rv).decode('utf-8'))
        else:
            print("Emit failed")
loop = asyncio.get_event_loop()
try:
    loop.run_until_complete(test_emit('00000000a801000000000000000098018e11951127029b0625029906270299062702380227023a0225023802270238022d023202270299062702990627029806270238022702380227023802270238022802370227023802270238022702980627023802240245021c02380227023802270238022702980627029c0623023802270298062702990627029b062502990627029906270220b7a1119d11270299062702990628029b06250238022702380227023802270238022702380227029906270299062702990627023802270238022a0234022702380227023802260238022702380226029a06260238022602380226023802260241021e02380227029b0624029906270238022702980627029b0625029906270299062702990629021db79f11a2112502990627029b0625029906270238022702380227023802270238022a02350227029906270299062702990628023702260238022702380227023802270238022702380226023b02240299062702380226023802270238022602380227023c0223029906270299062702380226029b062402990627029906270299062802980627020000'))
except:
    traceback.print_exc()

Contributions

Pull requests are welcome. Possible areas for improvement:

  • Additional Orvibo devices (CT10 for example, I have reverse engineered this device I only need time to write the code).
  • Expand S20 functions: Timers, configuration, etc

Disclaimer

Not affiliated with Shenzhen Orvibo Electronics Co., Ltd.

Metadata

Release files for asyncio-orvibo 1.19

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for asyncio-orvibo 1.19
File Size Uploaded Provenance Actions
asyncio-orvibo-1.19.tar.gz 8.2 kB Without provenance Details for asyncio-orvibo-1.19.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for asyncio-orvibo 1.19
File Interpreter ABI Platform Actions
asyncio_orvibo-1.19-py3-none-any.whl Python 3 none any Details for asyncio_orvibo-1.19-py3-none-any.whl

Total release size: 19.5 kB

Release files / asyncio-orvibo-1.19.tar.gz

Download URL asyncio-orvibo-1.19.tar.gz
Size 8.2 kB
Tags Source
SHA-256 checksum
How to use checksums
192be1f7fbd314bbb63c48079a5ecc0ad8705b2a6527c1417611c1d71028ce1d
BLAKE2b-256 checksum
How to use checksums
1e23162f2c9a9c2a05353d5272c91851dc36f6f3579f457315aa879bbd6b75d4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

Release files / asyncio_orvibo-1.19-py3-none-any.whl

Download URL asyncio_orvibo-1.19-py3-none-any.whl
Size 11.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
418ca67ccaa7cb2191f16bb2459f2afe7ed76cfbe73676807d4902301a41c37f
BLAKE2b-256 checksum
How to use checksums
2ce3c65be65aea366fd2b7481e10a55be631d886b0cb2b19e2221c31bcbc0de8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

Security for asyncio-orvibo 1.19

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page