Fvanoost
(Frédéric)
September 6, 2025, 3:51pm
1
Hi all,
first, a disclaimer, this is my first github experience and first code posted for the community, so be nice but I’m always open for advises and improvements.
I have found this post of reddit https://www.reddit.com/r/homeassistant/comments/1lxcdsm/ai_log_analysis_tool_install_instructions/ and wanted to give it a try but for some reason the code presented by @ toxicstarknova was not working on my HA Yellow.
This github contains the code that I had to tweak to make it work on my HA Yellow.
The outcome of this code is basicaly a report like this one
Let me know your sought and thanks again for @toxicstarknova for the first code
Fred
1 Like
makai
September 7, 2025, 5:45am
2
That’s nice.
Note that you may be able to do the same with the new ai_task.generate_data
action introduced in release 2025.8.0 (avoiding app_deamon).
1 Like
Fvanoost
(Frédéric)
September 7, 2025, 4:15pm
3
Thanks @makai . I’ll probably give it a try later. In my case I realy wanted to get AppDaemon to work on a HA Yellow and believe me it was not a walk in the parc
1 Like
NathanCu
(Nathan Curtis)
September 7, 2025, 5:15pm
4
I’m avoiding app daemon if at all possible.
I don’t have log access through templates (yet fr being authored, and I might know a guy) so we can t direct pull yet… Buuuuut…
@makai I’m almost positive you’re correct…
You CAN wrap a HA api call with a rest command and pipe the log back to the llm through an api call. (this is how I access mealie and grocy) then wrap THAT with ai_task. Boom analyze logs. (I might be halfway through the tool for Friday already have to unwind some of the REST stuff for the log.)
Fvanoost
(Frédéric)
September 8, 2025, 2:50pm
5
will be happy to test your code once ready as my experience showed that the yellow is a bit tricky with API call.
1 Like
NathanCu
(Nathan Curtis)
September 8, 2025, 4:10pm
6
I’ll post it in Friday’s Party when done. Im already hitting Mealie and Grocy via RESTful
Its just a tightened version of this tool scoped down to only the HA logs endpoint…
Lets review…
Your LLM Needs Context. Lots of it. Use every tool at your disposal to teach the LLM - like a sixth grader, in well-defined, stepwise clear language - what you want from it, it will try… It will try so hard it will FAIL trying to try unless you tell it how to fail.
HA has some significant… Limitations for forming a prompt - but now that we know what they are…
Total prompt length
Dont use non json printable chars, alternatively escape them properly
Total prompt lengh
Come up wit…