I’ve got a script which I created a while ago and which always worked pretty fine. I use it to trigger a bunch of other scripts at the same time. From time to time, it simply doesn’t work, I click on it and it doesn’t fire and it’s not really clear why. I looked at the automation trace to understand what’s going on and I just have the message below:
Is there any way to understand what could be causing this? The script itself is pretty simple and it’s activated manually, so I really have no idea…
That’s key. It means your scripts are already running, so a re-execution of them via an automation is denied.
You could change the “mode” of the automation to restart, parallel or queued, but it all depends on what makes sense for the scripts…
Yeah I thought about that, but in reality it should not be running as nothing triggered it… as I said there’s no automation triggering it, so it’s manual. Basically this is what happened:
I called the script with a Google Home routine which is set to trigger an entity which was published as a scene in Google Home
It didn’t work, so I opened the app and triggered it manually from there
So might it be that the Google Home command failed somehow and triggering it manually from the app failed too because it was “already running”? But even if so, how would it be already running if the Google routine failed to trigger it? I’m confused…
What do you mean exactly? I think when I was setting it up, I tried calling the scripts directly but changed to the script turn on service because the calling script was waiting for the previous called script to end (If I well remember), and that was not what I wanted. I need to call all scripts underneath at the same time. Or perhaps you were referring to something else?
Yeah I just gave up with that configuration due to the inability to run all scripts at the same time (it’s to automate all blinds closing and it’d be pretty “weird” looking at them closing one by one ). If you know a way to call them directly all at the same time let me know !
Mmm I’m not getting your point. I actually want to close them “in parallel” or “at the same time”, and it’s what I’m doing with the script turn on service. Or did I get your question wrong ?
No worries.
Yeah I do not understand it too. If one of the underneath script would be hanging, the other scripts should then be called normally, unless all of them are hanging (weird!). And could the automation modes can be used with scripts? I would have used an automation to call all scripts, but I guess I’d have the same issue, no way to call them all in parallel…
Any further ideas? This morning it happened again… I guess the issue is not in the main script (the one which calls the others at the same time), rather with the scripts underneath. Indeed, I tried to call one of them manually from the Developer page using the script turn on service and nothing happened… Is there a way to troubleshoot why a called script didn’t run ?
Using the “Trace” view is not really helpful as it shows nothing:
Nope, there’s nothing in any tabs. And yes, I can run these scripts successfully and the blinds open/close reliably.
A change which I made in the meantime was the run mode. I changed it from the standard config to “relaunch” settings. I’ll see if this fixes the issue.