Jump to content
C4 Forums | Control4

Interface for Multiple Variables...


JGLI

Recommended Posts


OK, I had a brain fart when I made the earlier post, I coded around the lack of an "Else" command but can't figure out why this code is returning "True" for both the Start-Shabbat-Holiday and End-Shabbat-Holiday.

Eddie, the reason I need to do it this way is that I don't want the house to go into "Shabbat" mode until right before sunset because it does a lot more than just lighting scenes - it turns changes the mode of the refrigerator automatically, executes a special routine for the ecobee stats to turn off their motion sensors and turn the screen off, disables the alarm beeps, etc. etc.

Below is a screen shot of today's Hebcal Output as well as my "DailyChecker" routine.  Anyone have an idea on why both the start and end are true - today there is candle lighting so Start should be true, but End should be false.

BTW, is there anyway to change the name of this thread to "Hebcal Integration"?

Alan, why doesn't Holiday Name show up in Monitoring (see screen shot below).

 

DailyChecker.jpeg

HebcalStatus.jpeg

Link to comment
Share on other sites

Eddie, how do you program "When CandeLight" begins.  Alan returns a time.  How do you use that? He is showing that it starts at 17:37 today.

Where/how do you write an event that starts when that particular time is hit?

Link to comment
Share on other sites

I just figured it out, I was doing this the hard way.  I just find "Candles" on the left/events and trust that it will work.  That gets rid of a lot of code.  I still don't know why my routine isn't working, but its not relevant.

Link to comment
Share on other sites

13 minutes ago, JGLI said:

I just figured it out, I was doing this the hard way.  I just find "Candles" on the left/events and trust that it will work.  That gets rid of a lot of code.  I still don't know why my routine isn't working, but its not relevant.

Yes, that'll work. You can see the time in the driver's properties. 17:38 in my time zone. You can just set a variable to True in the Candles part of the driver and run everything else with schedules programmed against that variable.

Link to comment
Share on other sites

I'm getting there.  My son is home from college where he is studying CS.  I asked him to look at it and he's said no way, he wants a real programming language and started throwing out terms like enumeration.  Ho hum.

