Skip to content

Commit

Permalink
Replaced LightCommand with UpdateLight and Updated NuGet dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
michielpost committed Aug 6, 2023
1 parent 380b8c8 commit 4e4b918
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 19 deletions.
4 changes: 2 additions & 2 deletions HueLightDJ.Blazor.Controls/HueLightDJ.Blazor.Controls.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

<ItemGroup>
<PackageReference Include="Blazored.LocalStorage" Version="4.3.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="7.0.5" />
<PackageReference Include="MudBlazor" Version="6.2.2" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="7.0.9" />
<PackageReference Include="MudBlazor" Version="6.8.0" />
</ItemGroup>

<ItemGroup>
Expand Down
12 changes: 6 additions & 6 deletions HueLightDJ.BlazorWeb/Client/HueLightDJ.BlazorWeb.Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="7.0.5" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="7.0.9" />
<PackageReference Include="protobuf-net.Grpc" Version="1.1.1" />
<PackageReference Include="Grpc.Net.Client" Version="2.52.0" />
<PackageReference Include="Grpc.Net.Client.Web" Version="2.52.0" />
<PackageReference Include="System.ServiceModel.Primitives" Version="4.10.2" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.5" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="7.0.5" PrivateAssets="all" />
<PackageReference Include="Grpc.Net.Client" Version="2.55.0" />
<PackageReference Include="Grpc.Net.Client.Web" Version="2.55.0" />
<PackageReference Include="System.ServiceModel.Primitives" Version="6.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.9" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="7.0.9" PrivateAssets="all" />
<PackageReference Include="Microsoft.Extensions.Http" Version="7.0.0" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Grpc.AspNetCore" Version="2.52.0" />
<PackageReference Include="Grpc.AspNetCore.Web" Version="2.52.0" />
<PackageReference Include="Grpc.AspNetCore" Version="2.55.0" />
<PackageReference Include="Grpc.AspNetCore.Web" Version="2.55.0" />
<PackageReference Include="protobuf-net.Grpc.AspNetCore" Version="1.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="7.0.5" />
<PackageReference Include="HueApi" Version="1.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="7.0.9" />
<PackageReference Include="HueApi" Version="1.3.0" />
<PackageReference Include="HueApi.ColorConverters" Version="1.0.0" />
<PackageReference Include="HueApi.Entertainment" Version="1.4.0" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion HueLightDJ.Effects/HueLightDJ.Effects.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="HueApi" Version="1.0.0" />
<PackageReference Include="HueApi" Version="1.3.0" />
<PackageReference Include="HueApi.ColorConverters" Version="1.0.0" />
<PackageReference Include="HueApi.Entertainment" Version="1.4.0" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion HueLightDJ.Services/HueLightDJ.Services.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="HueApi" Version="1.0.0" />
<PackageReference Include="HueApi" Version="1.3.0" />
<PackageReference Include="HueApi.ColorConverters" Version="1.0.0" />
<PackageReference Include="HueApi.Entertainment" Version="1.4.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="7.0.0" />
Expand Down
5 changes: 2 additions & 3 deletions HueLightDJ.Services/Internal/StreamingSetup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,10 @@ public async Task AlertLight(MultiBridgeHuePosition light)
continue;

var client = new LocalHueApi(conn.Ip, conn.Key);
var allCommand = new LightCommand().TurnOn().SetColor(new RGBColor("0000FF")); //All blue
var allCommand = new UpdateLight().TurnOn().SetColor(new RGBColor("0000FF")); //All blue

var result = await client.GetEntertainmentConfigurationAsync(conn.GroupId.Value);

//Turn all lights in this entertainment group on
var entServices = result.Data.First().Locations.ServiceLocations.Select(x => x.Service?.Rid).ToList();
var allResources = await client.GetResourcesAsync();

Expand All @@ -171,7 +170,7 @@ public async Task AlertLight(MultiBridgeHuePosition light)
//Only selected light red
if (conn.Ip == light.Bridge)
{
var alertCommand = new LightCommand().TurnOn().SetColor(new RGBColor("FF0000")); ;
var alertCommand = new UpdateLight().TurnOn().SetColor(new RGBColor("FF0000")); ;
alertCommand.Alert = new UpdateAlert();

var device = allResources.Data.Where(x => x.Id == light.Id).Select(x => x.Owner?.Rid).FirstOrDefault();
Expand Down
4 changes: 2 additions & 2 deletions HueLightDJ.Web/HueLightDJ.Web.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

<ItemGroup>
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.18.1" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="7.0.6" />
<PackageReference Include="HueApi" Version="1.0.0" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="7.0.8" />
<PackageReference Include="HueApi" Version="1.3.0" />
<PackageReference Include="HueApi.ColorConverters" Version="1.0.0" />
<PackageReference Include="HueApi.Entertainment" Version="1.4.0" />
</ItemGroup>
Expand Down

0 comments on commit 4e4b918

Please sign in to comment.