Announcement

Collapse

Contacting HomeSeer This Week

HomeSeer is open and operational this week. All orders are being processed and shipped as usual. However, some staff are working from home. If you need to contact HomeSeer for support or customer service, please use our Email or Chat options. https://homeseer.com/contact-us/
See more
See less

HSTouch Date Incrementing

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • HSTouch Date Incrementing

    So I figured out how to put a text box with the current day of the week, but I'm having difficulties incrementing the date so that I can put a bunch of days of the week.

    So in the Text property of the Text box I put in [$DATE=dddd] which gives me Wednesday, I was hoping I could do something like [$DATE+1] to get Thursday, but this didn't work. Is there a way to increment the current date?

  • #2
    I think you have to do this via script and virtual devices. Think this thread might help you if new to scripting. If you use weatherXML you can get the info from that as it saves a 7 day forecast from the current day.

    Originally posted by ViperJD View Post
    I got it, thanks.

    here is the current VB Script if anyone is interested:

    Code:
    ' Good Morning
    ' by JD Taylor
    ' -----------------------------------------------------------------------------------------------------------
    ' This script will say good morning and check weekly activities
    '
    ' Syntax is: GoodMorning.txt
    '
    ' ex: GoodMorning.txt
    '
    ' -----------------------------------------------------------------------------------------------------------
    
    Sub Main(parm as object)
    
    Dim DayOfWeek as Integer
    
    
    ' hs.WriteLog "GoodNight.txt", strLog
    
    hs.speak("Good Morning, it is ")
    
    
    DayOfWeek = now.DayofWeek
    
    If DayOfWeek = 0 then
    hs.speak("Sunday")
    ElseIf DayOfWeek = 1 then
    hs.speak("Monday")
    ElseIf DayOfWeek = 2 then
    hs.speak("Tuesday")
    ElseIf DayOfWeek = 3 then
    hs.speak("Wednesday")
    ElseIf DayOfWeek = 4 then
    hs.speak("Thursday")
    ElseIf DayOfWeek = 5 then
    hs.speak("Friday")
    ElseIf DayOfWeek = 6 then
    hs.speak("Saturday")
    End If
    
    If hs.DeviceValue(280) < 25 then 'Is the Feels like temp below 25 F?
    hs.speak("Wow, it is cold out!")
    End If
    
    hs.speak("The temperature outside is " & (hs.DeviceValue(271)) & " degrees, and feels like " & (hs.DeviceValue(280)) & " degrees")
    
    End Sub
    Output looks like:
    Code:
    System Control Panel Immediate Script: &hs.Runscript("GoodMorning.vb",True,True)
    TTS Speak ():Good Morning, it is
    TTS Speak ():Tuesday
    TTS Speak ():Wow, it is cold out!
    TTS Speak ():The temperature outside is 32 degrees, and feels like 24 degrees

    Comment

    Working...
    X