CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/pypi-arduino-iot-client

Arduino IoT Cloud API Python Client for managing devices, things, properties, and timeseries data

Overview
Eval results
Files

devices.mddocs/

Device Management

Complete lifecycle management of Arduino IoT devices including creation, configuration, certificate management, OTA updates, password handling, and tagging.

Core Imports

from iot_api_client.api import (
    DevicesV2Api,
    DevicesV2CertsApi,
    DevicesV2OtaApi,
    DevicesV2PassApi,
    DevicesV2TagsApi
)
from iot_api_client.models import (
    CreateDevicesV2Payload,
    ArduinoDevicev2,
    Devicev2,
    ArduinoDevicev2Cert,
    CreateDevicesV2CertsPayload,
    Devicev2Pass,
    Devicev2Otaurlpyalod,
    Tag
)

Capabilities

Device CRUD Operations

Core device management operations for creating, reading, updating, and deleting IoT devices.

class DevicesV2Api:
    def devices_v2_create(self, create_devices_v2_payload: CreateDevicesV2Payload, x_organization: str = None) -> ArduinoDevicev2:
        """
        Creates a new device associated to the user.

        Args:
            create_devices_v2_payload: Device creation payload
            x_organization: Organization ID for organization-level access

        Returns:
            ArduinoDevicev2: Created device object
        """

    def devices_v2_list(self, across_user_ids: bool = None, serial: str = None, tags: List[str] = None, x_organization: str = None) -> List[ArduinoDevicev2]:
        """
        Returns the list of devices associated to the user.

        Args:
            across_user_ids: Search across all user IDs
            serial: Filter by device serial number
            tags: Filter by device tags
            x_organization: Organization ID for organization-level access

        Returns:
            List[ArduinoDevicev2]: List of device objects
        """

    def devices_v2_show(self, id: str, x_organization: str = None) -> ArduinoDevicev2:
        """
        Returns the device requested by the user.

        Args:
            id: Device ID
            x_organization: Organization ID for organization-level access

        Returns:
            ArduinoDevicev2: Device object
        """

    def devices_v2_update(self, id: str, devicev2: Devicev2, x_organization: str = None) -> ArduinoDevicev2:
        """
        Updates a device associated to the user.

        Args:
            id: Device ID
            devicev2: Device update payload
            x_organization: Organization ID for organization-level access

        Returns:
            ArduinoDevicev2: Updated device object
        """

    def devices_v2_delete(self, id: str, x_organization: str = None) -> None:
        """
        Removes a device associated to the user.

        Args:
            id: Device ID
            x_organization: Organization ID for organization-level access
        """

Device Properties and Events

Access device properties, events, and status information.

class DevicesV2Api:
    def devices_v2_get_properties(self, id: str, show_deleted: bool = None, x_organization: str = None) -> ArduinoDevicev2properties:
        """
        Returns device properties.

        Args:
            id: Device ID
            show_deleted: Include deleted properties
            x_organization: Organization ID for organization-level access

        Returns:
            ArduinoDevicev2properties: Device properties
        """

    def devices_v2_update_properties(self, id: str, properties_values: PropertiesValues, x_organization: str = None) -> None:
        """
        Update device properties values.

        Args:
            id: Device ID
            properties_values: Properties to update
            x_organization: Organization ID for organization-level access
        """

    def devices_v2_get_events(self, id: str, limit: int = None, start: str = None, x_organization: str = None) -> ArduinoDevicev2EventProperties:
        """
        Get device events.

        Args:
            id: Device ID
            limit: Maximum number of events to return
            start: Start timestamp for events
            x_organization: Organization ID for organization-level access

        Returns:
            ArduinoDevicev2EventProperties: Device events
        """

    def devices_v2_get_status_events(self, id: str, limit: int = None, start: str = None, x_organization: str = None) -> ArduinoDevicev2StatusEvents:
        """
        Get device status events.

        Args:
            id: Device ID
            limit: Maximum number of events to return
            start: Start timestamp for events
            x_organization: Organization ID for organization-level access

        Returns:
            ArduinoDevicev2StatusEvents: Device status events
        """

    def devices_v2_timeseries(self, id: str, pid: str, start: str = None, end: str = None, interval: int = None, x_organization: str = None) -> ArduinoDevicev2propertyvalues:
        """
        Get device property timeseries data.

        Args:
            id: Device ID
            pid: Property ID
            start: Start timestamp
            end: End timestamp
            interval: Data aggregation interval in seconds
            x_organization: Organization ID for organization-level access

        Returns:
            ArduinoDevicev2propertyvalues: Timeseries data
        """

Device Certificate Management

Manage device certificates for secure communication.

