Skip to content
This repository has been archived by the owner on Aug 7, 2021. It is now read-only.

larscom/nefit-easy-dotnet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nefit Easy™ .NET Library

.NET client library for the Nefit Easy smart thermostat.

PLEASE READ BEFORE USE!

Use this library in moderation: don't flood the backend with new connections made every X seconds. Instead, if you want to poll the backend for data, create a connection once and reuse it for each command. In the end, it's your own responsibility to not get blocked because of excessive (ab)use.

Disclaimer

The implementation of this library is based on reverse-engineering the communications between the apps and the backend, plus various other bits and pieces of information. It is not based on any official information given out by Nefit/Bosch, and therefore there are no guarantees whatsoever regarding the safety of your devices and/or their settings, or the accuracy of the information provided.

Examples

Create Client & Connect

Create a client and get the owner info.

INefitEasyClient client = NefitEasyClient.Create("serial", "accesskey", "password");
    
await client.ConnectAsync();
    
if (client.ConnectionStatus == NefitConnectionStatus.Connected)
{
    IEnumerable<string> owner = await client.GetOwnerInfoAsync();
}    

Subscribe to Connection Events

INefitEasyClient client = NefitEasyClient.Create("serial", "accesskey", "password");

client.ConnectionStatusChangedEvent += (sender, status) =>
        {
            switch (status)
             {
                 case NefitConnectionStatus.Connecting:
                     break;
                 case NefitConnectionStatus.Connected:
                     break;
                 case NefitConnectionStatus.Authenticating:
                     break;
                 case NefitConnectionStatus.AuthenticationTest:
                     break;
                 case NefitConnectionStatus.InvalidSerialAccessKey:
                     break;
                 case NefitConnectionStatus.InvalidPassword:
                     break;
                 case NefitConnectionStatus.Disconnecting:
                     break;
                 case NefitConnectionStatus.Disconnected:
                     break;
                }
         };

await client.ConnectAsync();

UI Status

Get the current UI status (room temperature and more)

INefitEasyClient client = NefitEasyClient.Create("serial", "accesskey", "password");
    
await client.ConnectAsync();
    
if (client.ConnectionStatus == NefitConnectionStatus.Connected)
{
     UiStatus status = await client.GetUiStatusAsync();
     double temperature = status.InHouseTemperature;
}

Set Room Temperature

Set a room temperature between 5 and 30 degrees Celsius

INefitEasyClient client = NefitEasyClient.Create("serial", "accesskey", "password");
    
await client.ConnectAsync();
    
if (client.ConnectionStatus == NefitConnectionStatus.Connected)
{
    bool succeeded = await client.SetTemperatureAsync(24d);
}

Releases

No releases published

Packages

No packages published

Languages