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.0.167 --device-id 8c53afca6252 --key "$MIRAIE_KEY" --iv "$MIRAIE_IV"

# Send commands via Local UDP
miraie-ac control --transport udp --ip 192.168.0.167 --device-id 8c53afca6252 --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 8c53afca6252 --power off

# Stream live telemetry from the local UDP socket (port 5002)
miraie-ac listen --transport udp --device-id 8c53afca6252 --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.4.0

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.4.0
File Size Uploaded Provenance Actions
miraie_ac_in-1.4.0.tar.gz 28.6 kB With provenance Details for miraie_ac_in-1.4.0.tar.gz

Built distribution (wheel)

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

Total release size: 59.6 kB

Release files / miraie_ac_in-1.4.0.tar.gz

Download URL miraie_ac_in-1.4.0.tar.gz
Size 28.6 kB
Tags Source
SHA-256 checksum
How to use checksums
f5f73a7437f0d66347b955d402a06ddf93db4d95305b7c9b555746f63a312497
BLAKE2b-256 checksum
How to use checksums
b4d11d35568f96f5c687a0ef27d2877c513e3464758e7b05dac69aee0611396b
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 18, 2026.

Transparency log

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

Download URL miraie_ac_in-1.4.0-py3-none-any.whl
Size 31.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f975d06375d359116c45c34fc7c0584b046851fb0add8d34e41f12323b1e454f
BLAKE2b-256 checksum
How to use checksums
56b5d53cde5a83c151b18db8c14f29e2ba60d3f824977a95daabb4fbdde9bd3e
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 18, 2026.

Transparency log

Security for miraie-ac-in 1.4.0

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.4.0.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 18, 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