mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-03-17 10:18:18 +01:00
feat(immich_frame): add multi-account support via Accounts list option
- Add Accounts list schema to config.yaml for multi-account support - Make ApiKey and ImmichServerUrl optional when using Accounts list - Generate Settings.yaml from addon options in 99-run.sh - Fix /app/Config symlink direction for proper config persistence - Set IMMICHFRAME_CONFIG_PATH for reliable config discovery - Update README with multi-account documentation and examples - Bump version to 1.0.32.0-2 Co-authored-by: alexbelgium <44178713+alexbelgium@users.noreply.github.com>
This commit is contained in:
@@ -1,4 +1,9 @@
|
||||
|
||||
## 1.0.32.0-2 (2026-03-16)
|
||||
- Added multi-account support: configure multiple Immich accounts via the `Accounts` option in the addon configuration
|
||||
- `ApiKey` and `ImmichServerUrl` are now optional when using the `Accounts` list
|
||||
- Settings.yaml is now auto-generated from addon options for reliable multi-account configuration
|
||||
|
||||
## 1.0.32.0 (2026-03-07)
|
||||
- Update to latest version from immichFrame/ImmichFrame (changelog : https://github.com/immichFrame/ImmichFrame/releases)
|
||||
|
||||
|
||||
@@ -41,11 +41,12 @@ Webui can be found at `<your-ip>:8171`.
|
||||
|
||||
| Option | Type | Default | Description |
|
||||
|--------|------|---------|-------------|
|
||||
| `ImmichServerUrl` | str | **Required** | URL of your Immich server (e.g., `http://homeassistant:3001`) |
|
||||
| `ApiKey` | str | **Required** | Immich API key for authentication |
|
||||
| `ImmichServerUrl` | str | | URL of your Immich server (e.g., `http://homeassistant:3001`). Used for single-account setup. |
|
||||
| `ApiKey` | str | | Immich API key for authentication. Used for single-account setup. |
|
||||
| `Accounts` | list | `[]` | List of Immich accounts for multi-account support. Each entry requires `ImmichServerUrl` and `ApiKey`. |
|
||||
| `TZ` | str | | Timezone (e.g., `Europe/London`) |
|
||||
|
||||
### Example Configuration
|
||||
### Single Account Example
|
||||
|
||||
```yaml
|
||||
ImmichServerUrl: "http://homeassistant:3001"
|
||||
@@ -53,6 +54,23 @@ ApiKey: "your-immich-api-key-here"
|
||||
TZ: "Europe/London"
|
||||
```
|
||||
|
||||
### Multi-Account Example
|
||||
|
||||
To display photos from multiple Immich accounts (e.g., you and your partner), use the `Accounts` list:
|
||||
|
||||
```yaml
|
||||
Accounts:
|
||||
- ImmichServerUrl: "http://homeassistant:3001"
|
||||
ApiKey: "api-key-for-user-1"
|
||||
- ImmichServerUrl: "http://homeassistant:3001"
|
||||
ApiKey: "api-key-for-user-2"
|
||||
TZ: "Europe/London"
|
||||
```
|
||||
|
||||
When using the `Accounts` list, the `ApiKey` and `ImmichServerUrl` top-level options are not needed. Images will be drawn from each account proportionally based on the total number of images present in each account.
|
||||
|
||||
For more configuration options, see the [ImmichFrame documentation](https://immichframe.dev/docs/getting-started/configuration).
|
||||
|
||||
### Getting Your Immich API Key
|
||||
|
||||
1. Open your Immich web interface
|
||||
|
||||
@@ -9,19 +9,23 @@ map:
|
||||
- addon_config:rw
|
||||
name: Immich Frame
|
||||
options:
|
||||
Accounts: []
|
||||
env_vars: []
|
||||
ports:
|
||||
8080/tcp: 8171
|
||||
ports_description:
|
||||
8080/tcp: Web UI port
|
||||
schema:
|
||||
Accounts:
|
||||
- ImmichServerUrl: str
|
||||
ApiKey: str
|
||||
env_vars:
|
||||
- name: match(^[A-Za-z0-9_]+$)
|
||||
value: str?
|
||||
ApiKey: str
|
||||
ImmichServerUrl: str
|
||||
ApiKey: str?
|
||||
ImmichServerUrl: str?
|
||||
TZ: str?
|
||||
slug: immich_frame
|
||||
url: https://github.com/alexbelgium/hassio-addons
|
||||
version: "1.0.32.0"
|
||||
version: "1.0.32.0-2"
|
||||
webui: http://[HOST]:[PORT:8080]
|
||||
|
||||
@@ -3,9 +3,45 @@
|
||||
bashio::log.info "Starting Immich Frame"
|
||||
|
||||
mkdir -p /config/Config
|
||||
if [ -f /app/Config ]; then
|
||||
rm -r /app/Config
|
||||
if [ -d /app/Config ] && [ ! -L /app/Config ]; then
|
||||
cp -n /app/Config/* /config/Config/ 2>/dev/null || true
|
||||
rm -rf /app/Config
|
||||
fi
|
||||
if [ ! -e /app/Config ]; then
|
||||
ln -sf /config/Config /app/Config
|
||||
fi
|
||||
ln -sf /app/Config /config/Config
|
||||
|
||||
# Generate Settings.yaml from addon options for multi-account support
|
||||
SETTINGS_FILE="/config/Config/Settings.yaml"
|
||||
ACCOUNT_COUNT=$(jq '.Accounts | length' /data/options.json 2>/dev/null || echo 0)
|
||||
|
||||
if [ "$ACCOUNT_COUNT" -gt 0 ]; then
|
||||
bashio::log.info "Configuring ${ACCOUNT_COUNT} account(s) from Accounts list"
|
||||
{
|
||||
echo "Accounts:"
|
||||
for i in $(seq 0 $((ACCOUNT_COUNT - 1))); do
|
||||
SERVER_URL=$(jq -r ".Accounts[${i}].ImmichServerUrl" /data/options.json)
|
||||
API_KEY=$(jq -r ".Accounts[${i}].ApiKey" /data/options.json)
|
||||
echo " - ImmichServerUrl: '${SERVER_URL}'"
|
||||
echo " ApiKey: '${API_KEY}'"
|
||||
bashio::log.info " Account $((i + 1)): ${SERVER_URL}"
|
||||
done
|
||||
} > "${SETTINGS_FILE}"
|
||||
bashio::log.info "Settings.yaml generated at ${SETTINGS_FILE}"
|
||||
elif bashio::config.has_value 'ApiKey' && bashio::config.has_value 'ImmichServerUrl'; then
|
||||
bashio::log.info "Using single account configuration"
|
||||
SERVER_URL=$(bashio::config 'ImmichServerUrl')
|
||||
API_KEY=$(bashio::config 'ApiKey')
|
||||
{
|
||||
echo "Accounts:"
|
||||
echo " - ImmichServerUrl: '${SERVER_URL}'"
|
||||
echo " ApiKey: '${API_KEY}'"
|
||||
} > "${SETTINGS_FILE}"
|
||||
bashio::log.info "Settings.yaml generated at ${SETTINGS_FILE}"
|
||||
else
|
||||
bashio::log.fatal "No accounts configured! Set either 'Accounts' list or both 'ApiKey' and 'ImmichServerUrl'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export IMMICHFRAME_CONFIG_PATH=/config/Config
|
||||
exec dotnet ImmichFrame.WebApi.dll
|
||||
|
||||
Reference in New Issue
Block a user