Skip to main content

Authentication provider using Synology DSM users for Home Assistant

PyPI GitHub branch checks state Codecov Maintenance GitHub

The Synology authentication provider lets you authenticate using the users in your Synology DSM. Anyone with a user account on your Synology NAS will be able to login.

The provider supports 2-factor authentication, according to what is configured in DSM. When logging in, there will be a field to enter the 2FA code. The field is optional, but it should be used if your account in DSM requires 2FA. Otherwise, it can be left empty.

The use of 2FA within this provider is independent of the 2FA configuration in Home Assistant. If you enable 2FA in Home Assistant, and it is also enabled in Synology, you will have to enter 2 2FA codes.

The provider requires DSM 7.0 or newer.

Installation

Home Assistant Container

Use this package's container instead of the Home Assistant one.

ghcr.io/sdebruyn/hass-auth-synology:latest

Home Assistant Core

The installation will have to be redone everytime you update Home Assistant.

  1. Make sure the Home Assistant virtualenv is activated: source bin/activate
  2. Install this package: pip3 install hass-auth-synology
  3. Run the installation command: hass-auth-synology install

Home Assistant Supervised

The installation will have to be redone everytime you update Home Assistant.

  1. Search for the “SSH & Web Terminal” add-on in the add-on store and install it.
  2. Configure the username and password/authorized_keys options.
  3. Start the “SSH & Web Terminal” add-on
  4. Run the following code through the web terminal:
    pip3 install hass-auth-synology
    hass-auth-synology install
    
  5. You can now disable and remove the “SSH & Web Terminal” add-on again.

Configuration

Add the following to your Home Assistant configuration:

homeassistant:
  auth_providers:
    - type: synology
      host: nas.local
      port: 443
      secure: true
      verify_cert: true
  • host: IP address or hostname of your NAS.
  • port: Port on which DSM is available. Make sure to use one corresponding to HTTP or HTTPS as configured with secure .
  • secure (optional): Enable this to use HTTPS instead of HTTP. (default: false)
  • verify_cert (optional): Enable this to verify the certificate when using HTTPS (default: false). Make sure to disable this when using self-signed certificates or an IP address instead of a hostname. The setting is ignored when secure is false.

Troubleshooting

If any errors occur, make sure to check your Home Assistant logs. If the connection succeeds, but authentication fails, Synology DSM will output an error code. The meaning of the error code can be found in the Synology DSM Login API documentation.

Feel free to open an issue on GitHub if you encounter any issues.

License & attribution

Apache v2.0

Test utilities under tests are coming from Home Assistant Core.

Metadata

Release files for hass-auth-synology 0.4.28

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hass-auth-synology 0.4.28
File Size Uploaded
hass-auth-synology-0.4.28.tar.gz 9.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for hass-auth-synology 0.4.28
File Interpreter ABI Platform
hass_auth_synology-0.4.28-py3-none-any.whl Python 3 none any Details

Total release size: 20.1 kB

Release files / hass-auth-synology-0.4.28.tar.gz

Download URL hass-auth-synology-0.4.28.tar.gz
Size 9.6 kB
Tags Source
SHA-256 checksum
How to use checksums
ec61696fac4443753ce6f92da29a4423793daf00c7059d6724c83051e306e38d
BLAKE2b-256 checksum
How to use checksums
15652dffdaae2a0f180ae96e2478aa7c7275cf903759b6f0a21ee57d6833721e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.14 CPython/3.9.13 Linux/5.15.0-1014-azure

Release files / hass_auth_synology-0.4.28-py3-none-any.whl

Download URL hass_auth_synology-0.4.28-py3-none-any.whl
Size 10.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
62d8ca32a38a8196608569413bde71db590c6d91dd9aa6c01e8755f852574b02
BLAKE2b-256 checksum
How to use checksums
c3c70b810b599e36c289eb05a853c690988068365729df2cf382bba1abe50312
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.14 CPython/3.9.13 Linux/5.15.0-1014-azure

Release history Release notifications | RSS feed

This release

0.4.28 This release

2 release files

0.4.27

2 release files

0.4.26

2 release files

0.4.22

2 release files

0.4.21

2 release files

0.4.20

2 release files

0.4.18

2 release files

0.4.17

2 release files

0.4.15

2 release files

0.4.14

2 release files

0.4.12

2 release files

0.4.11

2 release files

0.4.9

2 release files

0.4.8

2 release files

0.4.7

2 release files

0.4.6

2 release files

0.4.5

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.19

2 release files

0.3.18

1 release file

0.3.17

1 release file

0.3.0

2 release files

0.2.0

2 release files

0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page