Here's something that might help
From Gateway version 1.8.25 you can't use original PSK to connect to gateway anymore. You can only use it to create an application secret for your application which you can later reuse with it.
Info source :
https://github.com/tomidix/CSharpTradFriLibrary
From Gateway version 1.8.25 you can't use original PSK to connect to gateway anymore. You can only use it to create an application secret for your application which you can later reuse with it.
Code:
// recommended // This line should only be called ONCE!!! per applicationName -> you define applicationName as you want // Gateway generates one appSecret key per applicationName TradfriAuth appSecret = controller.GenerateAppSecret("GatewaySecret", "ApplicationName"); // You should now save programatically appSecret.PSK value (appsettings) and reuse it // when connecting to your gateway every other time controller.ConnectAppKey(appSecret.PSK, "ApplicationName"); GatewayController gatewayController = controller.GatewayController; var devices = await gatewayController.GetDeviceObjects(); DeviceController deviceController = controller.DeviceController; await deviceController.SetLight(devices[0], true); await deviceController.SetColor(devices[0], TradfriColors.SaturatedRed); // same works for `controller.GroupController`
https://github.com/tomidix/CSharpTradFriLibrary
Comment