Skip to main content

Python library for Napoleon Astound-series fireplaces (Ayla IoT platform)

Project description

pynapoleon

Standalone Python library for Napoleon Astound-series fireplaces.

Napoleon's cloud is the Ayla Networks IoT platform, so this library is a thin Napoleon-property mapping layer on top of ayla-iot-unofficial (the same package the Shark vacuum Home Assistant integration uses).

Status: alpha — under active reverse-engineering. APIs will change.

Features (planned)

  • Async login / token refresh (delegated to ayla-iot-unofficial)
  • Discover fireplaces on the account
  • Read state: power, flame, heater, setpoint, ember/top RGB lights, schedules
  • Write state via batch datapoints (single round-trip)
  • Apply favourites (partytime, campfirewarmth, summerday, glowingsunset)
  • Celsius-native (with helpers for Fahrenheit display)

Installation

pip install pynapoleon

Usage

import asyncio
from pynapoleon import NapoleonClient

async def main():
    async with NapoleonClient(
        email="you@example.com",
        password="...",
        # app_id / app_secret default to the Napoleon mobile app values;
        # override only if you've registered your own Ayla app.
    ) as client:
        await client.login()
        for fp in await client.fireplaces():
            await fp.refresh()
            print(fp.name, "power:", fp.power, "flame:", fp.flame_speed)
            await fp.set_setpoint_c(20)

asyncio.run(main())

CLI

A small CLI is provided for manual testing:

python -m pynapoleon login
python -m pynapoleon list
python -m pynapoleon state <DSN>
python -m pynapoleon set <DSN> power_on_off=1

Security note

Like any Ayla-based device, talking to the cloud requires an app_id and app_secret. This library ships the values used by the Napoleon mobile app as defaults; they are not secrets in the cryptographic sense (any mitmproxy capture exposes them), but the project does not endorse abuse.

Do not commit credential files, tokens, or mitmproxy captures.

Reverse-engineering notes

See docs/protocol.md for the property catalog and write-command details derived from app traffic.

License

MIT — see LICENSE.

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

pynapoleon-0.0.1.tar.gz (23.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pynapoleon-0.0.1-py3-none-any.whl (17.2 kB view details)

Uploaded Python 3

File details

Details for the file pynapoleon-0.0.1.tar.gz.

File metadata

  • Download URL: pynapoleon-0.0.1.tar.gz
  • Upload date:
  • Size: 23.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pynapoleon-0.0.1.tar.gz
Algorithm Hash digest
SHA256 e4ae580c74dbfce5026ce3f3c32bfc169140cc1e0a66d318ec0da7ca85347103
MD5 2a9dee7feca7aa6d542ac63ef0fe9c30
BLAKE2b-256 54d48c7b4b08d4f8e750246703c8d3aa02c45c98cf1cff061569b0bac9b0030c

See more details on using hashes here.

Provenance

The following attestation bundles were made for pynapoleon-0.0.1.tar.gz:

Publisher: release.yml on sslivins/pynapoleon

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pynapoleon-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: pynapoleon-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 17.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pynapoleon-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 630a068e3ac743b2824f5392430f670097ae68bf155ef6c6bb7dd6dcb3ae3382
MD5 395687255a19f286838b0f8266564e4d
BLAKE2b-256 414fbd9ec359b9d2f1c5c779e3cd8d4f620a9a4ce91899bbab5e6700d4602c36

See more details on using hashes here.

Provenance

The following attestation bundles were made for pynapoleon-0.0.1-py3-none-any.whl:

Publisher: release.yml on sslivins/pynapoleon

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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