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.2.tar.gz (23.9 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.2-py3-none-any.whl (17.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pynapoleon-0.0.2.tar.gz
  • Upload date:
  • Size: 23.9 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.2.tar.gz
Algorithm Hash digest
SHA256 9cea151dd647b0f8c62315ca9b61397aeafa7ba723eb510bdb8895c78dddf774
MD5 aa22d6608644500a9034cb513ce1011b
BLAKE2b-256 0b3df6b7cee54c399ed69a4cc278686a6255d3a0727e654d5a08dce2d5162f1d

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: pynapoleon-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 17.6 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8ab73e65a25f861ab35da1c328a3e90cb97134b370a9eba253ee0ce13d5a7a56
MD5 c93cdfd67cbc5436d62997a946bf3054
BLAKE2b-256 91c4b089c8b74c1112602a2bf51f46c8709c72305b8c38fceaad82df14038775

See more details on using hashes here.

Provenance

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