Hello! I am wondering if someone can help me troubleshoot a script which is seemingly running randomly…!
It is a ‘bedtime’ script and does a few obvious things with lights. It functions correctly as part of a couple of automations, however it is also firing occasionally (perhaps 3 times a week) and I can’t figure out what’s triggering it!
I think it might be linked to siri/homepod/shortcuts, but can’t be certain.
The automation triggers I have for the script are:
zigbee button (works fine)
iOS shortcut action (this works, but always feels… glitchy…)
The script is running at weird times (not bed time!) without either of the above being requested by anyone in the house.
The problem is a script running (seemingly) randomly.
It’s not a human requesting the script, so I guess the problem must be with automation somewhere…
I think my ask today to the forum is advice troubleshooting. Is there a way to see all automations that have a script as an action? Or is there any advice with the logs and where I can look?
All I can see in the logbook is that the script is “triggered by action Scripts: Bedtime1” and my username associated.
Apologies, I know this is very vague. It’s like a nightmare ticket in to IT service desk… “it’s broken but I can’t articulate why…!”
Not Alexa, but I use Apple’s iOS shortcuts with a homeassistant action (logged in as me). This is where my suspicion lies.
I have an ‘evening’ Shortcut which triggers the bedtime1 script. This works, but my (Apple) Homepod always hangs and says it doesn’t get a response (assuming from homeassistant server). I slightly wonder if it’s retrying hours/days later…
That shortcut is likely your problem then. It’s either that, you manually running the script via the UI, or something else logged in as you running it.
So I cloned the script (original was script.bedtime and now I have script.bedtime1) thinking that if something was trying to run the script it wouldn’t know about the new clone… but it still happens!
What I think I’ll do is remove it from the only iOS Shortcut that triggers the script and see if it continues.
Wait, if you just copied it and added it to the shortcut, how does that rule out the shortcut being the problem? You essentially just renamed it keeping everything the same. If you want to rule out the shortcut. Remove the original and make a new script but don’t link it.
Because I thought something else was triggering it but I couldn’t figure out what. So the rename was to ensure that only this shortcut knew about the script.
I do want this shortcut to trigger the script, of course but only when I run the shortcut…
Have you noticed any more unusual behavior? I am also seeing scripts run without my interaction. The only new thing in my setup is the Google Nest Speaker.
Like you my script runs when it should but it also runs by itself. I don’t have any outside connections to the script like you do with Apple Shortcuts. But it still triggers by itself.
It seems it’s turning itself on and off. The script requires a message and one is not provided.
My money is on Siri/Google, but I do not know if that runs though supervisor like it shows. Google Home has bedtime routines too, and can activate the script by voice. If it is not your intent to have it run by voice assistants, I’d turn them off for this script. Renaming it to something less likely to be spoken would also help.