Theodicean.UnfoldedCircle.Server 0.0.1-pre27

This is a prerelease version of Theodicean.UnfoldedCircle.Server.
There is a newer version of this package available.
See the version list below for details.
dotnet add package Theodicean.UnfoldedCircle.Server --version 0.0.1-pre27
                    
NuGet\Install-Package Theodicean.UnfoldedCircle.Server -Version 0.0.1-pre27
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Theodicean.UnfoldedCircle.Server" Version="0.0.1-pre27" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Theodicean.UnfoldedCircle.Server" Version="0.0.1-pre27" />
                    
Directory.Packages.props
<PackageReference Include="Theodicean.UnfoldedCircle.Server" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Theodicean.UnfoldedCircle.Server --version 0.0.1-pre27
                    
#r "nuget: Theodicean.UnfoldedCircle.Server, 0.0.1-pre27"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Theodicean.UnfoldedCircle.Server@0.0.1-pre27
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Theodicean.UnfoldedCircle.Server&version=0.0.1-pre27&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Theodicean.UnfoldedCircle.Server&version=0.0.1-pre27&prerelease
                    
Install as a Cake Tool

Theodicean.UnfoldedCircle

Release CI Sonar Quality Gate Qodana Version

ASP.NET SDK for hosting integration drivers for the Unfolded Circle Remotes.

Features

  • mDNS broadcasting for discovery on remotes
  • Configuration handling
  • Event broadcasting
  • Multiple entities in the same instance
  • Media Player and Remote entity support
  • Strongly typed models
  • NativeAOT and trimming friendly
  • Can be used for installation on the remote or on a server

Limitations

  • Only supports Media Player and Remote entities (I do not have any other devices to test with)

Requirements

  • dotnet 9 SDK

Install

  • Package (project using the generator):
    • Add a PackageReference to Theodicean.UnfoldedCircle.Server

    • Example csproj snippet:

      <ItemGroup>
        <PackageReference Include="Theodicean.UnfoldedCircle.Server" Version="x.y.z" />
      </ItemGroup>
      

Usage

Start by adding a driver.json file in the root of your server project. See here for documentation on the file format. You must make sure that the file is copied as part of the publishing process.

The integration requires that you implement a few abstract classes and register them in your Program.cs:

  • UnfoldedCircle.Server.Configuration.ConfigurationService<TConfigurationItem> - Handles configuration for the integration.
  • UnfoldedCircle.Server.WebSocket.UnfoldedCircleWebSocketHandler<TMediaPlayerCommandId, TConfigurationItem> - Handles requests and events from and to the remotes.

Implement the abstract methods to work with your entities and configuration. You can use unfoldedcircle-oppo as a reference implementation.

In your Program.cs, you can register the services like this:

builder.AddUnfoldedCircleServer<CustomWebSocketHandler, CustomConfigurationService, CustomConfigurationItem>();

...
app.UseUnfoldedCircleServer<CustomWebSocketHandler, CustomConfigurationItem>();

// Or if you want to use custom media player command ids (where CustomCommandId is an enum and must have the members defined in `MediaPlayerCommandId`):
builder.AddUnfoldedCircleServer<CustomWebSocketHandler, CustomCommandId, CustomConfigurationService, CustomConfigurationItem>();

...
app.UseUnfoldedCircleServer<CustomWebSocketHandler, CustomCommandId, CustomConfigurationItem>();

Customization

You can customize some of the behaviour of the integration by using the configureOptions overload when registering via AddUnfoldedCircleServer.

builder.AddUnfoldedCircleServer<CustomWebSocketHandler, CustomConfigurationService, CustomConfigurationItem>(options =>
{
    // Disable the prefixes for identifiers (e.g. "REMOTE:"). This is useful if you already have an integration driver and want to start using this SDK.
    DisableEntityIdPrefixing = true,

    // Override the default port (UC_INTEGRATION_HTTP_PORT environment variable takes precedence)
    ListeningPort = 4242,

    // Allows you to override the deserializer used for different message events.
    MessageEventDeserializeOverrides = new Dictionary<MessageEvent, JsonTypeInfo>
    {
        [MessageEvent.Connect] = CustomJsonSerializerContext.Default.ConnectEvent
    }
}

Note

If you're publishing with NativeAOT, you must add the following to your server's .csproj file to ensure the appsettings.json and driver.json are included in the output:

<PropertyGroup>
    <IncludeAllContentForSelfExtract>true</IncludeAllContentForSelfExtract>
    <ExcludeFromSingleFile>appsettings.json</ExcludeFromSingleFile>
    <ExcludeFromSingleFile>driver.json</ExcludeFromSingleFile>
</PropertyGroup>
Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.0.1 207 9/5/2025
0.0.1-pre9 109 8/17/2025
0.0.1-pre8 118 8/16/2025
0.0.1-pre7 129 8/15/2025
0.0.1-pre6 163 8/15/2025
0.0.1-pre5 139 8/14/2025
0.0.1-pre4 132 8/14/2025
0.0.1-pre37 158 9/4/2025
0.0.1-pre36 156 9/4/2025
0.0.1-pre35 242 8/31/2025
0.0.1-pre34 198 8/27/2025
0.0.1-pre33 180 8/27/2025
0.0.1-pre32 172 8/27/2025
0.0.1-pre31 177 8/27/2025
0.0.1-pre30 214 8/26/2025
0.0.1-pre3 131 8/14/2025
0.0.1-pre29 221 8/24/2025
0.0.1-pre28 192 8/24/2025
0.0.1-pre27 168 8/24/2025
0.0.1-pre26 150 8/24/2025
0.0.1-pre25 146 8/24/2025
0.0.1-pre24 68 8/23/2025
0.0.1-pre23 53 8/23/2025
0.0.1-pre22 52 8/23/2025
0.0.1-pre21 148 8/21/2025
0.0.1-pre20 128 8/20/2025
0.0.1-pre2 132 8/14/2025
0.0.1-pre19 119 8/20/2025
0.0.1-pre18 165 8/18/2025
0.0.1-pre17 144 8/18/2025
0.0.1-pre16 142 8/18/2025
0.0.1-pre15 148 8/18/2025
0.0.1-pre14 148 8/17/2025
0.0.1-pre13 120 8/17/2025
0.0.1-pre12 103 8/17/2025
0.0.1-pre11 109 8/17/2025
0.0.1-pre10 103 8/17/2025
0.0.1-pre1 184 8/13/2025