martymohr
-
Posts
68 -
Joined
-
Last visited
-
Days Won
1
Content Type
Profiles
Forums
Blogs
Gallery
Downloads
Events
Posts posted by martymohr
-
-
Perhaps the easiest is to set a variable, then execute based on the value of that variable. For instance:
if ShadeAutomation = true
execute shade scene
Then all you need do is designate a button (or activate voice command) to change the value of the variable. If you have an end-of-day procedure (such as "shut down house"), you'll want to reset that variable there so that each morning it operates as originally designed.
-
13 hours ago, schaudhary77 said:
Thanks all for the feedback. Fixing the driver is not an option.
@martymohr I do have it programmed the way you are suggesting and it works fine. The reason I want to use a macro is to reduce repetitive code (same programming for each room). I create the code (macro) once and use it as needed wherever. This is a simple example with just a couple of lines of programming. There may be other programming that may be more complex and may need to be added to multiple rooms. Taking your example, say you created a sequence for your bathroom and you want the same sequence to run in all your bathrooms.
I am equating these macros to functions or procedures in coding. Maybe I'm wrong and that is not how macros in Control4 work at all.
Yes, using a macro to reduce coding is preferable, as well as placing all code into one location. You are not saving any coding in this situation because the macro needs to know which room called it and then execute accordingly. But you do have all similar (but not identical) code in one location, which is sometimes beneficial. IOW, there is no one right way to code what you’re trying to accomplish.
And yes, equating macros to a function is correct. However, unfortunately, you cannot easily pass variables into the macro as you would with a function, and you don’t get a return value without doing additional programming. -
Yes, fixing the bad driver is the easiest. But you don't need (nor should you use) a macro. In programming, highlight the room and select the Power Off event. Then program as much as necessary, or as creatively as you wish. As an example, we use this in our master bath to turn off the lights when we power off the room. If it is daylight then turn off immediately, otherwise go off slowly.
-
Or conversely:
IF variable party mode = FALSE
program standard actions here (indented)
-
I set a variable named "party" that controls all the automated actions (shades, lights, etc.). When off everything operates according to its schedule. When on most of the schedule doesn't work (although some, such as the top window shades, operate regardless). When we turn off the house the party variable is reset to false.
-
Hizzle - Although I do have custom buttons, they are what I call legacy. Using the built-in Control4 Alexa capability, together with the IFTTT tool, everything in the house is controlled by voice through Amazon's Echo devices. And when I can't remember the state of any variable,, I simply say "Alexa, trigger variable list" and I get an email with all variable values listed.
-
If you have a 4-sight subscription you can send a push notification to any of your registered devices. I've got all my variables set up with custom buttons. Works beautifully, especially with my iPhone and Apple watch (I get the notification on my watch).
-
If I'm understanding correctly - you want the AC off if a door has been opened for more than five minutes, and when all doors are shut, turn back on the AC. Now I don't have any way of testing this, and I don't like "when variable changes," so give this code a try and let me know if it works. Might need some additional tweaking.
When DoorA opens
do DoorOpenMacro !I like macros - helps keep code in one place
When DoorA closes
do DoorCloseMacro
etc.
---
DoorOpenMacroDoorVar += 1
if DoorVar = 1 !if more than one we've already done this
ACVar = status of AC !need to know status of AC - it could be off - like in winter (if you need help with this code let me know)
if ACVar = on
Start 5MinuteTimer
---
DoorCloseMacroDoorVar -= 1
if DoorVar = 0
Stop 5MinuteTimer !this line of code is actually not necessary - can wait till timer expires
if ACVar = off
start AC---
When 5MinuteTimer expires
if DoorVar > 0 !is door still open?
stop AC
ACVar = off -
1 hour ago, Cyknight said:
Of course, the vast majority of people haven't invested in that at all
Your point? Do you have a reference for your assertion? If you recall I said "a lot of us" not "the vast majority." Do you get a kick out of being argumentative? Please follow the advice I've seen other people tell you: when I post something please don't respond to it! You're not contributing at all.
- sonic30101, rayk32 and drro
- 2
- 1
-
3 hours ago, Joshua Pressnell said:
1) Does anybody out there have interest in such a thing?
2) Are there folks out there that might want to beta test?
Of course a lot of us are already invested in the Amazon Echo (Alexa) which does much (if not all) of what you're talking about. That said, there is always room for competition and alternative solutions (forces everyone to be better) so I say go for it (even though, unfortunately, you never how much of a market there is until AFTER you've developed the product). I can also help with beta testing.
Alexa driver
in Driver Discussion
Posted
I know this doesn’t help you, but I've got the exact same problem, and I doubt it's my network. I'll let you know if I ever figure out what is happening or if it begins to work again as it has in the past.