For anyone interested I implemented a slightly adjusted version from Solweb in C#.
The complete source code is available on Github Homey-.Net. There is also a WPF Sample application and a Nuget package available.
// Homey Login credentials
private const string UserName = "<USER_NAME>";
private const string Password = "<PASSWORD>";
// client id and client secret from: https://tools.developer.homey.app/api/projects
// cloud id from: https://tools.developer.homey.app/tools/system
private static HomeyApiConfig _apiConfig = new HomeyApiConfig
{
ClientId = "<CLIENT_ID>",
ClientSecret = "<CLIENT_SECRET>",
CloudId = "<CLOUD_ID>"
};
// You can check the local homey ip over the app with More/Settings/General/About
HomeyClient client = new HomeyClient
{
HomeyIp = HomeyIp
};
client.Authenticate(_apiConfig, UserName, Password)