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.4.tar.gz (24.8 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.4-py3-none-any.whl (18.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pynapoleon-0.0.4.tar.gz
  • Upload date:
  • Size: 24.8 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.4.tar.gz
Algorithm Hash digest
SHA256 04944aeb5f9bdf40d57b14b8d19929264bbb50593b13e742391d70e37c53db5d
MD5 de74fb500190eaf15dc719e11ec526f6
BLAKE2b-256 f1891e8970f5bc163128977afca5e66480039180726486cca4d87a99f3ac266b

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: pynapoleon-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 18.1 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 a8066b47f22e5b786672dbef13377bd4d8e29b597aee0d3d4ecc02686253d4f8
MD5 eeed6e74e8078c2826062f9a0db18879
BLAKE2b-256 b4b2800622f8f65d2131f947b16fa21f5b93b4f2f371d40196699bd3873e0be0

See more details on using hashes here.

Provenance

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