Read an app's settings from an RM 4.0 rule

Is it possible to read settings from an app, and use them in a conditional? I'd like to be able to get heat1Wake (and similar) in a Thermostat Scheduler app instance and compare it with the value of a thermostat device's heatingSetpoint. Basically, I want to be able to write rules that check my thermostat is doing what it's supposed to, and don't want to hard-code temperatures into the rule.

No one has any ideas? I guess this isn't possible then.

You could probably use global variables. You can set variables from device attributes and then use that variable in other rules. I dont use them, but if you look here, it might start you in the right direction.

Thanks. That's nearly what I want, but it's using device attributes. I need the equivalent for app settings.

@bravenel ?

No, this is not available. You can control Thermostat Scheduler from Rule Machine, and you can examine the thermostat that is being controlled from RM as well. There is zero likelihood that Thermostat Scheduler will not be set the way you set it, either directly or from RM. The idea of having a rule to verify another app makes no sense when you can directly control that app.

2 Likes

Iā€™m not trying to check that the scheduler has done its job, Iā€™m trying to check that my thermostat has followed the instructions. 1 time in 100 it doesnā€™t ( which could mean wasting natural gas all day, or waking to a cold house).

So if I know that I set Thermostat scheduler to set the heating to 19 when Day mode starts, I can have a rule that checks my thermostat 5 minutes later and confirms if itā€™s set to 19. I have done that.

What Iā€™m trying to avoid is if when I decide to change Thernostat Scheduler to set it to 21 (because a family member complains), Iā€™ll have to change my RM rule and replace 19 with 21 wherever itā€™s used.

If I could see what I chose in Thermostat Scheduler via itā€™s settings then I would never have to touch the rule again.

I donā€™t think thatā€™s such a strange request. DRY (donā€™t repeat yourself)...

How about putting the value to be set in a Global Variable?

1 Like

Yes, I can do that. But itā€™s still two places. There would be different values for different modes but it would be easier than editing a rule.

Ohhhh, @bravenel I just got an idea based upon this discussion... What about adding an "array" type to GV? :slight_smile: That would be a good solution. I could see LOTS of uses for an array of items in a GV.