I have to get ready for Shabbos soon and have company coming so I don't want to  break the current code.  I'll try to rewrite everything around the driver before next Shabbos and then work on moving my Yom Tov code to be more automatic so I can set some of the default lighting times set based on the holiday (i.e, we don't finish the seder until around midnight).  I may need the variable manipulator driver so I can work with the text. Three years ago on the walk to shul he said it as ridiculous that this wasn't completely automated.   He was going to try to write the hebcal driver then he want over for his gap year and Alan picked up the task. I'm hoping to have it all automated for Pesach.  Thanks again for the help.  Now we have to spread the word so more people can buy Alan's driver.

Link to comment
Share on other sites

  • 4 weeks later...

I just figured it out, I was doing this the hard way.  I just find "Candles" on the left/events and trust that it will work.  That gets rid of a lot of code.  I still don't know why my routine isn't working, but its not relevant.

Link to comment
Share on other sites

So Hebcal worked during the first two days of Pesach, it would be nice if we could move out of "Holiday/Shabbat" mode before Havdallah, but that's a minor nuisance.

I'm trying to get fancy and have my lights off sequence change for certain holidays, particularly both nights of Passover and the first night of Shavuot.  For some reason this code didn't work on the second day, which Hebcal calls Pesach I.  I check Hebcal for the holiday name at Sunrise and the Light Time off code runs at Sunset.  Sunset was around 7:15 PM on Saturday night, but when we walked in the door at 12:55PM every light was off which means that the lights off sequence had started at 11:30 PM which is the default.  Technically it was Pesach II when the Light Off code ran, but the variable name was set at Sunrise and Hebcal checks at 3AM.

I need another set of eyeballs on this to figure it out.

The code is below, CheckYomTov runs at Sunrise, Light off Logic runs at Sunset.  Technicall, when LightOff runs, the next day has started (i.e. Pesach II started at Sunset on Saturday, but I coded for Pesach I since Hebcal updates at 3AM and my Yom Tov name checker runs at Sunrise).

I can't figure out why the lights started going off at 11:30 saturday night, maybe one of you can see something that I missed.

 

CheckYomTovs.jpeg

LightOffLogic.jpeg

Link to comment
Share on other sites

I had problems with all my systems, the driver didn't update the holiday name and it didn't update Havdalah time either. Both, the names and Havdalah are showing up in the HebCal website, so I don't know what really happened. I'm really disappointed, this is the second time the driver fails to trigger Havdalah events. And this time, it didn't trigger Pesach I events. We really can't afford situations like these.

Link to comment
Share on other sites

The variable "IS_YOMTOV" is false until Candle Light. So if today is Passover for example, the variable will be false when you run the check at 3:00 AM. This will disable any programming you might have because the variable will be false. I do programming  based on the name of the Holiday, this way you can turn on the variable at check in. For example, on Friday the variable "Passover" turned on at 3:00 AM even though the variable "IS_YOMTOV" was still false.

Link to comment
Share on other sites

11 hours ago, eddy.trochez said:

I had problems with all my systems, the driver didn't update the holiday name and it didn't update Havdalah time either. Both, the names and Havdalah are showing up in the HebCal website, so I don't know what really happened. I'm really disappointed, this is the second time the driver fails to trigger Havdalah events. And this time, it didn't trigger Pesach I events. We really can't afford situations like these.

 

I had a problem because the zip code wasn't setup correctly - it took about 3 months to figure out what was wrong. Since then it seems to be OK.  I figured out that Yom Tov problem and am working off the Holiday Name now, I just didn't want to take out all my old code.  I just can't figure out what happened on Pesach I which was the second night.

Link to comment
Share on other sites

Eddie,

Here's the output for today.  I agree that we can't use the Yom Tov boolean because it doesn't turn True until its too late, so we have to work off of Cande Lighting and then the Holiday Name.

Today and tomorrow are "normal" for me in that I let the lights go off at the Default of 11:30.  What happened on your other jobs with Havdallah as trigger to revert back to "secular" mode?  Other than firing later than I want (I want it to switch back at 42 minutes, Havdallah is about 10 minutes later).

April5Output.jpeg

Link to comment
Share on other sites

you are on 2.0.9? that is really really old.  DO you mean 2.9.0.  I am pretty sure from your screenshot you have to be on at least 2.9.0 as 2.0.9 doesn't support the cloud agent from driver central.

Link to comment
Share on other sites

5 hours ago, JGLI said:

Eddie,

Here's the output for today.  I agree that we can't use the Yom Tov boolean because it doesn't turn True until its too late, so we have to work off of Cande Lighting and then the Holiday Name.

Today and tomorrow are "normal" for me in that I let the lights go off at the Default of 11:30.  What happened on your other jobs with Havdallah as trigger to revert back to "secular" mode?  Other than firing later than I want (I want it to switch back at 42 minutes, Havdallah is about 10 minutes later).

April5Output.jpeg

Not having holiday names is a major problem with this driver. I've asked the developer to include them, but no luck. I do program using holiday names, but it's prone to errors. Havdalah in the driver is set to 52 minutes, for my systems is 72 minutes. This shouldn't be a problem though, all you have to do is create a schedule, trigger it at whatever time you want, and program against the Havdalah variable (I'm assuming there's one, can't check right now) The driver feels like "beta"; for lack of a better word; and it has failed in two occasions so far, which is incredibly upsetting. But... It's the only option we have right now.

Link to comment
Share on other sites

I don't think we have a havdalah nor a candle lighting boolean variable , I test for it by searching for "NOT TODAY".  Good idea, I'll set a timer to go off at sunset +42 and then check against havdalah does not equal not today.  72 is hardcore (I think that is Rav Tam).

I'll make that change on Sunday, right now I'm not changing anything going into a two day Yom Tov.

We need to convince Alan to spend a bit more time on this driver so we can see the variable name right here (amongst some other tweaks).

Link to comment
Share on other sites

  • 2 weeks later...

Eddie, 

I discovered something interesting today. I setup an email notification to send me the values of Hebcal at sunrise and it had times for both Candelighting and Havdalah this morning and it said today was Yom Hashoah, which its not.  The gui did not show any of those items.  I sent an email to Alan.

There has to be something going on if the variables output in a macro is different than what is shown in the Properties tab in monitoring.

Link to comment
Share on other sites

Eddie,

I'm pretty sure I figured out the problem.  If you check the status of the variables via an email or some other means (not checking the Properties tab for Hebcal), you'll find that the old values are not cleared.  The last holiday was Yom HasShoah last week and it's still showing up in Holiday Name, and both Candle Lighting and Havdalah are populated with the times from last Shabbos.  If Alan fixes that problem I expect the problems we have both experienced will go away.  

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.