Trigger SmartThings scene from MacroDroid [Please scroll to see Sept 2023 updates]

kroma3

New member
I've reassembled everything and still no luck. Strangely, my configuration screen for the 'if' statement looks different to yours with no option to configure as 'string' (although this may already be in place).
 

tstancat

New member
The way I did it was a bit convoluted as my coding skills are rather limited. Here are the steps I took...

Tap on the if statement
Tap "Configure" from the menu
Tap the + sign in the top right corner of the "Conditions" window
Tap "MacroDroid Specific"
Tap "Compare Values"
Change Type to String
Next to Value 1, tap the button with 3 dots
Tap "LocalVar: entry_scene_name", then tap OK
Next to Value 2, tap the button with 3 dots
Tap "LocalVar: scene_name", then tap OK
Make sure the equals option is selected, then tap OK
You should now see 2 conditions in the "Conditions" window... the old condition and the new one you just created
Tap on the old condition and tap "Delete"

Good luck
 

tstancat

New member
One more thing... after setting Value 2, scroll to the bottom of the window and make sure "Case insensitive" is checked.
 

kroma3

New member
Thank you for your detailed help but, no luck I'm afraid. I've tried rebuilding everything from the bottom up but I'm still getting "no such scene".
 

tstancat

New member
Sorry to hear. One thing I did during debugging was insert Display Dialog commands to see what the values were for the entry_scene_name and scene_name variables. That's when I realized the if statement was wonky. You may want to give that a try.
 

kroma3

New member
I gave this a go. One of my 2 Smarttthings macros had identical entry_scene_name and scene_name variables. The other repeated the scene_name variable (so the two entries didn't match). Neither worked.

I've clearly messed something up with my tinkering. I've deleted the lot now and will start again at the weekend (but I fear I'm not going to succeed).

I'll let you know.

Thanks for your help!
 

kroma3

New member
I got impatient... I've started from the beginning and still no luck.

I await with interest to see what's happened and, fingers crossed, I can get it working again.

Thanks again for your help.
 

eshroom

New member
The way I did it was a bit convoluted as my coding skills are rather limited. Here are the steps I took...

Tap on the if statement
Tap "Configure" from the menu
Tap the + sign in the top right corner of the "Conditions" window
Tap "MacroDroid Specific"
Tap "Compare Values"
Change Type to String
Next to Value 1, tap the button with 3 dots
Tap "LocalVar: entry_scene_name", then tap OK
Next to Value 2, tap the button with 3 dots
Tap "LocalVar: scene_name", then tap OK
Make sure the equals option is selected, then tap OK
You should now see 2 conditions in the "Conditions" window... the old condition and the new one you just created
Tap on the old condition and tap "Delete"

Good luck

Worked for me, thanks! Wonder how it broke in the first place?
 

Endercraft

Moderator (& bug finder :D)
It you updated to MacroDroid v5.36.9 there was a fix in how plugins worked so that may have affected your macro.
 

kroma3

New member
Hooray - with your help, I've fixed it! I must have tinkered a step too far for the fix to work initially. Then, when I started from scratch, I forgot to apply the fix. But all sorted now.

Thank you!

I think I can see the problem... on the original action block, plain 'entry_scene_name' no longer works for matching. Instead, the option must be 'lv=entry_scene_name' (which seems to be the option now available if recreating the 'if' command).

I've attached the dialogue box with the old and new 'if' statements on view.

Thanks again for your input and help and, of course, to RSF for setting things up in the first place!

Kroma3
 

Attachments

  • Screenshot_20230923-165002.png
    Screenshot_20230923-165002.png
    199.9 KB · Views: 13
Last edited:

RSF

Well-known member
I'm back. I don't know what changed, but as @tstancat noted, there was an IF statement that somehow stopped working (perhaps a glitch in MacroDroid relative to local variables in Action Blocks??).

In any event, please see attached an updated "Smart Things - Trigger Scene" action block, which contains the fix identified by @tstancat, and which should be downloaded/imported nstead of the one from the original post.

Also thanks to @Endercraft for highlighting that Action Blocks can be uploaded with their own extension now, so there's no need to download and rename it.
 

Attachments

  • SmartThings-_Trigger_scene.ablock
    22.1 KB · Views: 24

Bicca

New member
Over the past day or so, my scenes have suddenly stopped working as they should, and I'm receiving a popup message that says "no such scene." I haven't made any alterations to the scene names. Do you have any recommendations or suggestions?
 

RSF

Well-known member
@Bicca - Have you downloaded and imported the updated Action Block from 9/28 (above)? That addressed an issue that appears to have been introduced in a recent update to MacroDroid, which resulted in that "No such scene" error.
 
Top