#Local and ai scripts shared functionality.

1 messages · Page 1 of 1 (latest)

lament grove
#

Normal create your own voice activated stuff uses automations. Ai activated functionality uses scripts.

Im hitting all kind of issues while running tail and error.

One of them is that the varible used in the stop command needs to be in {{ {'value': output } }} for the voice automation to understand the stop output.

All functions and description needs to be set. And the script options need to be set mandatory if required.

With this last i have an issue. I feed the device_id to the script from the automation to detect what assist client is used. To get the room so ha knows where to turn on the tv or music.

But the ai does not know the device-id so i created a other input var room

Now is the LLM not always filling in the room. Unless made mandatory.

What is best practice. Only make the room mandatory. And fill in a none value in the scripts. Or combine the two functions and make a template to check if its a device id or a room?

lavish lichen
#

Write in description "always use the room parameter".
Also, for "normal" interaction, which is inbuilt conversation agent, you can use intent scripts instead of automations. It's much more versatile.

lament grove
#

Well the scripts are extensive. Multiple case swiches.

I have my own written multi room audio based on mpd and snapcast. If i turn on a speaker it checks if there is already music playing in a other room if so use that stream. If im home and spotify is running on my phone cast to the librespot automation.
If not play the music of the mpd selected to the room. Or start playing a radio stream it nothing plays.

#

It can play random tracs of an artist podcasts albums and radio stations. And there can be typos in the tts detection in the query. Because of a nice sql function that finds the best match. So voice command play music anything plays music in the room i am. The music i want.

I have music assistant as fail over. But the search never results the original track. Music skips. Strange stuff with queues. Voice control hat requires llm To much issues.

lavish lichen
#

It doesn't matter for LLM how extensive script is. It will just use that as tool.