<div align="center">
<a href="https://questdb.io/" target="blank"><img alt="QuestDB Logo" src="https://questdb.io/img/questdb-logo-themed.svg" width="305px"/></a>
</div>
# QuestDB state storage (QSS) custom component for Home Assistant
QSS makes it possible to transfer state information of the Home Assistant entities simply and efficiently via InfluxDB Line Protocol into a QuestDB for long-term storage and later analysis.
What ist [QuestDB](https://questdb.io/)?
[QuestDB](https://questdb.io/) is the new kid on the block of time series optimised databases and claims to be the fastest open source time series database currently available.
QuestDB offers high throughput ingestion and real-time SQL queries for applications in a wide range of use cases. It has a tiny memory footprint and combines the best of different worlds by supporting record entry via the fast and simple InfluxDB Line protocol, while offering great compatibility for common SQL queries (PostgresSQL).
If you want to learn more about the possibilities of QuestDB, have a look at the [documentation](https://questdb.io/docs/) or this great [Youtube video by Code to the Moon](https://www.youtube.com/watch?v=A8uMF64rbS8).
QSS itself is not a replacement for the recorder component integrated in Home Assistant, but merely offers an alternative for long-term data storage.
## Installation
### Precondition
- Make sure that your QuestDB instance is up and running.
- Possible installation methods for QuestDB can be found in the ['Get started' section of the documentation](https://questdb.io/docs/#get-started).
- Apart from that, you do not need to take any further precautions at present. QSS automatically creates a table named `qss` in which it stores the data.
### Installation of the QSS component:
Manual:
- Copy the `qss` folder in the `custom_components` folder of this repository into the `custom_components` folder of your Home Assistant installation.
Automatic:
- Add this repository as a custom repository to your [HACS](https://hacs.xyz/) installation. You can then install QSS via HACS. Full HACS compatibility and inclusion in the official HACS repo collection is planned for the future.
configuration.yaml
- Add an entry to your Home Assistant `configuration.yaml` that might look like this::
```yaml
qss:
host: "192.168.178.3"
port: 9009
authentication:
kid: "your_kid"
d_key: "your_d_key"
x_key: "your_x_key"
y_key: "your_y_key"
include:
domains:
- "sensor"
entities:
- "person.john_doe"
```
Note: Authenication details are completely optional. How to create them can be found in the Quest DB documentation at this point:
https://questdb.io/docs/reference/api/ilp/authenticate
## Configuration
```yaml
qss:
(map)(Required)
Enables the qss integration. Only allowed once.
host:
(string)(Required)
The URL or IP Address that points to your QuestDB database.
port:
(int)(Required)
The port to the InfluxDB line protocol of your QuestDB installation. This is normally 9009 by default.
authentication:
(dict)(Optional)
Under this entry you can, if desired, enter the authenication parameters necessary for your Quest DB installation. The entry is completely optional if your Quest DB installation does not have any additional authentication settings.
kid:
(string)(Required)
Your authentication kid.
d_key: "your_d_key"
(string)(Required)
Your authentication D Key.
x_key: "your_x_key"
(string)(Required)
Your authentication X Key.
y_key: "your_y_key"
(string)(Required)
Your authentication Y Key.
exclude:
(map)(Optional)
Configure which integrations should be excluded from recordings.
domains:
(List[str])(Optional)
The list of domains to be excluded from recordings.
entities:
(List[str])(Optional)
The list of entity ids to be excluded from recordings.
entity_globs:
(List[str])(Optional)
Exclude all entities matching a listed pattern from recordings (e.g., `sensor.weather_*`).
include:
(map)(Optional)
Configure which integrations should be included in recordings. If set, all other entities will not be recorded.
domains:
(List[str])(Optional)
The list of domains to be included in the recordings.
entities:
(List[str])(Optional)
The list of entity ids to be included in the recordings.
entity_globs:
(List[str])(Optional)
Include all entities matching a listed pattern from recordings (e.g., `sensor.weather_*`).
```
## Details
The data is stored in a QuestDB table named `qss`, which has the following structure:
| Column name: | entity_id | state | attributes | timestamps |
| :----------- | :-------: | :----: | :--------: | :--------: |
| Type: | symbol | string | string | timestamps |
## Credits
- First of all, thanks to all the contributors to the great [QuestDB project](https://github.com/questdb/questdb). Without their work, this custom component would never have been created.
- QSS was largely inspired by and based on [LTSS (Long Time State Storage)](https://github.com/freol35241/ltss) by [freol35241](https://github.com/freol35241). Many thanks to [freol35241](https://github.com/freol35241) for his great work!
## Disclaimer
- QSS is not an official extension of the [QuestDB project](https://github.com/questdb/questdb) and is not directly related to it.
- No liability is accepted for any loss of data that may occur through the use of QSS. Use at your own risk!
没有合适的资源?快使用搜索试试~ 我知道了~
QuestDB 状态存储 (QSS) 家庭助理自定义组件,用于在 QuestDB 中存储实体状态
共24个文件
yml:9个
md:5个
py:4个
需积分: 5 0 下载量 19 浏览量
2024-09-04
14:59:44
上传
评论
收藏 73KB ZIP 举报
温馨提示
适用于 Home Assistant 的 QuestDB 状态存储 (QSS) 自定义组件 QSS 可以通过 InfluxDB 线路协议简单有效地将 Home Assistant 实体的状态信息传输到 QuestDB 中进行长期存储和后续分析。 什么是QuestDB? QuestDB是时间序列优化数据库领域的新手,号称是目前最快的开源时间序列数据库。QuestDB 为各种用例中的应用程序提供高吞吐量提取和实时 SQL 查询。它占用的内存很小,通过快速简单的 InfluxDB Line 协议支持记录输入,结合了不同领域的优点,同时为常见 SQL 查询(PostgresSQL)提供了出色的兼容性。 QSS 本身并不是 Home Assistant 中集成的记录器组件的替代品,而只是提供了长期数据存储的替代方案。
资源推荐
资源详情
资源评论
收起资源包目录
qss-main.zip (24个子文件)
qss-main
SECURITY.md 1KB
custom_components
qss
__init__.py 5KB
manifest.json 336B
event_handling.py 879B
const.py 635B
io.py 2KB
.github
dependabot.yml 691B
ISSUE_TEMPLATE
feature_request.md 626B
bug_report.md 544B
enhancement.md 628B
release-drafter.yml 1KB
labels.yml 2KB
workflows
draft-release-note.yml 321B
check-versions.yml 1KB
release.yml 1KB
validate.yml 583B
run-pre-commit.yml 776B
manage-labels.yml 431B
LICENSE 1KB
poetry.lock 184KB
.pre-commit-config.yaml 3KB
pyproject.toml 1KB
hacs.json 179B
README.md 5KB
共 24 条
- 1
资源评论
余十步
- 粉丝: 1679
- 资源: 172
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功