Skip to content

Commit 9c7562a

Browse files
jeroenterheerdtballoob
authored andcommitted
Update alarm_control_panel.egardia.markdown (home-assistant#3278)
* Update alarm_control_panel.egardia.markdown * Update alarm_control_panel.egardia.markdown * Update alarm_control_panel.egardia.markdown
1 parent 9db8df8 commit 9c7562a

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

source/_components/alarm_control_panel.egardia.markdown

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ You can change this, however, using the following procedure. This is a more adva
4343

4444
1. Log in into your alarm system's control panel. You will need to access http://[ip of your control panel]. You know this already since you need it in the basic configuration from above. Log in to the control panel with your Egardia/Woonveilig username and password.
4545
2. Once logged in, go to *System Settings*, *Report* and change the Server Address for your primary server to the IP or hostname of your Home Assistant machine. Also, update the port number 85 or to anything you like. The provided software that you will set up in the next steps runs on port 85 by default. **Make sure to change the settings of the primary server otherwise the messages will not come through. Note that this will limit (or fully stop) the number of alarm messages you will get through Egardia's / Woonveilig services.** Maybe, that is just what you want. Make sure to save your settings by selecting 'OK'.
46-
3. On your Home Assistant machine run `$ sudo python3 egardiaserver.py`. This will receive status codes from your alarm control panel and display them. You will need the codes to include in your configuration.yaml. Make sure to change the status of your alarm to all states (disarm, arm, armhome) as well as trigger the alarm in all ways possible to get 100% coverage. **Before triggering the alarm it might be good to disable the siren temporarily (can be done in Panel Settings).**
46+
3. On your Home Assistant machine run `$ sudo python3 egardiaserver.py`. Refer to the [python-egardia repository](https://github.com/jeroenterheerdt/python-egardia) for detailed documentation on parameters. This will receive status codes from your alarm control panel and display them. You will need the codes to include in your configuration.yaml. Make sure to change the status of your alarm to all states (disarm, arm, armhome) as well as trigger the alarm in all ways possible to get 100% coverage. **Before triggering the alarm it might be good to disable the siren temporarily (can be done in Panel Settings).**
4747
4. Once you have the codes, update your `configuration.yaml`:
4848
```yaml
4949
# Example configuration.yaml entry
@@ -62,9 +62,24 @@ alarm_control_panel:
6262
standby: XXXXXXXXXXXXXXXX
6363
```
6464
Note that you can have more than one code for triggered since every sensor generates its own code. arm, disarm, armhome and standby will all be one code.
65-
5. Start the `egardiaserver.py` script on boot of your Home Assistant machine, for example by adding the following to your `/etc/rc.local`:
65+
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:
6666
```bash
67-
python3 [path/to/]egardiaserver.py &
67+
source /srv/homeassistant/homeassistant_venv/bin/activate
68+
python3 /srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/pythonegardia/egardiaserver.py -host [YOURHOST] -password '[YOURPASSWORD]' -ssl True > /tmp/egardiaserver.log 2>&1
6869
```
69-
**Do not forget the trailing & here; otherwise you will be having a hard time logging back into the machine.**
70+
71+
Mark it as executable (`$ chmod +x`) and run `sudo nano /lib/systemd/system/egardiaserver.service`. Enter the following into the `egardiaserver.service` file:
72+
```bash
73+
[Unit]
74+
Description=Egardia Server Service
75+
76+
[Service]
77+
ExecStart=/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/pythonegardia/egardiaserver.sh
78+
StandardOutput=journal+console
79+
80+
[Install]
81+
WantedBy=multi-user.target
82+
Alias=egardiaserver.service
83+
```
84+
Save and then run `sudo systemctl enable egardiaserver.service` and `sudo systemctl start egardiaserver.service`.
7085
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.

0 commit comments

Comments
 (0)