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.3.tar.gz (24.5 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.3-py3-none-any.whl (17.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pynapoleon-0.0.3.tar.gz
  • Upload date:
  • Size: 24.5 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.3.tar.gz
Algorithm Hash digest
SHA256 435bfba559d1230737c576a97b3c2552e62efb92b34a34ee29411e4bd364682d
MD5 9f733d2c0c51236de3225f7bbdc6bffe
BLAKE2b-256 87f30ab25083ecdf802099f84b3b77cbae8bbf4e128e5f3d2ae9395bef74ad8f

See more details on using hashes here.

Provenance

The following attestation bundles were made for pynapoleon-0.0.3.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.3-py3-none-any.whl.

File metadata

  • Download URL: pynapoleon-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 17.9 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 0d15a512566a8d201403774192c40ea411f0fc5417032db885d4220c08f43885
MD5 66c0bb656a58acd963a76cdd2701f447
BLAKE2b-256 8a0c9e218bdf1774a093b4311351e7aa3ffa55394d6b50ce307f98a886876f5d

See more details on using hashes here.

Provenance

The following attestation bundles were made for pynapoleon-0.0.3-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