Build Status:
HueControlWebAssemblyExample is a web service that allows a user to control Philips Hue lights by providing a SignalR Hub to which a client connects in order to receive cues to change Hue Lights.
The application is a basic POC with much of the logic and state hardcoded. While it works over the internet without any firewall or network configuration, it does requires that the house with the Hue lights be running the this WPF/Console Application
- Uses WebAssembly & Blazor Server and is cross-platform linux-windows-docker.
- Currently limited to 2 Cue buttons.
- Contains basic SignalR chathub for testing- clients can send and receive chat messages from the server and vice-versa. The chat function is useful for testing and logging, as the buttons are hard-coded to send as user "LD" (Lighting Designer) when pressing the Cue01 or Cue 02 buttons.
- HueControlWebAssemblyExample uses the basic dotnetcore blazor template, and adds one NuGet package
Microsoft.AspNetCore.SignalR.Client
in addition to the boilerplate packages that are bundled with the template. - The application has been tested as an Azure App Service new users get $200 or so of free credit. However, the application can be run in Kestral, IIS, Docker, etc. These configurations (except for local Kestral on the same network (standard class C LAN) during development) have not been tested, however.
- Once the service is running, copy the URL given to you by Azure (or, if you setup locally, the address from IIS or Kestral, making sure you set up a 1:1 NAT in your firewall and that you have a public IP, and copy-paste that to the WPF/Console Application
- Use VS2019 & and the dotnetcore 3.1 hosting bundle
- Open the solution in VS2019 and select
HueControlWebAssemblyExample.Server
as the startup project. The combobox for running it should default to "Kestral", but it can run in IIS Express if desired. The advantage of Kestral, among others, is that the hosting port remains the same (5000), while IIS Express picks a random port each time you debug the solution. - Refer to the readme of the client app to connect the client to the server WPF/Console Application
- The simplest way is to generate a new publishing profile with your Microsoft account and create an Azure App Service
- First, Restore/Update all NuGet packages. Use the GUI for this,
Project -> Manage NuGet Packages -> Install/Restore
- Now create your publish profile: Click
Build
and select publishHueControlWebAssemblyExample.Server
- Pick the service of your choice
- If Azure, further pick the type of service note:
only tested on Azure App Service (Windows)
Copy and paste URL for use in the WPF/Console Application