Skip to main content

A Python library to work with Inels devices over MQTT (using Asyncio)

Project description

Inels MQTT wrapper

A Python library to work with Inels smart home devices over MQTT (using Asyncio).

WARNING: THIS PACKAGE IS PUBLISHED ONLY FOR TESTING THE PUBLIC INTERFACE AND IS NOT READY TO USE. MOST OF THE FEATURES ARE ONLY STUBS FOR NOW AND ARE NOT IMPLEMENTED YET. IMPLEMENTED FEATURES HAVE NOT RECEIVED ANY TESTING YET. DO NOT DOWNLOAD THIS PACKAGE IF YOU ARE AN OUTSIDE DEVELOPER NOT INVOLVED IN THE LIBRARY DEVELOPMENT.


Demo code

Below is a simple code snippet to demonstrate the basic interaction with this library.

import asyncio

import asyncio_mqtt as aiomqtt

from inels_mqtt_wrapper import RFDAC71B, DeviceStatusUnknownError


async def main() -> None:
    """Entrypoint"""

    async with aiomqtt.Client("localhost") as client:
        device = RFDAC71B(
            mac_address="00:00:00:00:00:00",  # Your gateway's MAC address
            device_address="01207D",  # Your device's address (found on the device's top case)
            mqtt_client=client,  # An instance of asyncio_mqtt.Client
        )
        print("Connected:", device.is_connected)  # True

        try:
            print(device.status)  # A dict containing device-specific status data
        except DeviceStatusUnknownError as e:
            print(e)  # Print the error if the device status is unknown

        await device.set_brightness_percentage(50)  # Set the device's brightness to 50%
        await device.without_function()  # Apply the before set brightness percentage

        try:
            print(device.status)  # Check the device status again
        except DeviceStatusUnknownError as e:
            print(e)  # Print the error if the device status is unknown


if __name__ == "__main__":
    asyncio.run(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

inels_mqtt_wrapper-0.3.0.tar.gz (12.0 kB view hashes)

Uploaded Source

Built Distribution

inels_mqtt_wrapper-0.3.0-py3-none-any.whl (16.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page