Skip to main content

MirAIe AC API Client (miraie-ac-in)

PyPI version Python Version Version AI-Assisted AI Attribution

A Python client library for controlling Panasonic MirAIe smart air conditioners. It supports direct local UDP control on LAN, cloud MQTT communication, dynamic hardware capability lookup, and telemetry decoding.


Features

  • Local UDP Control: Direct local network control on UDP ports 5001 and 5002 using AES-256-CBC encryption, providing fast command execution (under 30 ms) without requiring internet access.
  • Automatic Cloud Fallback: Automatically falls back to cloud MQTT if a local UDP command is dropped or the device is unreachable on LAN.
  • Dynamic Hardware Capabilities: Automatically reads supported features per model (0.5°C vs 1.0°C temperature steps, motorized horizontal swing, night display mode, convertible capacity percentages, Nanoe air purification, and buzzer controls).
  • Firmware 3.02+ Temperature Support: Decodes high-resolution ambient room temperature reported by newer firmware versions, while retaining standard decoding for older firmware.
  • Convertible Capacity Modes: Supports 4-in-1, 7-in-1, and 8-in-1 compressor profiles (40% to 110%).
  • Telemetry & Diagnostics: Parses power state, fan speed, swing modes, Nanoe status, filter cleaning alerts, Wi-Fi RSSI signal strength, error codes, and control sources.
  • Resource Lifecycle Management: Provides an async close() method to clean up network sockets, background tasks, and HTTP client sessions.

Installation

Install the package via pip:

pip install miraie-ac-in

Quick Start

import asyncio
from miraie_ac import MirAIeHub, MirAIeBroker

async def main():
    broker = MirAIeBroker()
    hub = MirAIeHub()

    # Sign in using your registered mobile number or email
    await hub.init("+919999999999", "your_password", broker)
    
    # List discovered devices and hardware capabilities
    for device in hub.home.devices:
        print(f"Device: {device.friendly_name} (ID: {device.id})")
        print(f"  Local UDP Supported: {device.supports_local_udp}")
        print(f"  Temp Step: {device.target_temperature_step}°C")
        print(f"  Horizontal Swing: {device.supports_horizontal_swing}")
        
    # Example: Control a device
    if hub.home.devices:
        device = hub.home.devices[0]
        await device.turn_on()
        await device.set_temperature(24.0)
        
    await hub.close()

asyncio.run(main())

Command-Line Interface (CLI)

miraie-ac-in includes a command-line tool miraie-ac:

# Export local UDP AES keys, MACs, and device IDs in JSON
miraie-ac dump-keys --user +919999999999

# Discover Panasonic ACs on the local network via UDP
miraie-ac discover

# Ping an AC on UDP port 5001 and measure round-trip latency
miraie-ac ping --ip 192.168.1.100 --device-id 0123456789ab --key "$MIRAIE_KEY" --iv "$MIRAIE_IV"

# Send commands via Local UDP
miraie-ac control --transport udp --ip 192.168.1.100 --device-id 0123456789ab --key "$MIRAIE_KEY" --iv "$MIRAIE_IV" --power on --temp 24 --mode cool

# Send commands via Cloud MQTT
miraie-ac control --transport cloud --user +919999999999 --device-id 0123456789ab --power off

# Stream live telemetry from the local UDP socket (port 5002)
miraie-ac listen --transport udp --device-id 0123456789ab --key "$MIRAIE_KEY" --iv "$MIRAIE_IV"

My Python Libraries

Library PyPI Package Description Status
Panasonic AC Models panasonic-ac-models Hardware profiles, capability lookup & IR protocol generator for Indian Panasonic ACs Stable
IFB Washer Models ifb-washer-models Unified hardware database, model lookup & cycle capability gating for IFB smart washers Stable
MirAIe AC API Client miraie-ac-in Async MQTT & REST API client for Panasonic MirAIe-connected Air Conditioners Stable
Qubopy qubopy Async client & CLI for Hero Qubo cameras, smart locks, air purifiers & smart home devices Stable
PyAtomberg pyatomberg Async client for Atomberg smart locks (BLE/Wi-Fi), ceiling fans & home appliances Stable

Credits & License

Contributors & Protocol Research

Maintenance & Development

  • Lead Architecture & Hardware Testing: @selvakk2k — physical device telemetry capture, protocol analysis, and hardware verification.
  • Code Implementation & Engineering: Antigravity (Google DeepMind) — asyncio local UDP transport, dynamic capabilities, resource management, and test suite.
  • Automated Code Review: CodeRabbit (@coderabbitai) — automated pull request and pre-commit code reviews.
  • Code Review & Auditing: Claude (Anthropic) — code auditing and verification.

Licensed under the MIT License. See the LICENSE file for details.

Metadata

Release files for miraie-ac-in 1.5.1

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

Source distribution (sdist)

Source distribution for miraie-ac-in 1.5.1
File Size Uploaded Provenance Actions
miraie_ac_in-1.5.1.tar.gz 29.5 kB With provenance Details for miraie_ac_in-1.5.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for miraie-ac-in 1.5.1
File Interpreter ABI Platform Actions
miraie_ac_in-1.5.1-py3-none-any.whl Python 3 none any Details for miraie_ac_in-1.5.1-py3-none-any.whl

Total release size: 61.5 kB

Release files / miraie_ac_in-1.5.1.tar.gz

Download URL miraie_ac_in-1.5.1.tar.gz
Size 29.5 kB
Tags Source
SHA-256 checksum
How to use checksums
7dd562d8da2d20bdd7123e9083fee72e377c3a0f0b157f6c8bf01020ea3e661e
BLAKE2b-256 checksum
How to use checksums
c76e19342fbfdc9d860d10876859aff1c61e1ab2df2efe96e5a9afde1d1849cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.

Transparency log

Release files / miraie_ac_in-1.5.1-py3-none-any.whl

Download URL miraie_ac_in-1.5.1-py3-none-any.whl
Size 31.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0ef91c7fe78911b33e177c87ab20257e288727e608fb8087f845b46dee02c2c6
BLAKE2b-256 checksum
How to use checksums
0ddca6dffa1b5ee3e5da8b5bdf6cc1b132f693e92900d1e61a7f2efb31d08223
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.

Transparency log

Security for miraie-ac-in 1.5.1

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for miraie_ac_in-1.5.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.

Transparency log

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