Home of the Home Assistant usage stats.
Go to file
dependabot[bot] 2ee10811e7
Bump chart.js from 4.4.5 to 4.4.6 (#915)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-04 09:47:35 +01:00
.github Bump actions/checkout from 4.2.1 to 4.2.2 (#912) 2024-10-29 06:08:12 +01:00
script Update wrangler from v1 to v3 (#765) 2023-08-22 09:44:37 +02:00
site Fix build 2024-10-13 08:42:11 +00:00
worker Allow longer versions (#904) 2024-10-15 14:16:21 -04:00
.devcontainer.json Bump node from 16 to 20 (#789) 2023-10-09 14:34:14 +02:00
.gitignore Rewrite to use 11ty (#638) 2022-10-11 16:23:45 -04:00
.nvmrc Bump node from 16 to 20 (#789) 2023-10-09 14:34:14 +02:00
LICENSE Add LICENSE (#196) 2021-06-03 10:00:01 -07:00
README.md Adjust wording (#129) 2021-04-28 11:22:58 -07:00
package.json Bump chart.js from 4.4.5 to 4.4.6 (#915) 2024-11-04 09:47:35 +01:00
yarn.lock Bump chart.js from 4.4.5 to 4.4.6 (#915) 2024-11-04 09:47:35 +01:00

README.md

analytics.home-assistant.io

This repository contains the source of the https://analytics.home-assistant.io website and the CloudFlare worker that recieves the payload from the analytics integration

Worker

This recieves the payload from the analytics integration and stores that data in a KV store.

  • Entries are kept for a maximum of 60 days since last update.

The worker source are located in the worker directory.

Schedule

There are several scheduled tasks that iterate over the stored data and generate the data that the site uses. These tasks run at different times.

task runs description
PROCESS_QUEUE Every 2 min Processes the current queue untill everything is done, when it's done the site will regenerate with the new data, then it waits untill the next RESET_QUEUE task has run.
UPDATE_HISTORY Every hour Update history, this will update the installation types, versions, and totals, when it's done the site will regenerate with the new data.
RESET_QUEUE 5min past midnight This will reset the queue if it's empty, so the next PROCESS_QUEUE can start

Site

The source of the https://analytics.home-assistant.io website.

The website is bundled with Vite and served with Netlify.

The website source are located in the site directory.

Development

To do local development of the website first clone the repository and open the devcontainer. Once the devcontainer has started run script/develop in the terminal, a preview of the site will open in your default browser.

PR's should target the dev (default) branch.

Sites

Environment URL
Production https://analytics.home-assistant.io/
Dev https://dev--home-assistant-analytics.netlify.app/