3 ms·
I tried this, but I still have yet to get any LLM to answer me a programming question (that actually works) that I actually want to solve. Basically: "How can
by SirMaster 3y ago
I tried this, but I still have yet to get any LLM to answer me a programming question (that actually works) that I actually want to solve.
Basically:
"How can I send network control commands to an AppleTV in C#"
They always make up some nonexistent library or gives an example using some nonexistent API.
- jiggawatts 3y agoThat’s because you’re asking it something too obscure that I would have at first assumed wasn’t even possible. “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.
- SirMaster 3y agoIt's definitely not impossible at least. Someone is doing it in python here: https://pyatv.dev/ https://pyatv.dev/ GPT-4 actually sent me here: "Here is an example of a C# library that implements the HAP: CSharp.HomeKit (https://github.com/brutella/hkhomekit 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.
- wizzwizz4 3y ago> Or I am just not good enough at prompting. 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.
- jiggawatts 3y agoIn 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 ¹. I hope this helps! Source: Conversation with Bing, 31/10/2023 (1) netonjm/HapSharp: HomeKit Accessory Server .Net bridge! - GitHub. https://github.com/netonjm/HapSharp https://github.com/netonjm/HapSharp. (2) GitHub - ppumkin/HomeKit: Native C# Libary for Apple's HomeKit .... https://github.com/ppumkin/HomeKit https://github.com/ppumkin/HomeKit. (3) homekit-accessory-protocol · GitHub Topics · GitHub. https://github.com/topics/homekit-accessory-protocol?o=asc&s=forks.” https://github.com/topics/homekit-accessory-protocol?o=asc&s...
- SirMaster 3y agoEven all of that is on the wrong track. There is nothing that I can see anywhere about controlling an ATV with the homekit accessory protocol.
- jiggawatts 3y agoThen you asked the wrong question. AFAIK Apple generally does not allow arbitrary remote control (headless mode) for security reasons — it could be used for spam automation!
- SirMaster 3y agoThey 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.
- danenania 3y agoI’m working on an open source, terminal-based AI coding tool that is designed specifically for more complex, multi-iteration tasks and features. I think it could likely do a good job on this task. I’m using it personally every day and while it still needs more work and polish, I’m finding it much better than ChatGPT or any other tools I’ve tried for bigger and more difficult tasks. Please let me know if you (or anyone else reading this) would be interested to try a late alpha/early beta version: dane@envkey.com
- richardw 3y agoI’d guess the intersection of both tech has low training content so it starts dreaming. If you break up the question into “AppleTV API” (or whatever the primary terms are), then use that context for C# it might work better? Isolate the Apple bit so it uses more specific parts of the training.
- rushingcreek 3y agoInteresting, I seem to have gotten a decent answer: https://www.phind.com/search?cache=avbridtm69ejk8pdqpx8hcnf https://www.phind.com/search?cache=avbridtm69ejk8pdqpx8hcnf
- SirMaster 3y agoUnfortunately there’s nothing correct about that answer. There’s no tcp service listening for requests like that on port 7000 on an AppleTV.
- rushingcreek 3y agoIt's quoting that from a StackOverflow post: https://stackoverflow.com/questions/11857130/tcpclient-or-httpwebrequest-to-apple-tv-ending-after-30-seconds https://stackoverflow.com/questions/11857130/tcpclient-or-ht....
- SirMaster 3y agoYeah, that port 7000 service is AirPlay protocol and they are sending photos and videos to an ATV with it. But I want to control a unit like send navigation controls like 4 directions, back and select. The only app I know that can do it is pyatv, (a python app) but I want to do it in my C# app. It would be nice if an LLM could port pyatv to C# for me as I don't really know python at all.