I’ve been working for a week already on the following task. I have a dumb switch that turns on and off my boiler. I have already integrated several AI assistants, but none of them meet my requirements.
It must be able to turn the boiler on for any given time (in minutes, hours defined by voice or text)
It must support the context of the conversation.
I was able to configure Extended OpenAI Conversation integration to handle time duration, but it does not support context (correct me if I’m wrong). The official OpenAI Conversation Integration supports only context, but refuses to control the time duration of the boiler activity. The separate Ollama server currently has similar behaviour - it only keeps the context of our conversation. I’ve been trying to solve this with ChatGPT, but unfortunately, without success. I’m sure it is a very common idea on how to make a dumb switch smarter. Maybe someone has any ideas about what is missing in my puzzle.
I would almost think this might be a tongue-in-cheek post.
how would an AI system control a dumb switch? there has to be a way for the AI (or any other system for that matter) to communicate with the switch. If it’s dumb then how is that supposed to work?
AI is great and all (slightly or more also tongue-in-cheek) but it’s not magic…yet.
unless I’m missing something obvious. If so then ignore me and my apologies.
You will have to write your own custom script that accepts time duration as input and handles errors then build context so the llm knows how to use it.
You are absolutely right!
I have several scripts to handle primitive actions.
For example, the following script has the logic of turning on a switch for a given duration.
alias: Turn on switch with timer
mode: single
fields:
switch:
description: The entity ID of the switch to turn on
example: switch.boiler
duration:
description: The duration to keep the switch on (HH:MM:SS)
example: "00:10:00"
sequence:
- data:
entity_id: "{{ switch }}"
action: switch.turn_on
- delay: "{{ duration }}"
- data:
entity_id: "{{ switch }}"
action: switch.turn_off
In addition, ChatGPT helped me to compile several automations assisting in formatting and transferring text received from a user to the LLM agent. All of them work fine if I trigger them manually through a webhook. But they have never been triggered when chatting with Assist (text or voice). I decided to dig slightly deeper and discovered that no event is fired during my communication with the Assist! Which is crucial in all scripts and services I compiled. I believe now that all these auxiliary tools are irrelevant and I need to teach LLM how to work with the above script. Do you have any ideas?
You’re falling in a trap that just because it’s in HA the llm can do it.
You have to build the context for the llm to understand your tools before it has a prayer of doing it. What you’re looking for is in the first 10 posts.