I want to create a rule that will turn on a switch (in this case one that is connected to a floor heater) daily during the months of November, December, January, and February from 6 am to 9am but only if the outdoor temperature is less than, say, 60 degrees.
I don't currently see a way to do this in Rule Machine, but could it be that I'm wrong?
What particular part do you feeel there is no option for?
There is a between two dates option for a conditional, that would handle the from Nov to Feb par. That along with a certain time conditional and some type of temp sensor or weather app that reports temp it should be a pretty simple rule.
My Ecobee thermostat reports outside temp. I do somethgin simliar with the heaters in our bathroom.
In my case I look at the state of my thermostat at 4:00am every morning. If the heat comes on anytime between 4:00 and 4:30 then it means it's cold enough that I want the heat to come on in the bathroom @ 5:00am just before I get up, but only on Monday through Fridays .
The only thing I think will take a bit of thought is how to trigger this. Temperature? Time of day? Otherwise, this is just a quick idea of what you probably are thinking of.
The rest of the rule can stay as is, but you can remove the between dates as it that would be taken care of by the exit rule. I would also add the last END IF
I don't think I would trigger on temp as it would be triggering all the time.
OK, got it. I think I got something working here. I don't use Rule Machine a lot, so please give me feedback on this.
This will fire at 5:30am every day (about 30 minutes before I get up, to warm up my bedroom in preparation for waking up at 6am). At 5:30 am every day, it will check if the date is between October 1st and March 1st AND if the outside temperature reported by my weather App is < 65 degree, THEN (if both conditions are true) it will turn on the master bedroom heater at 5:30am, and then turn it off at 6:30am.
The only thing I see wrong with that is it only will trigger (run) one time, at exactly 5:30 AM. You may want to or need to add additional triggers. Oh, and maybe a virtual button or switch on the dashboard to trigger things manually.
Lastly, what if you want to turn it off early? Do you want some logic for that too?
I can always issue a verbal command to Alexa to turn it off early if I need to. This rule is designed to reduce the likelihood that I will want to curl up in bed and sleep in because it is too cold to get up and face the day. I have central heating… this is only for a one-room floor heater that provides supplemental heating for when I need it.
What is the ENDIF command that was referred to above?
definitely be careful if you're using a heater and a smart plug. they can exceed the amps of the plug if run too long and can damage either the plug, the heater, or your home
Every IF should have an END IF. In your code it is not required as you don't have any additional code at the end of your IF, and RM is not strict on that.
I have been programming in a language for over 30 years now that is used for automatic test equipment and the program won't compile if your IF doesn't have an ENDIF. So it just makes me twitchy when I see it.
Also, while not true for this particular rule, the failure to properly close an IF block can result in nested IFs with undesired effects on rule execution.
Thanks. Actually the heater itself is a smart heater, but it only works through Alexa. The reason I want to make the rule through Hubitat is to take advantage of Hubitat's more advanced rule making possibilities. The rule will send a signal to turn on the heater through Alexa - I'm not using a smart plug for this.
ahhh, cool. i shouldn't be surprised since Amazon integrated basically everything with Alexa, but it's been forever since i've looked so had no idea. the last thing i knew they did was the microwave
I only got it to supplement heating to a few corners of the house that get very cold, but I don't want it to be on all the time and its software is a bit limited. Plus, ever since I discovered virtual motion sensor with switch driver, I'm always interested in finding ways to control Alexa-only devices with Hubitat