Announcement
Collapse
No announcement yet.
How to determine if tomorrow is not a school day?
Collapse
X
-
How to determine if tomorrow is not a school day?
Last edited by swanie2000; December 17, 2017, 05:21 PM.Tags: None
-
So I guess it starts the night before the first day of school and runs till the next to last day of school (because they do nothing on the last day). So Sundays through thursday night shut it off at 10pm except for the nights before each holdiay. The norm is shutting it off all the time except for the school list and its the night before the day off. then have it turn on next morning after they go to school.
If days sun, mon, tues, wed, thurs, turn off the goodies., then run another event by date
if holiday-1, then enable good stuff for each entry on the day before. This event would folllow the first and override the shut off events by turning them on second.
etc....
hope it helps
Stuart
-
You'd probably have to incorporate a calendar from somewhere. You'd have parent teacher days, and odd off days you'd have to enter. Snow days if you get snow. Maybe the School has a website with an RSS feed for something with a banner that says "School Cancelled" or "Teacher Meeting" that you could grab and parse data from.
Comment
-
When my kids were younger, I did something similar but with different actions. I haven't used it in awhile, but it's based on using homeseer's receiving email capabilities.
I setup a google calendar with a new account where I'd manually enter all days off. I set the calendar's title to "No School".
I then set up email notifications on that calendar, X amount of time before the start time. You can set this in minutes, hours, and more.
I set up homeseer to check for emails on this gmail account matching on from and the subject line setting a virtual device.
I reset the virtual device daily at a set time.
For example, setting up the calendar entry at 12:10 am allows for easy calendar entry matching your kid's school calendar, while you can set the notification to occur 2 hours before the start time, allowing the virtual device to be set by 10:10pm. You can add multiple notifications allowing an earlier notification at 5pm in addition to the 10pm notification trigger.Last edited by lveatch; December 17, 2017, 01:46 AM.Len
HomeSeer Version: HS3 Pro Edition 3.0.0.435
Linux version: Linux homeseer Ubuntu 16.04 x86_64
Number of Devices: 633
Number of Events: 773
Enabled Plug-Ins
2.0.54.0: BLBackup
2.0.40.0: BLLAN
3.0.0.48: EasyTrigger
30.0.0.36: RFXCOM
3.0.6.2: SDJ-Health
3.0.0.87: weatherXML
3.0.1.190: Z-Wave
Comment
-
Great ideas!
I will experiment with (Holiday-1) to see if I can get that to work. I didn't know I could do math with the dates.
I don't know what ifttt is? I will google it.
A separate google calendar, and email receive into homeseer, that seems like it may work for me as well, but it is complicated. I like a good challenge.
Thanks for the ideas! I will start tinkering with them in the morning.
Still open to hearing any other ideas.
Comment
-
While this isn't likely to be on the path you are describing, it may be worth considering a different approach. You can fairly easily turn off the power every Sunday - Thursday night. So, restoring the power on those nights when there is no school the next day is what makes the problem difficult.
Have you considered sending yourself a reminder each day to keep power on? If there's school, ignore it. If there is not school, then manually set the virtual device to allow power to be on. I raise this option, not so much because the automation of it is difficult, but because your personal involvement may be more important than the state of the power to your network switch. Other circumstances may arise that make you want to override the default, too. Just wondering if making this too impersonal may send the wrong message about how important studying and learning are to you.Mike____________________________________________________________ __________________
HS3 Pro Edition 3.0.0.548, NUC i3
HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF | RFXCOM | Vantage Pro | Green-Eye | Edgeport/8 | Way2Call | Ecobee3 | EtherRain | Ubiquiti
Comment
-
I do something similar for my work schedule using Google Calendar and Blades plugins BLGData. Plugin is worth the money IMO. Only problem is you have to enter everything in Google Calendar. But its not bad. You can easily add all M-F and then go back and deselect the holidays etc.
Its also good for birthday reminders and appointments too.
Comment
-
Interesting... I never looked into this and now have found a great use of it.
However, when I tried this, aside from the fact that it worked, it seems that HS complains.
Dec-17 10:45:15 AM Error Getting POP message header, count: 1982 Index: 1234 :The enveloped-data message does not contain the specified recipient.
Dec-17 10:45:15 AM Error Getting POP message header, count: 1982 Index: 384 :The enveloped-data message does not contain the specified recipient.
Dec-17 10:45:15 AM email Initializing email, found 1982 messages
Dec-17 10:45:15 AM email Start checking server for email using POP
Dec-17 10:45:15 AM Startup Initializing email, will check server for new email
Dec-17 10:42:38 AM TTS Speak ():This is a test
Dec-17 10:42:38 AM Event Event Trigger "Calenadar Email Recieve test"
Dec-17 10:42:38 AM Error Getting POP message header, count: 1982 Index: 1234 :The enveloped-data message does not contain the specified recipient.
Dec-17 10:42:38 AM Error Getting POP message header, count: 1982 Index: 384 :The enveloped-data message does not contain the specified recipient.
Is this a bug? What is the default behavior of POP - leave email on server?
I run my own e-mail server which supports calendaring on the same system along side HS3. When the calendar event comes up, the system will send a reminder message. I see that HS logs in without issue... Just the error throws me off.
Have I missed something?
RobertHS3PRO 3.0.0.500 as a Fire Daemon service, Windows 2016 Server Std Intel Core i5 PC HTPC Slim SFF 4GB, 120GB SSD drive, WLG800, RFXCom, TI103,NetCam, UltraNetcam3, BLBackup, CurrentCost 3P Rain8Net, MCsSprinker, HSTouch, Ademco Security plugin/AD2USB, JowiHue, various Oregon Scientific temp/humidity sensors, Z-Net, Zsmoke, Aeron Labs micro switches, Amazon Echo Dots, WS+, WD+ ... on and on.
Comment
-
I'm more comfortable with scripts so this is how I would do it:
Copy the script below and save it in the scripts directory (something like SchoolTomorrow.vb)
Create a virtual device and note its reference number
Change the 1234 in the script to the actual reference number of your device you have just created.
Create a text file called NoSchoolTomorrowDates.txt and save it to your Homeseer Data directory.
In the text file, list the dates where there is no school tomorrow when this falls outside the normal Sunday to Thursday days.
Example:
12/24/2017
12/25/2017
(Make sure there are no spaces in the list including the top).
Run the script at 5:00pm each day from an event and the virtual device will have a value of 1 if there is a school day tomorrow and 0 if not.
Code:Imports System.IO Sub Main(ByVal Parm As Object) Try Dim Path As String = "" Dim FileReader As StreamReader Dim Data As String = "" Dim DayOfWeek As Integer Dim SchoolDayTomorrow As Boolean = True Dim DVRef As Integer = 1234 Path = hs.GetAppPath & "\data\NoSchoolTomorrowDates.txt" FileReader = New StreamReader(Path) DayOfWeek = DateTime.Now.DayOfWeek Select Case DayOfWeek Case 1 To 5 'Sunday To Thursday SchoolDayTomorrow = True Case 6 To 7 ' Friday & Saturday SchoolDayTomorrow = False End Select Do While FileReader.Peek >= 0 Data = FileReader.ReadLine() If Data <> "" Then If DateTime.Now.ToString.Contains(Data) Then SchoolDayTomorrow = False Exit Do End If End If Loop FileReader.Close() If hs.DeviceExistsRef(DvRef) Then If SchoolDayTomorrow Then hs.SetDeviceValueByRef(DvRef, 1, True) hs.SetDeviceString(DVref, "School Tomorrow", True) Else hs.SetDeviceValueByRef(DvRef, 0, True) hs.SetDeviceString(DVref, "No School Tomorrow", True) End If End If Catch Ex As Exception hs.WriteLog("Error", "Error in SchoolTomorrow.vb: " & Ex.ToString) End Try End Sub
Comment
-
Kinda about this, My father "asked nice" of course a didn't listen so he came in and cut the cord off my stereo right in front of me. I think it was right around the time I took an interest in electronics, go figure!
By the way, I have my own now, make sure you can't reach the neighbors wifi from there devices, sneaky little shits!
John
Comment
-
Thanks for all the input and great ideas.
I have had some time to look into this, and I still cannot figure out how you get homeseer to except a "Holiday-1" or any date minus 1 for that matter.
I have already added a huge list of actual dates (special days/holidays) from the school calendar, and cannot get homeseer to do any math with them.
I could get this to work, as mentioned, by selecting the DAY BEFORE, the actual holiday, but I feel this would get confusing, and lead me to errors (selecting the wrong day)
I looked into google calendar, and If This Then That (IFTTT). That solution seems to have a large learning curve, Maybe later I will explore IFTTT.
I do agree the personal touch is important, and I do have a secrete quick way to turn on/off the network when I forget and without logging into homeseer to do it, but I am looking for a way to automate this, so my kids do not need to remind me when I forget.
I am not the best with scripts, but I think I can get my head around the script Jon00 posted. That seems to be the most straight forward approach to this problem.
Thanks to everyone for your ideas!
Comment
-
Originally posted by lj502 View PostKinda about this, My father "asked nice" of course a didn't listen so he came in and cut the cord off my stereo right in front of me. I think it was right around the time I took an interest in electronics, go figure!
By the way, I have my own now, make sure you can't reach the neighbors wifi from there devices, sneaky little shits!
John
I do not give them a computer with WiFi ability, for this exact reason!
Also, I already have my router disabling the WiFi for their phones MAC address at night, but then they just burn through the monthly allowed data from sprint.
Sprint has mobile phone controls, and that service has put a stop to that, but cost another 6 bucks a month.
Comment
-
You could do it the old fashion way and trust them until they break the trust and they will. Then when the trust is broken take away the privilege for, oh say, a month and I'll bet they'd maintain the trust when they get their phones and wifi back. My 27 year old daughter told me a few weeks ago that one of the best things we ever did for her was take her phone, tv, and door (yep bed room door) away for a month when she was 17.
Comment
Comment