mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-16 22:06:50 +00:00
Updating documentation for Egardia component (#3566)
* Updating documentation for Egardia component Python3.4 --> Python3.5 and other textual enhancements. * Use 3.5 everywhere
This commit is contained in:
parent
544f90d5de
commit
35cdff0aef
@ -61,26 +61,30 @@ alarm_control_panel:
|
||||
triggered: XXXXXXXXXXXXXXXX, XXXXXXXXXXXXXXXX, XXXXXXXXXXXXXXXX
|
||||
ignore: XXXXXXXXXXXXXXXX
|
||||
```
|
||||
Note that for triggered, arm and disarm multiple codes can be entered since each sensor triggers with a different code and each user of the system has its own arm and disarm codes. Also note that your system will do regular system checks which will be reported as well. Since Home Assistant provides no way of handling them properly, you can enter those codes as ignore (again, multiple codes can be used here). The egardia component will ignore these codes and continue returning the old status if it receives any of the codes that are listed as ignore. This is useful for example when you have armed your alarm at night: normally a system check will occur at least once during the night and if that code is not specified anywhere Home Assistant will set the status of the alarm to its default, which is unarmed. This is in fact wrong. Listing the code as ignore changes this behavior and Home Assistant will continue to show the status the alarm is in (disarm, arm, armhome, triggered) even when system checks occur.
|
||||
|
||||
5. Start the `egardiaserver.py` script on boot of your Home Assistant machine, for example by using systemd. To use this method, create a shell script named `egardiaserver.sh` that contains the following:
|
||||
Note that for triggered, arm and disarm multiple codes can be entered since each sensor triggers with a different code and each user of the system has its own arm and disarm codes. Also note that your system will do regular system checks which will be reported as well. Since Home Assistant provides no way of handling them properly, you can enter those codes as ignore (again, multiple codes can be used here). The egardia component will ignore these codes and continue returning the old status if it receives any of the codes that are listed as ignore. This is useful for example when you have armed your alarm at night: normally a system check will occur at least once during the night and if that code is not specified anywhere Home Assistant will set the status of the alarm to its default, which is unarmed. This is in fact wrong. Listing the code as ignore changes this behavior and Home Assistant will continue to show the status the alarm is in (disarm, arm, armhome, triggered) even when system checks occur.
|
||||
|
||||
5. Start the `egardiaserver.py` script on boot of your Home Assistant machine, for example by using `systemctl` by `systemd`. To use this method, create a shell script named `egardiaserver.sh` that contains something like the following:
|
||||
|
||||
```bash
|
||||
source /srv/homeassistant/homeassistant_venv/bin/activate
|
||||
python3 /srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/pythonegardia/egardiaserver.py -host [YOURHOST] -password '[YOURPASSWORD]' -ssl True > /tmp/egardiaserver.log 2>&1
|
||||
$ source /srv/homeassistant/bin/activate
|
||||
$ python3 /srv/homeassistant/lib/python3.5/site-packages/pythonegardia/egardiaserver.py -host [YOURHOST] -password '[YOURPASSWORD]' -ssl True > /tmp/egardiaserver.log 2>&1
|
||||
```
|
||||
|
||||
Mark it as executable (`$ chmod +x`) and run `sudo nano /lib/systemd/system/egardiaserver.service`. Enter the following into the `egardiaserver.service` file:
|
||||
|
||||
```bash
|
||||
[Unit]
|
||||
Description=Egardia Server Service
|
||||
|
||||
[Service]
|
||||
ExecStart=/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/pythonegardia/egardiaserver.sh
|
||||
ExecStart=/bin/bash /srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/pythonegardia/egardiaserver.sh
|
||||
StandardOutput=journal+console
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Alias=egardiaserver.service
|
||||
```
|
||||
|
||||
Save and then run `sudo systemctl enable egardiaserver.service` and `sudo systemctl start egardiaserver.service`.
|
||||
6. Test your setup and enjoy. The component will update if the alarm status changes, including triggers. You can use this to build your own automations and send notifications as you wish.
|
||||
|
Loading…
x
Reference in New Issue
Block a user