class DevicesV2CertsApi:
    def devices_v2_certs_create(self, id: str, create_devices_v2_certs_payload: CreateDevicesV2CertsPayload) -> ArduinoDevicev2Cert:
        """
        Creates a new device certificate.

        Args:
            id: Device ID
            create_devices_v2_certs_payload: Certificate creation payload

        Returns:
            ArduinoDevicev2Cert: Created certificate
        """

    def devices_v2_certs_list(self, id: str) -> List[ArduinoDevicev2Cert]:
        """
        Returns the list of certificates associated to the device.

        Args:
            id: Device ID

        Returns:
            List[ArduinoDevicev2Cert]: List of certificates
        """

    def devices_v2_certs_show(self, id: str, cid: str) -> ArduinoDevicev2Cert:
        """
        Returns the certificate requested by the user.

        Args:
            id: Device ID
            cid: Certificate ID

        Returns:
            ArduinoDevicev2Cert: Certificate object
        """

    def devices_v2_certs_update(self, id: str, cid: str, devicev2_cert: Devicev2Cert) -> ArduinoDevicev2Cert:
        """
        Updates a device certificate.

        Args:
            id: Device ID
            cid: Certificate ID
            devicev2_cert: Certificate update payload

        Returns:
            ArduinoDevicev2Cert: Updated certificate
        """

    def devices_v2_certs_delete(self, id: str, cid: str) -> None:
        """
        Removes a device certificate.

        Args:
            id: Device ID
            cid: Certificate ID
        """

Over-The-Air (OTA) Updates

Manage firmware updates for devices.

class DevicesV2OtaApi:
    def devices_v2_ota_upload(self, id: str, ota_file, async_req: bool = None, expire_in_mins: int = None) -> ArduinoDevicev2Otaupload:
        """
        Upload an OTA binary file.

        Args:
            id: Device ID
            ota_file: OTA binary file
            async_req: Execute request asynchronously
            expire_in_mins: Expiry time in minutes for the upload URL

        Returns:
            ArduinoDevicev2Otaupload: Upload response
        """

    def devices_v2_ota_send(self, id: str, devicev2_otabinaryurl: Devicev2Otabinaryurl) -> None:
        """
        Send an OTA update to a device.

        Args:
            id: Device ID
            devicev2_otabinaryurl: OTA binary URL payload
        """

    def devices_v2_ota_url(self, id: str, devicev2_otaurlpyalod: Devicev2Otaurlpyalod) -> ArduinoDevicev2Otaupload:
        """
        Generate an OTA update URL for a device.

        Args:
            id: Device ID
            devicev2_otaurlpyalod: OTA URL generation payload

        Returns:
            ArduinoDevicev2Otaupload: OTA URL response
        """

Device Password Management

Manage device authentication passwords.

class DevicesV2PassApi:
    def devices_v2_pass_get(self, id: str, suggest_password: bool = None) -> ArduinoDevicev2Pass:
        """
        Get device password.

        Args:
            id: Device ID
            suggest_password: Generate a suggested password

        Returns:
            ArduinoDevicev2Pass: Device password information
        """

    def devices_v2_pass_set(self, id: str, devicev2_pass: Devicev2Pass) -> ArduinoDevicev2Pass:
        """
        Set device password.

        Args:
            id: Device ID
            devicev2_pass: Password payload

        Returns:
            ArduinoDevicev2Pass: Password confirmation
        """

    def devices_v2_pass_check(self, id: str, check_devices_v2_pass_payload: CheckDevicesV2PassPayload) -> None:
        """
        Check device password.

        Args:
            id: Device ID
            check_devices_v2_pass_payload: Password check payload
        """

    def devices_v2_pass_delete(self, id: str) -> None:
        """
        Remove device password.

        Args:
            id: Device ID
        """

Device Tag Management

Organize and categorize devices using tags.

class DevicesV2TagsApi:
    def devices_v2_tags_list(self, id: str) -> ArduinoTags:
        """
        List device tags.

        Args:
            id: Device ID

        Returns:
            ArduinoTags: Device tags
        """

    def devices_v2_tags_upsert(self, id: str, tag: Tag) -> None:
        """
        Creates or updates a device tag.

        Args:
            id: Device ID
            tag: Tag to create or update
        """

    def devices_v2_tags_delete(self, id: str, key: str) -> None:
        """
        Delete a device tag.

        Args:
            id: Device ID
            key: Tag key to delete
        """

Types

class CreateDevicesV2Payload:
    connection_type: str
    fqbn: str
    name: str
    serial: str
    soft_deleted: bool
    type: str
    user_id: str
    wifi_fw_version: str

class ArduinoDevicev2:
    connection_type: str
    created_at: datetime
    device_status: str
    events: List[ArduinoDevicev2EventProperties]
    fqbn: str
    href: str
    id: str
    label: str
    last_activity_at: datetime
    linked_libraries: List[ArduinoLinkedvariable]
    name: str
    no_sketch: bool
    organization_id: str
    ota_available: bool
    ota_compatible: bool
    required_wifi_fw_version: str
    serial: str
    tags: Dict[str, str]
    thing: ArduinoThing
    type: str
    user_id: str
    wifi_fw_version: str

Install with Tessl CLI

npx tessl i tessl/pypi-arduino-iot-client

docs

dashboards.md

devices.md

index.md

lora.md

properties.md

series.md

things.md

tile.json