DEV Community

Screaminlean
Screaminlean

Posted on

How to Build a Native .NET 8/10 Integration for Rockwell's Fiix CMMS (Without the Headache)

If you’ve ever been tasked with syncing an internal ERP, an MES platform, or factory floor IoT sensors with Rockwell Automation’s Fiix CMMS, you already know the deal.

While Fiix provides a robust Java SDK, .NET developers are usually left out in the cold. You are forced to spin up custom implementations from scratch, wrestle with strict HMAC-SHA256 request signing, and manually map out dozens of nested RPC (Remote Procedure Call) payload schemas.

I spent the last few years navigating these exact pain points. After a lot of refactoring, I rebuilt a completely open-source, production-ready solution from the ground up to save the .NET community hundreds of hours of development time.

Meet FiixCmms.Client.Net—a native, multi-targeted framework engine for .NET 8 and .NET 10.


The Enterprise Pitfalls of Custom Fiix Integrations

When building a custom API bridge to Fiix, developers typically trip over three massive hurdles:

  1. Socket Exhaustion: Manually instantiating HttpClient for rapid-fire RPC updates to asset or work order tables quickly degrades application performance.
  2. Cryptographic Overhead: Missing or miscalculating the HMAC-SHA256 signature hash format in your HTTP headers results in immediate, vague authentication failures.
  3. Sandbox Bottlenecks: Waiting for corporate IT to clear a live sandbox environment can halt an active development sprint for weeks.

Here is how this library solves all three out of the box using modern .NET architecture.


Modern DX: The Clean Way to Connect

Instead of messy wrappers, the library acts as a first-class ecosystem citizen. It introduces native IServiceCollection extension methods backed by IHttpClientFactory to completely eliminate socket exhaustion.

Setting it up in your Program.cs takes exactly one block of code:

using FiixCmms.Client.Extensions;

var builder = WebApplication.CreateBuilder(args);

// Register the typed client lifecycle with automatic HMAC header signing
builder.Services.AddFiixClient(options =>
{
    options.BaseUrl = "[https://your-subdomain.fiixcmms.com/api/v2/](https://your-subdomain.fiixcmms.com/api/v2/)";
    options.AppKey = builder.Configuration["Fiix:AppKey"];
    options.AccessKey = builder.Configuration["Fiix:AccessKey"];
    options.SecretKey = builder.Configuration["Fiix:SecretKey"];
});
Enter fullscreen mode Exit fullscreen mode

Once registered, you can inject IFiixClient directly into your services or background workers. It comes packed with 103 strongly-typed DTOs mapped 1:1 with the underlying schema engine:

public class WorkOrderService
{
    private readonly IFiixClient _fiixClient;

    public WorkOrderService(IFiixClient fiixClient)
    {
        _fiixClient = fiixClient;
    }

    public async Task CompleteEmergencyWorkOrderAsync(int workOrderId)
    {
        // Fluent, strongly-typed async RPC pipelines
        var workOrder = await _fiixClient.WorkOrders.GetByIdAsync(workOrderId);

        workOrder.IntWorkOrderStatusID = 3; // Completed

        await _fiixClient.WorkOrders.UpdateAsync(workOrder);
    }
}
Enter fullscreen mode Exit fullscreen mode

Testing Offline: A Zero-Dependency Mock API

One of the features I am most proud of introducing in this ecosystem layout is a standalone Mock API Server.

If you are writing integration tests inside a CI/CD pipeline or developing entirely offline, you don't need to touch a live network. The repository includes a lightweight, local RPC simulation engine. You can point your application's BaseUrl to the local mock instance and verify your code execution path instantly without burning through sandbox rate limits.

Moving to Production: 1.0.1-rc2 is Live!

The project originally started in 2023 as an experimental wrapper. Recognizing that enterprise applications demand stability, it has been completely rewritten from scratch to adhere to rigid SemVer and dependency standards.

The stable Release Candidate (1.0.1-rc2) is officially live on NuGet right now.

If your team is managing a manufacturing or facility tech stack built on Microsoft infrastructure, check out the repository, run the CLI tool, and try it out!

GitHub Repository: Screaminlean/FiixCmms.Client.Net

NuGet Package: FiixCmms.Client

I'd love to hear your feedback, issues, or feature requests if you're working in the industrial automation space!

Top comments (1)

Collapse
 
aldo_cve profile image
Aldo

The 'stop wrestling with custom HMAC-SHA256 signing' line immediately caught my eye. I've lost count of the hours spent debugging subtle encoding differences or byte[] conversions when dealing with bespoke signing requirements, especially when the external system's documentation is a bit vague on the specifics. It's refreshing to see a focus on leveraging modern .NET patterns to abstract that complexity away, rather than requiring teams to reinvent the wheel for every new integration.

The push towards strongly typed clients and using HttpClientFactory with System.Text.Json for serialization has been a massive quality-of-life improvement for our SaaS integrations. It moves the integration complexity from individual API calls to a centralized, testable client layer. This really helps catch issues at compile-time rather than runtime, which is crucial when dealing with external dependencies that might change without much notice or have less-than-perfect documentation.

Beyond the initial connection, abstracting away the communication layer also makes it far easier to implement robust error handling, retries with libraries like Polly, and consistent logging. These aspects are often overlooked in the rush to just 'get it working,' but they're absolutely vital for production-grade SaaS. It sounds like a solid approach to making these types of integrations less of a black box and more of a predictable dependency.