From a4a74552c2b4f9158312862a56b21a675305c0bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20=C3=98strup?= <7877957+TechnicallyJoe@users.noreply.github.com> Date: Tue, 11 Feb 2020 11:51:59 +0100 Subject: [PATCH] Add recorder vars db_max_retries and db_retry_wait (#12023) * added documentation for recorder component Added db_max_retries and db_retry_wait variables to docs * added default values to vars and edited database setup section. * readded recorder details line i mistakenly removed * changed int to integer --- source/_integrations/recorder.markdown | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/source/_integrations/recorder.markdown b/source/_integrations/recorder.markdown index 793883fc4c6..f9cb8af4ec0 100644 --- a/source/_integrations/recorder.markdown +++ b/source/_integrations/recorder.markdown @@ -31,6 +31,16 @@ recorder: description: The URL that points to your database. required: false type: string + db_max_retries: + description: The max amount of times, the recorder retries to connect to the database. + required: false + default: 10 + type: integer + db_retry_wait: + description: The time in seconds, that the recorder sleeps when trying to connect to the database. + required: false + default: 3 + type: integer purge_keep_days: description: Specify the number of history days to keep in recorder database after a purge. required: false @@ -180,6 +190,7 @@ If you are using the default `FULL` recovery model for MS SQL Server you will ne ### Database startup If you are running a database server instance on the same server as Home Assistant then you must ensure that this service starts before Home Assistant. For a Linux instance running Systemd (Raspberry Pi, Debian, Ubuntu and others) then you should edit the service file. +To help facilitate this, db_max_retry and db_retry_wait variables have been added to ensure the recorder retries the connection to your database enough times, for your database to start up. ```bash sudo nano /etc/systemd/system/home-assistant@homeassistant.service