remoteit-csharp is an open-source C# client for the remote.it REST API. With this package, you can programmatically list and securely connect to your remote.it devices. This client is distributed as a NuGet package targeting the .NET Core framework.
Anyone is welcome to contribute to this project. Feel free to make any issues and pull-requests.
If you are building with the .NET Core command-line tools, you can run the following command from within your project directory:
dotnet add package Remoteit
From within Visual Studio, you can use the NuGet GUI to search for and install the Remoteit NuGet package. Alternatively, you can use the built-in package manager console and write the following command.
Install-Package Remoteit
var remoteitUsername = Environment.GetEnvironmentVariable("REMOTEIT_USERNAME");
var remoteitPassword = Environment.GetEnvironmentVariable("REMOTEIT_PASSWORD");
var remoteitDevKey = Environment.GetEnvironmentVariable("REMOTEIT_DEVELOPER_KEY");
var remoteitClient = new RemoteitClient(remoteitUsername, remoteitPassword, remoteitDevKey);
After authenticating, you can list your devices, connect to them, and terminate device connections.
var remoteitClient = new RemoteitClient(remoteitUsername, remoteitPassword, remoteitDevKey);
List<RemoteitDevice> devices = await remoteitClient.GetDevices();
var remoteitClient = new RemoteitClient(remoteitUsername, remoteitPassword, remoteitDevKey);
var deviceAddress = "80:00:00:00:01:XX:XX:XX";
// Create a device connection
ServiceConnection connectionData = await remoteitClient.ConnectToService(deviceAddress);
// Example: https://XXXasnap.p18.rt3.io/
string connectionUrl = connectionData.Proxy;
var remoteitClient = new RemoteitClient(remoteitUsername, remoteitPassword, remoteitDevKey);
string deviceAddress = "80:00:00:00:01:XX:XX:XX";
// Create a device connection
ServiceConnection connectionData = await remoteitClient.ConnectToService(deviceAddress);
// Get the connection's ID from the service connection object.
string connectionId = connectionData.ConnectionId;
// Terminate the connection. An exception is thrown if the termination is unsucesful.
await remoteitClient.TerminateDeviceConnection(deviceAddress, connectionId);
You can install the project's dependencies by running dotnet restore
in the project root.
All tests are located in the Remoteit.Test
project. The testing libraries used for this project are xUnit and Moq.
Continues integration is done through Azure Pipelines. The azure-pipelines.yml
file configures this pipeline. Pipeline Link
- Kyle O'Brien - Initial work - LinkedIn
This project is licensed under the MIT License - see the LICENSE.md file for details