Can RM pull values from an external file for actions?

I have a simple rule that tells a Govee light to cycle through a bunch of scenes...currently I've got a simple rule that uses repeat while, applies each scene number w/the setEffect command and lets it run for 5m, and then goes on to the next and repeats while a plug is on:

Rather than have to store the scene numbers in the rule and have to edit the rule every time I want to remove/add/change order of scenes, I'd like to store the scene numbers in a file, upload it to the hub, and have RM look at the file and use the scenes in the file in the setEffect actions.

That simplifies editing the scenes I'm using, and I could have separate files for each season and set up the rule to parse the desired set of scenes for the current date.

Does RM support something like this? I did some searching and looked at the RM docs and didn't see info about this. If I missed it appreciate a pointer.

2 Likes

Haven't tried it, but try set a string variable to Get HTTP with the URL to the file.

EDIT: here's an example

RM has string tokenization, an exercise left to the reader :wink:

1 Like

If you're going to suggest things, at least offer up stuff that is written in English. This...


...is not English! :wink: :rofl:

Every day I discover I'm dumber than I thought I was. :slight_smile:

1 Like

Thanks for the multiple options...above is initially most appealing as it looks like it would be easiest for me to implement w/a little assistance.

Pretty terrible w/Groovy other than minor editing of existing content, so likely won't go down that path. :frowning:

Hub variable may be the fallback if the File Manager Device option doesn't work out.

Also going to search/google a little on RM string tokenization just for the fun of it, and maybe I will have the opportunity to teach @hubitrep that no good deed goes unpunished. :wink:

1 Like

Teach a person how to fish...

image

image

6 Likes

An approach based in part on the File Manager Device app and using variables worked...this was running last night and seemed to cycle through scenes just like I hoped. Uses tokens and everything... :wink: So I think initial victory. :slight_smile:

@hubitrep - Coming back to look at your post I think I ended up w/a kind of "mini-me" version of your rule, not as slick but seems to do what I want:

2 Likes

Yeah, my (admittedly tiny) bit of thinking about that part last night was that I could setup an If/Then at the start of the rule that would choose the desired file based on the current holiday/time of year.

1 Like

Looks great. See, I didn't even realize there was a Set variable from local file RM action (of course there is). No need for that pesky http get.

2 Likes

Woot...being able to contribute just a little is a good thing! :smiley: :wink:

1 Like