dominicusmento / CSharpTradFriLibrary

This is a .NET Standard (2.0) library to communicate with the IKEA Home (Tradfri) ZigBee-based Gateway.
GNU General Public License v3.0
37 stars 20 forks source link

Update ApiLibs #50

Closed mjwsteenbergen closed 1 month ago

mjwsteenbergen commented 2 years ago

Hi! After wayy to long, here's my new update.

I've reworked the internals, so that it is easier for this library to use. I hope in the future to pull stuff out even further, so you will have even less dependencies (you don't even use Restsharp atm)

I could not get the UI to work, so that I leave to you.

Closes mjwsteenbergen/Apilibs#33

mjwsteenbergen commented 2 years ago

Hi @dominicusmento. Any update on this

dominicusmento commented 2 years ago

Hi @dominicusmento. Any update on this

Hi! I've tried to use the tradfriUI project, main.cs, to generate the new secret from your master but I'm getting the "Request timed out" for it. It seems that ConnectPSK function works fine, but then calling the tradfriController.GenerateAppSecret() just times out. Calling it without ConnectPSK() previously, fails with null reference exception on _coapClient. Can you take a look at it?

When using an existing appkey with app name etc. - unit test works fine.

dominicusmento commented 1 month ago

fyi, package is published here: https://www.nuget.org/packages/Tomidix.Dirigera

mjwsteenbergen commented 1 month ago

Hi! Uhm. Wow! Thanks!

I wasn't done with it though, like at all. 😆
Just recently bought the new hub and started writing code for it. I didn't realize you'd get notifications for it. For the new code I'll add that in a new PR.

I'm almost done with the lights and planning on adding motion sensors as well. I'll also create a new release for ApiLibs, so we can upgrade that as well. It's been on my list for years now, but just never got time for it. Sorry 😞

mjwsteenbergen commented 1 month ago

I've also added the new TerminalUI project. I'm either developing on Linux or a Mac, so that means I am unable to run the GUI, so I was wondering if you'd mind me converting the entire TradfriUI project to a terminal UI as well, so then anyone can use it, whichever OS they're running

dominicusmento commented 1 month ago

I'd prefer to rename the TradfriUI -> TradfriGUI_deprecated ; for people who are still using it on windows. And then to create new TradfriUI which can be terminal and OS independent, I don't mind that..

From my side, I'm not using that gateway for years now as I've switched to HA so basically, I don't need it anymore, but I didn't want to kill the library because of that. The problem is that I cannot test anything anymore :)

Regarding the dirigera, take your time it's all fine. It would be nice to have usage and example part written in readme.md, like tradfri has, as well as currently supported features. ;)