Jump to content
C4 Forums | Control4

Interface for Multiple Variables...


JGLI

Recommended Posts

We are entering a two day holiday in about an hour and my wife asked if there was a way to have the lights go off at a different time each night (i.e, tonight at 11:30 and tomorrow at 12:30).   I have a keypad in my pantry which lists the times, but there is no way (other than spending a lot of money on extra switches) of handling multiple days.  The maximum number of days where we can't touch electronics is 3 days, so I'd like to build an interface in a screen accessible on an iPhone or iPad for times when we have multiple days.

Ideally you would have an option for 1 2 or 3 days, then depending on how many you would choose your time off.  Is there anyway to do this inside of control 4 - in élan I could have created the buttons (but the behind the scenes code would have been awful).  In c4 I can figure out the code quite easily, but can't figure out the interface.

Thanks for any input and ideas, I'll be back online Wednesday evening.

Link to comment
Share on other sites


You need HouseLogix Routines driver. You can program all this in HE, but when you have a lot of changes like the ones you're always posting about, it's easier to have a driver that can do this type of routines from the C4 interface. 

Link to comment
Share on other sites

  • 10 months later...

I'm bumping this back up.

I've made a lot of progress in the past year but I really want/need a way to set variables via the touchpad.  My integrator said I should get more 6 button light switches, but that's a pain.

I need to be able to set a variable (i.e. Holiday) and see the status of that variable on the touchscreen and/or iPhone app.  Is there any way to do this?

Link to comment
Share on other sites

Alan,  that really doesn't help me.

I just need to see the status of a Variable, like "YomTov=True" indicated by a radio button, checkbox or something like that, which someone could click on to change the name.

I have the interface (see attached photos) but there is no way of indicating which one of these items is chosen.  When they drop down they look the same whether the item is on or off.

IMG_0329.jpg

IMG_0330.jpg

Link to comment
Share on other sites

Alan,  that really doesn't help me.
I just need to see the status of a Variable, like "YomTov=True" indicated by a radio button, checkbox or something like that, which someone could click on to change the name.
I have the interface (see attached photos) but there is no way of indicating which one of these items is chosen.  When they drop down they look the same whether the item is on or off.
IMG_0329.thumb.jpg.71b7eb2ae2f9285bb81a1a8257299208.jpg
IMG_0330.thumb.jpg.9a39099dca82f45e88d34c8f83751cae.jpg
You can do that with UI buttons.

Sent from my Pixel XL using Tapatalk

Link to comment
Share on other sites

Are those available to me in Composer HE?  Do you have an example of how they work/look?

Where can I read about them, I don't see anything other than the ones I created in any documentation...

Link to comment
Share on other sites

That second one looks like it will do the trick.  Alan or msgreen, will it work on an iPhone.  I see the AppleWatch interface so I expect it will work on the phone.  Does it show up as an extra page for a room?

Link to comment
Share on other sites

That second one looks like it will do the trick.  Alan or msgreen, will it work on an iPhone.  I see the AppleWatch interface so I expect it will work on the phone.  Does it show up as an extra page for a room?
It shows under comfort and works on all mobile navigators. No experience with Apple watch

Sent from my Pixel XL using Tapatalk

Link to comment
Share on other sites

I use advanced custom buttons with my android watch via browser and you can change the text of the bottoms dynamically with programming to show status as well as simulate page flips. Will work with any browser.

So you want to set the time the lights turn off ahead of time. I am guessing they will turn on automatically during the day with scheduler programming you have pre-empively set up as well so you don't have to physically intervene?

Link to comment
Share on other sites

OP, why don't you use Alan's HebCal driver? Save yourself headaches and let the system do all the work. The driver has events for Candle Lighting, Havdalah, Shabbath and Yom Tov. You can create lighting scenes based on specific holidays, and these scenes will activate only on those holidays. I program systems using this driver and customers never have to touch anything. If you're pushing one button to activate your holiday scenes, you're pushing way too many.

IMG_1648.JPG?psid=1

Link to comment
Share on other sites

Eddie,

