Skip to content

Commit

Permalink
Add SynoAIUrl to configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
scottrhoyt committed Sep 29, 2022
1 parent a1da6ff commit d1eb235
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ An example appsettings.json configuration file can be found [here](#example-apps
* User [required]: The user that will be used to request API snapshots
* Password [required]: The password of the user above
* AllowInsecureUrl [optional] (Default ```false```): Whether to allow an insecure HTTPS connection to the Synology API
* SynoAIUrl [optional]: The URL that SynoAI is reachable at. E.g. Used to provide URLs to captures in some notifications.
* Cameras [required]: An array of camera objects - see [Camera Config](#camera-config)
* Notifiers [required]: See [notifications](#notifications)
* Quality [optional] (Default: ```Balanced```): The quality, aka "profile type" to use when taking a snapshot. This will be based upon the settings of the streams you have configured in Surveillance Station. i.e. if your low, balanced and high streams have the same settings in Surveillance Station, then this setting will make no difference. But if you have a high quality 4k stream, a balance 1080p stream and a low 720p stream, then setting to high will return and process a 4k image. Note that the higher quality the snapshot, the longer the notification will take. Additionally, the larger the image, the smaller your detected objects may be, so ensure you set the MinSizeX/MinSizeY values respectively.
Expand Down
7 changes: 7 additions & 0 deletions SynoAI/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,11 @@ public static class Config
/// </summary>
public static IEnumerable<INotifier> Notifiers { get; private set; }

/// <summary>
/// The URL to use for the SynoAI web frontend.
/// </summary>
public static string SynoAIUrL { get; private set; }

/// <summary>
/// Generates the configuration from the provided IConfiguration.
/// </summary>
Expand Down Expand Up @@ -228,6 +233,8 @@ public static void Generate(ILogger logger, IConfiguration configuration)
AIUrl = aiSection.GetValue<string>("Url");
AIPath = aiSection.GetValue<string>("Path","v1/vision/detection");

SynoAIUrL = configuration.GetValue<string>("SynoAIUrl");

Cameras = GenerateCameras(logger, configuration);
Notifiers = GenerateNotifiers(logger, configuration);
}
Expand Down

0 comments on commit d1eb235

Please sign in to comment.