Name | diagralhomekit JSON |
Version |
0.9.13
JSON |
| download |
home_page | None |
Summary | Apple HomeKit integration for Diagral alarm systems |
upload_time | 2024-06-01 09:20:31 |
maintainer | None |
docs_url | None |
author | d9pouces |
requires_python | <4.0,>=3.9 |
license | CECILL-B |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
DiagralHomekit
==============
[](https://badge.fury.io/py/diagralhomekit)
Allow to control your Diagral alarm systems through Apple Homekit.
First, you need to create a configuration file `~/.diagralhomekit/config.ini` with connection details for all Diagral systems.
```ini
[diagral:Home]
name=[an explicit name for this system]
login=[email address of the Diagral account]
password=[password for the Diagral account]
imap_login=[IMAP login for the email address receiving alarm alerts]
imap_password=[IMAP password]
imap_hostname=[IMAP server]
imap_port=[IMAP port]
imap_use_tls=[true/1/on if you use SSL for the IMAP connection]
master_code=[a Diagral master code, able to arm or disarm the alarm]
system_id=[system id — see below]
transmitter_id=[transmitter id — see below]
central_id=[central id — see below]
```
`system_id`, `transmitter_id` and `central_id` can be retrieved with the following command, that prepares a configuration file:
```bash
python3 -m diagralhomekit --config-dir ~/.diagralhomekit --create-config 'diagral@account.com:password'
```
Then you can run the script:
```bash
python3 -m diagralhomekit --port 6666 --config-dir ~/.diagralhomekit -v 2
```
On the first launch, a QR code is displayed and can be scanned in Homekit, like any Homekit-compatible device.
You can send logs to [Loki](https://grafana.com/oss/loki/) with `--loki-url=https://username:password@my.loki.server/loki/api/v1/push`.
You can also send alerts to [Sentry](https://sentry.io/) with `--sentry-dsn=my_sentry_dsn`.
Everything can be configured by environment variables instead of arguments:
```bash
DIAGRAL_PORT=6666
DIAGRAL_CONFIG=/etc/diagralhomekit
DIAGRAL_SENTRY_DSN=https://sentry_dsn@sentry.io/42
DIAGRAL_LOKI_URL=https://username:password@my.loki.server/loki/api/v1/push
DIAGRAL_VERBOSITY=1
```
**As many sensitive data must be stored in this configuration file, so you should create a dedicated email address and Diagral account.**
Plex sensor
-----------
A presence can be detected when a specified Plex player is playing something:
```ini
[plex:appletv_web]
server_token=[authentication token]
server_url=[url of your Plex server]
player_name=[Displayed name for the player]
player_device=None,
player_product=[Product name of the targeted player]
player_title=[Title of the targeted player]
player_address=[IP address of the targeted player]
```
Only one of the last four properties is required to match with the targeted player.
To get actual property values, you can use `curl`:
```bash
curl -H Accept:application/json -H X-Plex-Token:[authentication token] [url of your Plex server]/status/sessions
```
HTTP monitoring
---------------
You can monitor some websites, as air purifier sensors (no Homekit sensor is available for HTTP monitoring…):
```ini
[internet:website]
url=[url to check]
name=[Displayed name]
```
Weather monitoring
------------------
You can monitor weather, and emulate a presence when it will rain in the next 10 minutes:
```ini
[meteofrance:paris]
name=Paris
latitude=48.866667
longitude=2.333333
country=FR
region=Île-de-France
```
UPS monitoring
--------------
UPS can also be monitoring, as soon as NUT is locally installed (standard UPS monitoring server on Linux.
```
[ups:home]
name=eaton650
```
Raw data
{
"_id": null,
"home_page": null,
"name": "diagralhomekit",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.9",
"maintainer_email": null,
"keywords": null,
"author": "d9pouces",
"author_email": "github@19pouces.net",
"download_url": "https://files.pythonhosted.org/packages/f7/15/58605be36840c6bee4e35a8cddd421fecba944adb587e662102c13eb622b/diagralhomekit-0.9.13.tar.gz",
"platform": null,
"description": "DiagralHomekit\n==============\n\n[](https://badge.fury.io/py/diagralhomekit)\n\nAllow to control your Diagral alarm systems through Apple Homekit.\n\n\nFirst, you need to create a configuration file `~/.diagralhomekit/config.ini` with connection details for all Diagral systems.\n\n```ini\n[diagral:Home]\nname=[an explicit name for this system]\nlogin=[email address of the Diagral account]\npassword=[password for the Diagral account]\nimap_login=[IMAP login for the email address receiving alarm alerts]\nimap_password=[IMAP password]\nimap_hostname=[IMAP server]\nimap_port=[IMAP port]\nimap_use_tls=[true/1/on if you use SSL for the IMAP connection]\nmaster_code=[a Diagral master code, able to arm or disarm the alarm]\nsystem_id=[system id \u2014 see below]\ntransmitter_id=[transmitter id \u2014 see below]\ncentral_id=[central id \u2014 see below]\n\n```\n`system_id`, `transmitter_id` and `central_id` can be retrieved with the following command, that prepares a configuration file:\n\n```bash\npython3 -m diagralhomekit --config-dir ~/.diagralhomekit --create-config 'diagral@account.com:password'\n```\n\nThen you can run the script:\n\n```bash\npython3 -m diagralhomekit --port 6666 --config-dir ~/.diagralhomekit -v 2\n```\nOn the first launch, a QR code is displayed and can be scanned in Homekit, like any Homekit-compatible device.\n\n\nYou can send logs to [Loki](https://grafana.com/oss/loki/) with `--loki-url=https://username:password@my.loki.server/loki/api/v1/push`.\nYou can also send alerts to [Sentry](https://sentry.io/) with `--sentry-dsn=my_sentry_dsn`.\n\nEverything can be configured by environment variables instead of arguments:\n\n```bash\nDIAGRAL_PORT=6666\nDIAGRAL_CONFIG=/etc/diagralhomekit\nDIAGRAL_SENTRY_DSN=https://sentry_dsn@sentry.io/42\nDIAGRAL_LOKI_URL=https://username:password@my.loki.server/loki/api/v1/push\nDIAGRAL_VERBOSITY=1\n```\n\n\n**As many sensitive data must be stored in this configuration file, so you should create a dedicated email address and Diagral account.**\n\n\nPlex sensor\n-----------\n\nA presence can be detected when a specified Plex player is playing something:\n```ini\n[plex:appletv_web]\nserver_token=[authentication token]\nserver_url=[url of your Plex server]\nplayer_name=[Displayed name for the player]\nplayer_device=None,\nplayer_product=[Product name of the targeted player]\nplayer_title=[Title of the targeted player]\nplayer_address=[IP address of the targeted player]\n```\nOnly one of the last four properties is required to match with the targeted player.\nTo get actual property values, you can use `curl`:\n\n```bash\ncurl -H Accept:application/json -H X-Plex-Token:[authentication token] [url of your Plex server]/status/sessions\n```\n\nHTTP monitoring\n---------------\n\nYou can monitor some websites, as air purifier sensors (no Homekit sensor is available for HTTP monitoring\u2026):\n```ini\n[internet:website]\nurl=[url to check]\nname=[Displayed name]\n```\n\nWeather monitoring\n------------------\n\nYou can monitor weather, and emulate a presence when it will rain in the next 10 minutes:\n\n```ini\n[meteofrance:paris]\nname=Paris\nlatitude=48.866667\nlongitude=2.333333\ncountry=FR\nregion=\u00cele-de-France\n```\n\nUPS monitoring\n--------------\n\nUPS can also be monitoring, as soon as NUT is locally installed (standard UPS monitoring server on Linux.\n```\n[ups:home]\nname=eaton650\n```\n\n",
"bugtrack_url": null,
"license": "CECILL-B",
"summary": "Apple HomeKit integration for Diagral alarm systems",
"version": "0.9.13",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "73b433051498ebd29d00bb143894a7176650ba2893fa2a03cf981c538f92df9c",
"md5": "10a4c9b36d571af651fae519d2caeeb8",
"sha256": "15a4a268dbd23afaa67b49c53de0b9da039439c3b34f37472c51e1a37b0b939d"
},
"downloads": -1,
"filename": "diagralhomekit-0.9.13-py3-none-any.whl",
"has_sig": false,
"md5_digest": "10a4c9b36d571af651fae519d2caeeb8",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.9",
"size": 33049,
"upload_time": "2024-06-01T09:20:29",
"upload_time_iso_8601": "2024-06-01T09:20:29.656253Z",
"url": "https://files.pythonhosted.org/packages/73/b4/33051498ebd29d00bb143894a7176650ba2893fa2a03cf981c538f92df9c/diagralhomekit-0.9.13-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "f71558605be36840c6bee4e35a8cddd421fecba944adb587e662102c13eb622b",
"md5": "d59ea3b7ee97dca919d37ceb763ca240",
"sha256": "8f9203fb5cabda5f56c043ab34b653ff5d0343b45ece9421ef4db31e91a13b80"
},
"downloads": -1,
"filename": "diagralhomekit-0.9.13.tar.gz",
"has_sig": false,
"md5_digest": "d59ea3b7ee97dca919d37ceb763ca240",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.9",
"size": 25433,
"upload_time": "2024-06-01T09:20:31",
"upload_time_iso_8601": "2024-06-01T09:20:31.747725Z",
"url": "https://files.pythonhosted.org/packages/f7/15/58605be36840c6bee4e35a8cddd421fecba944adb587e662102c13eb622b/diagralhomekit-0.9.13.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-06-01 09:20:31",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "diagralhomekit"
}