BluettiCloud 1.0.1

dotnet add package BluettiCloud --version 1.0.1
                    
NuGet\Install-Package BluettiCloud -Version 1.0.1
                    
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="BluettiCloud" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="BluettiCloud" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="BluettiCloud" />
                    
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 BluettiCloud --version 1.0.1
                    
#r "nuget: BluettiCloud, 1.0.1"
                    
#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 BluettiCloud@1.0.1
                    
#: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=BluettiCloud&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=BluettiCloud&version=1.0.1
                    
Install as a Cake Tool

BluettiCloud

A C# library for connecting to Bluetti power stations via their Cloud API, receiving real-time device telemetry over a STOMP/WebSocket connection.

Platform: Windows only (token storage uses Windows Credential Manager)
Runtime: .NET 10


Quick Start

Warning! Telemetry data is pushed by the server only when the device state changes or a heartbeat occurs. The interval between updates is unpredictable: it can be as short as 30 seconds or as long as 5+ minutes.

using BluettiCloud.Services;
using Serilog;

namespace BluettiCloudConsole
{
    internal class Program
    {
        static async Task Main(string[] args)
        {
            Log.Logger = new LoggerConfiguration()
                .MinimumLevel.Debug()
                .WriteTo.Console()
                .CreateLogger();

            Client client = await ClientFactory.CreateAsync();
            client.OnRealtimeStatus += Client_OnRealtimeStatus;
            await client.StartAsync();

            while (true)
            {
                await Task.Delay(1000);
            }
        }

        private static void Client_OnRealtimeStatus(object? sender, BluettiCloud.Models.DeviceRealtimeStatus e)
        {
            if (e.BatterySoc == null)
            {
                return;
            }

            Log.Information($"{e.DeviceSn} = {e.BatterySoc}%. Grid In {e.PowerGridIn}W. AC Out {e.PowerAcOut}W. DC Out {e.PowerDcOut}W.");
        }
    }
}

Device Status Fields

DeviceRealtimeStatus exposes the following fields (all nullable string):

Property Description
BatterySoc Battery state of charge (%)
PowerPvIn Solar panel input power (W)
PowerGridIn Grid input power (W)
PowerAcOut AC output power (W)
PowerDcOut DC output power (W)
BatterySoh Battery state of health
DsgEmptyTime Estimated time to discharge
ChgFullTime Estimated time to full charge
AcSwitch / DcSwitch / PvSwitch Switch states
DeviceActState Device activity state
(and 40+ more fields) See Models/DeviceRealtimeStatus.cs

Known Limitations

  • Windows onlyTokenStorage uses Windows.Security.Credentials.PasswordVault. Linux/macOS support would require an alternative storage backend.
  • Undocumented API — Bluetti does not publish an official API. The endpoints, message format, and authentication flow were reverse-engineered and may change without notice.

Contributing

Issues and pull requests are welcome. If Bluetti changes their API and the library breaks, please open an issue with the raw WebSocket frames if possible.


Credits

This library is a native .NET implementation of the communication protocol used in the Official Bluetti Home Assistant repository (https://github.com/bluetti-official/bluetti-home-assistant). Special thanks to the Bluetti for providing the reference implementation!

Product Compatible and additional computed target framework versions.
.NET net10.0-windows10.0.17763 is compatible. 
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
1.0.1 76 3/2/2026
1.0.0 72 3/2/2026