Skip to main content
Change of provenance

The repository or configuration that created this release differ from a previous release. View details.

franklinwh-ha-cloud-analytics

The FranklinWH cloud's energy reporting, shared by the FranklinWH bridges. It sits next to a bridge's own (local) analytics behind a Local / Cloud switch: the same controls, two different sources, and the page always says which one it is showing.

  • Periods: Day (5-min), Day (hourly), Week, Month, Year, Lifetime, with a date picker, ‹ › stepping and Today.
  • Filters: a chip per series to show or hide it; Line | Area for the day's lines; stacked bars as an energy balance. All remembered in the browser.
  • Chart: home load, solar, battery (discharge +, charge −) and grid (import +, export −) in the site's time zone.
  • Totals: solar production (to home, battery, grid), battery flows (discharged by destination, charged by source), grid flows (imported / exported) and home load (by source), each value with how sure the source is of it.
  • History: imported into the bridge's own database (closed months once, the current month refreshed) for monthly, annual and lifetime totals, queries and download.

Status: phase 1 (periods, chart payload, panel). The phased plan is in direct-connect-bridge #215.

How a bridge uses it

The bridge keeps the cloud credentials, its routes and its database. This package makes the cloud calls through franklinwh-cloud, builds one payload per period, and ships a dependency-free panel the bridge mounts under its Analytics page.

import franklinwh_ha_cloud_analytics as ca

cache = ca.Cache()                       # one per bridge; keyed by gateway below

# GET /api/analytics/cloud?period=month&date=2026-11-05
payload = await ca.fetch(client, "month", date(2026, 11, 5), today=site_today,
                         cache=cache, key=gateway_id)

client is a logged-in franklinwh-cloud client for the gateway, and site_today is today's date in the site's own time zone. Serve ca.static_dir() at /cloud-analytics/, then:

<link rel="stylesheet" href="cloud-analytics/cloud-analytics.css">
<script src="cloud-analytics/cloud-analytics.js"></script>
<script>FWHCloudAnalytics.mount(el, {endpoint: "api/analytics/cloud",
                                    params: () => ({gateway: currentGatewayId})});</script>

python -m franklinwh_ha_cloud_analytics.demo serves the panel over made-up data.

Periods

Period Library call Chart
Day (5-min) get_power_by_day(day) lines, kW
Day (hourly) get_power_by_day(day), added up per hour bars, kWh
Week get_power_details(2, its Monday) bars per day, kWh
Month get_power_details(3, the 1st) bars per day, kWh
Year get_power_details(4, 1 January) bars per month, kWh
Lifetime get_power_details(5, today) bars per year, kWh

A Day request to get_power_details returns a single bucket, so both Day views read the 5-minute power. There, home, battery and grid are sums of the cloud's directional flows (solar → home, grid → battery, …), so they're marked derived (≈). Every series carries the weakest evidence rating of the fields it uses (franklinwh-cloud's field dictionary); INFERRED ones are labelled. No data stays null, never 0. Signs: battery discharge +, charge −; grid import +, export −.

Caching: a period that today falls in is kept for 5 minutes, a finished one for 6 hours. The cloud's rate limit is per account, shared with the FranklinWH app.

Licence

MIT

Metadata

Release files for franklinwh-ha-cloud-analytics 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Change of provenance

The repository or configuration that created these release files differ from that of a previous release.

We recommend inspecting the repository and configuration before proceeding. View details.

Source distribution (sdist)

Source distribution for franklinwh-ha-cloud-analytics 0.1.2
File Size Uploaded Provenance Actions
franklinwh_ha_cloud_analytics-0.1.2.tar.gz 21.2 kB With provenance Details for franklinwh_ha_cloud_analytics-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for franklinwh-ha-cloud-analytics 0.1.2
File Interpreter ABI Platform Actions
franklinwh_ha_cloud_analytics-0.1.2-py3-none-any.whl Python 3 none any Details for franklinwh_ha_cloud_analytics-0.1.2-py3-none-any.whl

Total release size: 39.8 kB

Release files / franklinwh_ha_cloud_analytics-0.1.2.tar.gz

Change of provenance

This file belongs to a release with changed provenance: the repository or configuration that created the release files differ from that of a previous release.

We recommend inspecting the repository and configuration before proceeding. View details.

Download URL franklinwh_ha_cloud_analytics-0.1.2.tar.gz
Size 21.2 kB
Tags Source
SHA-256 checksum
How to use checksums
de6618e43b1b430c71cf761b022f2f7f5f2aa3f0d97ec6ce711da1a9677a972d
BLAKE2b-256 checksum
How to use checksums
d437c377ac059a5322290a92c1f402036f692732922defe76637f5ee06bc07e7
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 8, 2026.

Transparency log

Release files / franklinwh_ha_cloud_analytics-0.1.2-py3-none-any.whl

Change of provenance

This file belongs to a release with changed provenance: the repository or configuration that created the release files differ from that of a previous release.

We recommend inspecting the repository and configuration before proceeding. View details.

Download URL franklinwh_ha_cloud_analytics-0.1.2-py3-none-any.whl
Size 18.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2f57a264c341ee99878b725dd3495c5bef89484a5bec4bf08f7f247a1a961889
BLAKE2b-256 checksum
How to use checksums
e041a77c88ac082c678f4ef8607bb6f8d7b6ee8eda9fe576ad4d9a246e64a1ed
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 8, 2026.

Transparency log

Security for franklinwh-ha-cloud-analytics 0.1.2

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.

Change of provenance

The configuration that created this release differs from a previous release.

While this could reflect a routine change by the project maintainers, it may also indicate that the release files have been compromised.

Select from 2 files

Attestation for franklinwh_ha_cloud_analytics-0.1.2.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 8, 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