"Here is an example of a C# library that implements the HAP: CSharp.HomeKit (https://github.com/brutella/hkhomekit). You can use this library as a reference or directly use it in your project."
Which, to no surprise based on my experiences with LLMs for programming does not exist and doesn't seem to have ever existed.
I get that they aren't magic, but I guess I am just bad at trying to use LLMs to help in my programming. Apparently all I do are obscure things or something. Or I am just not good enough at prompting. But I feel like that's also a reflection of the weakness of an LLM in that it needs such perfect and specific prompting to get good answers.
In a sense you’re asking it the wrong questions. It’s a bit like asking Google “my PC crashed, how do I fix!?” and then expecting something specific to a rare issue in the first hit.
Assuming a C# library even exists for what you’re doing (maybe not!) then still the best use of AI is to troubleshoot specific issues given an almost working piece of code as input.
Ask it to explain why something doesn’t work instead of asking it to do your job for you wholesale.
PS: GPT 4 (you are using the best coding AI, right? Right?) can get you going quickly:
“There are several libraries available for controlling Apple HomeKit from C#. One such library is *HapSharp* ². It is a .NET implementation of the HomeKit Accessory Server that allows you to create your own custom HomeKit accessory on a Raspberry Pi, Mac computer, or any other platform that can run Mono ².
Another option is *HomeKit* ¹. It is a native C# library for Apple's HomeKit Accessory Protocol. However, it is not a complete implementation and does not work ¹.
They do though. Pyatv can do it (and home assistant is using pyatv since HA is python based) and commercial home automation systems like Crestron and Control4 can do it too.
Really I just need to get an LLM to port pyatv to C# for me I guess.
Or you're good enough at using your tools that you can do all the low-hanging fruit. LLMs excel at working around inadequate tooling, but (at least at the moment) they can't help you if you're trying to do something actually tricky and get stuck enough that no rubber duck can save you.
“Make me a billionaire… I’m still poor! Bad AI!”
You need to collaborate with the AI, use it to help with each small step of the problem, with input references provided.
To a degree Phind can do the reference chasing for you, but it’s not magic.