That's my goal.  I had a rough time during the fall holidays trying to get Hebcal to work, turns out we didn't have the zip code set or something like that so I created those buttons.  I have different routines for the different Yom Tovs (i.e, outdoor lights on for Sukkhot, don't turn on alarm for first night of Shavuot for the all nighter, etc.).  

How do you deal with three day Yom Tovs?  Without having ever seen the output I've been worried about going from day to do and not having the system turn back to secular mode (i.e, if the yom tov ends on friday, then you have to say in shabbos mode.).  This year Shavuot starts on Saturday night, so we have to make sure that they house stays in Shabbos mode on Saturday night instead of turning off at havdalah....

I'd love to compare notes and see how you handled some of these issues with Alan's driver.  I'm the guy who convinced him to write it and then couldn't use it for the first year.  Great to hear that you have it working reliably.

That being said, I still want the variable control so we can do things like set the light off time for each day of the holiday (i.e, first night of pesach lights might being going off at 12:30 or 1AM, but if its a 3 day holiday we may want them going off at 10:30 on the last night).

Perhaps we can communicate in private chat.

Link to comment
Share on other sites

In the driver you have Candle Light and Havdalah events,

When Candle Light Begins
When Havdalah Begins

What you do is setup a variable, such as "Holiday Schedule"

When Candle Light Begins
Set Holiday Schedule variable to True
Execute Erev Lighting Scene

When Havdalah Begins
Set Holiday Schedule variable to False

So, no matter how long the holiday is, as long as the Variable "Holiday Schedule" is set to True, the lights will keep working. Basically, Candle Light and Havdalah in the driver are an On/Off switch.

Set the Schedules for the lighting scenes to run every day. I do this so they also work on Yom Tov.
Apply the conditional to the schedules:
If Variable Holiday Schedule is True
Execute Lighting scene. 

Create a pop up on the days there's a holiday and Candle Light Variable is True (Or a notification, or a status like in the photo I posted). This gives customers peace of mind, they know the Erev lighting scene will execute at Candle Light.

The driver is not perfect, I'd like to see more variables and holiday names are not in it at the moment, but it gets the work done. If you want to program based on a specific holiday, things get a little tricky, but I've done it and it works.

I'll be happy to answer any question you have, I've programmed many systems using HebCal and I'll be happy to give you feedback based on my experience with the driver.
 

Link to comment
Share on other sites

Eddy,

Candle Lighting is 18 minutes before sunset and havdalah is 42 minutes after (or longer depending on your custom).  You can have candle lighting and havdalah on the same day (i.e, going from Shabbos into a Yom Tov you would have both of them or Yom Tov into Shabbos).  As I haven't seen the hebcal output I can't really get a handle on it, and I can't monitor it during the holidays since I'm shomer.

I'm not 100% sure of the halacha but havdalah is really a shabbos item so I'm not sure what hebcal sends you at the end of a Yom Tov.  I have my own code that just uses 42 minutes after sunset to de-activate shabbat mode and after a Yom Tov I disable it manually.

My shabbos scenes/schedules run every day.

Attached is the code the starts and stops shabbos automatically, for Yom Tov I go to my phone, choose the length and which one it is, then press a keypad in my pantry.  Shabbos starts automatically and we sometimes change the lights off sequence time (its a staggered shutdown).

I really want to get the Yom Tov's fully automated, primarily because its just really cool.

I was going to use an algorithm to determine the length of the yom tov based on when it started and which one it is (i.e. they are all pretty much 2 days except yom kippur, so if they start on Wednesday you know you have a three day), but if I understood the hebcal output I could avoid all that extra code.

DeactivateShabbatMacro.jpeg

ActivateShabbatMacro.jpeg

ShabbosEnd.jpeg

ShabbosStart.jpeg

Link to comment
Share on other sites

Check the HebCal calendar online so you can see the Candle Light and Yom Tov times. Like I mentioned above, Candle Light and Havdalah in the driver are your On/Off switch regardless of Shabbat or Yom Tov. A simple variable; "Holiday Schedule"; is all I use to program the holiday scenes for clients. I make schedules for Erev, night, morning, lunch, etc. These schedules don't require any variable other than the "Holiday Schedule" variable; it's either a holiday or is not, simple. You can adjust the execution time for both Candle Light and Havdalah in the driver. The driver is set to 50 minutes for Havdalah and 18 minutes for Candle Light, so all you have to do is adjust the time in the properties. If your needs for Yom Tov are different from Shabbat, then use the IS_YOMTOV or IS_SHABBAT conditionals to program.

Instead of using variables for times, why don't you place the commands in a schedule?
I like to label the schedules with "Shabbat" or "Holiday" so I know it's part of the Holiday Schedule. I also number them, so they're easy to follow when I need to make changes, this is the format I use to name my schedules:
1-Shabbat Erev (This is just an example, I actually place the commands for Erev in the Driver and not in a schedule)
2-Shabbat Good Night 10:30pm
3-Shabbat Morning 7:00am
4-Shabbat Noon
5-Shabbat LED Master Keypad 6:30pm
6-Havdalah (Like in Erev, you can place the commands for Havdalah in the driver and not in a schedule)

Use the online calendar to determine if Candle Light and/or Havdalah will trigger on the days you want them to; it hasn't failed the needs of the systems I've programmed. As you can see in the calendar, Shavout falls during Shabbat, but the holiday lighting schedule won't be affected because Havdalah is on Sunday; so the lighting schedule will active Friday at Candle Light and turn off on Sunday after Havdalah. 

This is a link to the calendar in my local time zone:
http://www.hebcal.com/hebcal/?v=1&maj=on&min=on&i=on&year=2018&month=x&yt=G&lg=s&c=on&geo=zip&zip=11385&city=&geonameid=&b=18&m=50&.s=Create+Calendar

You can customize the calendar to your time zone, Candle Light and Havdalah times, mayor and minor holidays.

To create a pop-up or to show a status, you do the programming in the Actions section for the T3 you want the pop-up to show. If you want to have a pop-up or a status telling you the Candle Light time, you'll need Alan's "Variable Manipulator" driver. Telling you how to set it up would require another long post, but the user guide tells you how to do it.

Link to comment
Share on other sites

Eddy,

 

Just to confirm, hebcal does not provide a havdalah time on saturday night if that night is also the beginning of a Yom Tov, nor does it provide it on Friday going into Shabbos?  What do those items return when it isn't triggered? 

That calendar link isn't set for Diaspora, so its only showing 1 day for the Yom Tovs.  When I change the setting it looks correct.  I guess/hope Alan has the driver set to pull for Diaspora or do we have to do something...

 

Link to comment
Share on other sites

Right, no Havdalah time on Saturday if Yom Tov begins on Saturday.

Not sure what you mean by "What do those items return..."? What items? Again, On/Off switch.

The Candle Light times and Havdalah times you see in the online calendar are the times pulled by the driver, if you don't see a Candle Light time or Havdalah time on a specific day then nothing will happen.

The link to the calendar I posted had settings I picked, the driver is getting the info from the HebCal API.

Believe me, it is as easy as it sounds. Candle Light and Havdalah times, On/Off switch and done.

The fun programming part is up to you, but everything can done automatically. Let the system do all the work and never press a custom button.

Link to comment
Share on other sites

Eddie,

Thanks for the help, I'll clean things up and give it a try.  It's certainly easier than what I was contemplating.  I still want/need to check for the actual holidays (so I can change some of the default lighting sequences), the only issue is that we have to do some string manipulation (or have a lot more "if" statements) for the different holidays.

I still need an interface to change the time off times.  You can see my defaults (10:30 in the winter, 11:30 in the summer) - if we have guests we need to push it back.  Not sure what you have done for your clients, but we now have the bedroom lights go of at 10 year round in case someone is tired. We have Kosher lamps in each bedroom and leave bathroom lights on later.

Link to comment
Share on other sites

Eddie,

How do you test for the time since the value changes each day.  There no way that I know of in Composer to say "If CandleLight Time contains a number, then..."

Right now all my code is triggered at candelighting time which is 18 minutes before sunset.  I don't want to rewrite that, so I figured I'd check to see if Hebcal has a time, and then trigger my variables from that.  Is there a way to do an else?

Untitled.jpeg

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.