Skip to content

Commit

Permalink
Updated libraries, introduces MQTT last will / connected state topic
Browse files Browse the repository at this point in the history
  • Loading branch information
i8beef committed Aug 18, 2018
1 parent f865150 commit 252a3c7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
<PackageReference Include="I8Beef.CodeAnalysis.RuleSet" Version="1.0.15">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="HomeAutio.Mqtt.Core" Version="3.0.0.39" />
<PackageReference Include="I8Beef.UniFi.Video" Version="1.1.0.3" />
<PackageReference Include="HomeAutio.Mqtt.Core" Version="3.0.0.41" />
<PackageReference Include="I8Beef.UniFi.Video" Version="1.1.0.5" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="2.1.1" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="2.1.1" />
<PackageReference Include="Serilog.Extensions.Logging" Version="2.0.2" />
Expand Down
4 changes: 2 additions & 2 deletions src/HomeAutio.Mqtt.UnifiVideo/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ private static IHostBuilder CreateHostBuilder(IConfiguration config)
.ConfigureServices((hostContext, services) =>
{
// Setup client
services.AddScoped<Client>(serviceProvider =>
services.AddScoped<IClient>(serviceProvider =>
{
return new Client(
config.GetValue<string>("unifi:unifiHost"),
Expand All @@ -97,7 +97,7 @@ private static IHostBuilder CreateHostBuilder(IConfiguration config)

return new UniFiVideoMqttService(
serviceProvider.GetRequiredService<ILogger<UniFiVideoMqttService>>(),
serviceProvider.GetRequiredService<Client>(),
serviceProvider.GetRequiredService<IClient>(),
config.GetValue<string>("unifi:unifiName"),
config.GetValue<int>("unifi:refreshInterval"),
brokerSettings);
Expand Down
4 changes: 2 additions & 2 deletions src/HomeAutio.Mqtt.UnifiVideo/UniFiVideoMqttService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class UniFiVideoMqttService : ServiceBase
{
private readonly ILogger<UniFiVideoMqttService> _log;

private readonly Client _client;
private readonly IClient _client;
private readonly string _nvrName;

private readonly IDictionary<string, string> _currentMotionStates = new Dictionary<string, string>();
Expand All @@ -41,7 +41,7 @@ public class UniFiVideoMqttService : ServiceBase
/// <param name="brokerSettings">MQTT broker settings.</param>
public UniFiVideoMqttService(
ILogger<UniFiVideoMqttService> logger,
Client nvrClient,
IClient nvrClient,
string nvrName,
int refreshInterval,
BrokerSettings brokerSettings)
Expand Down

0 comments on commit 252a3c7

Please sign in to comment.