Is there a limit to scripts? How about with Google Assistant?

Tags: #<Tag:0x00007f7392b58c88>

There’s a roundabout reason for this but to save bandwidth just the question…

Is there a limit to the number of automation scripts I can have? Assuming adequate local hardware?

And in particular is there a practical or actual limit to the number that can then be used in Google Assistant?

For example, if I had 1000 music files, could I generate a script for each one that would play it on a specific device, and in doing so get voice control for them using Google Assistant with “Hey Google Active Play Summertime”?

Google Play Music is not an option for a variety of reasons the main one is this particular list has to be kept separate from my google play music library, as it is for a specific device.

I don’t think there is a limit for the number of scripts/automations etc. in home assistant. The limiting factor is the hardware. I can’t help you on Google Assistant, don’t use this.
However, creating a script for each music file, for whatever reason, sounds insane. You really want to maintain 1000 automations? And then hardcode the song name in each automation?
I’m almost sure there is a more automated, human friendly approach to this.
So you have a library of 1000 music files somewhere in your local network. And you want to tell Google which song it should play. Then maybe this might be something for you?

Well, I’m not quite an idiot, I would write a program to maintain the script file.

These are player piano songs, that need to play only on the player piano device, and which rarely change (maybe once every couple years I buy a new CD). So a quick program would generate a script file I could include in HA then “Sync my devices”.

And no I don’t want to do it this way, I just haven’t found a better choice. I need to have a clearly separated (specifically so Google Assistant can tell the difference) set of music and commands, since if I just (for example) loaded it all in Google Music, I might have “Piano Man” in there for both real music, and piano music, and if Google played the piano one on my Home Max, I get a horrible ear-splitting squeal. Or in the reverse case I get no piano since no encoded midi.

Even now Google and I argue a lot, I want to play a song from my Google Play Music library and she plays some pandora station. So I need some very distinct vocal queues, that is why I thought scripts and “Activate” would be good.

As to LMS, I’ll look though that project, but I thought Logitech and Squeezebox was all falling apart with the vendor dropping out? But maybe what you did this still can work, @Burningstone, I’ll look, thanks.

I didn’t mean to sound like that, sorry if I offended you.

I think you should have included the details you gave me now in your original post, now I better understand your problem. You should really take a look at LMS, I think it could solve your problem. The hardware being discontinued should not be a problem, as you don’t need any hardware from them for it to work. Just read about LMS in general and the link i posted and come back when you are stuck or have some questions.

Sorry, should have put a smiley in there, no offense taken. And it’s an ugly solution even if I did program it.

I’ll look at LMS.

1 Like

I spent most of the morning getting LMS running. It’s up and working, and I got the chromecast bridge working as well.

I cannot say that I’m a fan, at least the player (squeezeplay) is this silly-small window that you can’t expand (I’m on windows for the moment) and with awful search and organizational tools. I gather this is an emulation of some kind of physical remote control, so I get that – but really, for a desktop, this is what you use to manage music?

But it’s functional.

I started looking at the voice interface and haven’t tried it. I was hoping dialog flow integrated with google assistant without a separate public interface (and associated dns). Got to run out and hoping I might ask a couple questions before I jump through those hoops:

  1. Am I going to be able to set rules based on track metadata of some sort to say “these can only play on those speakers, and the rest on these speakers”. Specifically in my case would like to separate the piano music and piano “speaker” from regular audio music and all other speakers, so people cannot play on the wrong device?

  2. Is there a decent full screen modern interface, preferably touch enabled, for playing?

If you’re looking for an interface to Logitech Media Server in Windows, the http page if quite functional. Typically http:\lmsserver:9000.

On android there are other apps: squeezectrl, sbplayer (turn your android tv box into a squeezeplayer) to name a few.

Ipeng is also another option for iOS.

Squeezectrl is also available for Windows though I have not tried it.

So let me give a brief update. I decided I liked Media Monkey as an organizer, but it is pretty bad in terms of being a media server (especially since it’s not a server, yet – though they are working on it). But it’s a great organizer.

So I split my piano player music into a separate set of folders, and organize it and playlists with Media Monkey. But that won’t work on Linux, which is what runs the piano. I tried VLC for a while, then ended up with Kodi running there. It’s got a decent player interface, and it takes M3U playlists, so I can easily export the media monkey playlists (which are in SQLite) and build at the same time the playlist and Home Assistant scripts that play them via Kodi. The scripts sync to Google Assistant, and I can now do a “Hey Google, Execute Piano Jazz” and it starts playing the Jazz playlist. I could actually build a similar command for each song – and I may some day just for grins. But Kodi also has a decent player and search so I can use the piano’s touch screen to select individual songs at present.

I’ve seen a lot of other highly complex integrates for layering what looks like a custom developed Google voice application over several players, and the end result looks great – but besides being complicated, they look fragile. I just can’t see all that surviving a few years of Google’s upheaval in the automation side. Having just a few easily defined commands for playlists is plenty for me and simple.

Though I still didn’t try to see if there’s a limit to HA/GA scripts that GA will accept. Maybe one day will generate the 1000 or so I have player piano songs, and just see what happens.