A Power Query custom connector for browsing and loading Home Assistant history from InfluxDB 1.x into Power BI.
The connector is a feature-complete beta, suitable for testing and controlled internal use. It has been validated with Microsoft's Power Query parser, packaged reproducibly, and exercised against the targeted InfluxDB 1.8/Home Assistant schema.
The current .mez is unsigned. A production-trusted .pqx still requires an organization-controlled code-signing certificate plus Windows PQTest, Power BI Desktop, and on-premises gateway verification.
Current test release: Download PowerQueryInfluxHomeAssistant 0.7.0 beta 1
- InfluxDB username/password authentication through the Power Query credential store
- hierarchical measurement and entity browser with entity counts
- Power BI navigator multi-select support for individual entity tables
- case-insensitive measurement and entity filters
- period presets from 24 hours through all available history
- exact custom start and end timestamps with time-zone support
- bounded server-side entity, field, measurement, and time filtering
- configurable InfluxDB field, including common
valueandstatefields - numeric, text, and Boolean history with a stable Power BI schema
- raw data plus
mean,min,max,sum,last, andcountaggregations - automatic aggregation windows with an optional manual override
RangeStartandRangeEndpushdown for Incremental Refresh- UTC
datetimezonetimestamps - bounded exponential retry for temporary InfluxDB failures
- actionable authentication, permission, query-size, and service errors
- connector diagnostics including the effective range, aggregation, field, and transport-security state
- reproducible
.mezpackaging, connector icons, and GitHub Actions validation .pqxpackaging and signature-verification helpers for a controlled release process
Select Get data > Other > Home Assistant InfluxDB in Power BI Desktop. The source dialog supports:
- Period: 24 hours, 7/30 days, 3/6 months, 1/2/3/5/10 years, all available data, or a custom range
- Custom start/end: exact
datetimezoneboundaries; the end is exclusive - Measurement contains: filters the measurement folders before opening the navigator
- Entity contains: filters entity leaves before opening the navigator
- Aggregation: raw or a supported InfluxQL aggregation
- Aggregation window override: optional manual grouping interval
- InfluxDB field: defaults to
value; usestatewhere appropriate
The navigator groups entities under Browse by measurement. Each entity is a bounded table leaf whose measurement, entity, field, and time predicates are already pushed into InfluxQL. Power BI owns the navigator interface, so the connector cannot inject an additional search box directly into its tree.
History tables use a stable schema across refreshes:
| Column | Type | Description |
|---|---|---|
Timestamp |
datetimezone |
UTC history timestamp |
EntityId |
text | Full Home Assistant entity ID when reconstructable |
Domain |
text | Home Assistant domain when available |
Value |
number | Numeric field value |
ValueText |
text | Text field value |
ValueBoolean |
logical | Boolean field value |
Unit |
text | Unit of measurement when stored as a tag |
Measurement |
text | InfluxDB measurement |
Field |
text | Selected InfluxDB field |
Aggregation |
text | Applied aggregation mode |
Select raw for text or Boolean fields because numeric aggregations such as mean do not apply to those values.
The connector targets the common Home Assistant InfluxDB layout:
- entity tag:
entity_id - optional domain tag:
domain - default field:
value, configurable to fields such asstate - optional unit tag:
unit_of_measurement
HomeAssistantInflux.History also allows callers to override the measurement, entity tag, and field name.
- InfluxDB 1.x with the
/queryendpoint and InfluxQL enabled - a dedicated read-only InfluxDB user with access to the Home Assistant database
- Power BI Desktop with custom connectors enabled
- Microsoft Power Query SDK tools for
.pqx, PQTest, and signing workflows
Do not expose InfluxDB publicly solely for this connector. Prefer HTTPS on a private network or VPN. HTTP Basic authentication is only Base64 encoding and does not protect credentials in transit; the Diagnostics table warns when HTTP is used.
- Download
PowerQueryInfluxHomeAssistant.mez. - Copy it to
Documents/Microsoft Power BI Desktop/Custom Connectors/. - In Power BI Desktop, enable loading custom connectors under Options > Security > Data Extensions.
- Restart Power BI Desktop.
- Select Get data > Other > Home Assistant InfluxDB.
- Enter the InfluxDB server and database.
- Enter the read-only username and password in Power BI's credential dialog.
The beta package is unsigned and should be used only for testing or controlled internal deployment. A signed .pqx is required for trusted distribution with Power BI's recommended connector-security setting.
Browse available measurements and entities:
HomeAssistantInflux.Database(
"https://influx.example.net:8086",
"homeassistant"
)Load hourly averages suitable for Incremental Refresh:
HomeAssistantInflux.History(
"https://influx.example.net:8086",
"homeassistant",
{"sensor.living_room_temperature"},
RangeStart,
RangeEnd,
"mean",
#duration(0, 1, 0, 0)
)RangeStart and RangeEnd must be Power Query datetimezone parameters. Each partition is translated into bounded InfluxQL time predicates; the connector does not download complete history before filtering.
Optional History parameters after the time range are:
- aggregation
- aggregation window
- measurement
- entity tag
- field name
For scheduled refresh in Power BI Service:
- install the same connector package on every on-premises data gateway node that may execute the refresh;
- enable custom connectors for the gateway cluster;
- configure the same server and database values used by the PBIX;
- store the read-only username and password in the gateway data-source credentials;
- verify one bounded refresh before enabling a full historical or Incremental Refresh workload.
Install dependencies and validate the M source, examples, connector resources, credential invariants, and query pushdown:
npm ci
npm run icons
npm run checkCreate the reproducible unsigned development package:
npm run packageThe package is written to dist/PowerQueryInfluxHomeAssistant.mez. GitHub Actions runs the same validation and publishes the .mez as a workflow artifact.
See docs/RELEASE.md for PQTest, gateway, .pqx, signing, checksum, and release requirements. Security reports, privacy behavior, and support expectations are documented in SECURITY.md, PRIVACY.md, and SUPPORT.md.
- InfluxDB 2.x and Flux are not supported.
- Binary field values are not returned by
History. - Entity discovery uses
SHOW TAG VALUES; domain prefixes are reconstructed only when history rows include thedomaintag. - Friendly names, devices, and areas require Home Assistant metadata that is normally absent from the InfluxDB history schema.
- The beta
.mezis unsigned. - Windows PQTest, Power BI Desktop, and gateway release evidence remains outstanding.
- A software license must be selected before a general public release.