Announcement

Collapse
No announcement yet.

Away Mode Random Lights

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

  • #16
    Tip: If all of your schedules are defined in 5 minute intervals, it is only necessary that the event be run every 5 minutes. The same is true for 10 minutes, 15 minutes, 20 minutes and 30 minutes. In these cases, be sure to check the "Reference to the hour" checkbox on the event trigger.
    Examples:
    Schedules are defined to initiate at 5:00AM, 5:05AM, 5:10AM, etc.; the event can be scheduled to repeat every 5 minutes referenced to the hour.

    Schedules are defined to initiate at 6:00PM, 6:10PM, 7:20PM, etc.; The event can be scheduled to repeat every 10 minutes referenced to the hour.

    Schedules are defined to initiate at 4:00AM, 8:20PM, 8:40PM, etc.; The event can be scheduled to repeat every 20 minutes referenced to the hour.

    Caution:
    If schedules are defined at intervals not matching the event run times, they will never execute.
    Examples:
    If the event runs at 15 minute intervals and schedules are defined as 4:00AM, 5:10AM and 6:30AM. In this case, the 5:10 schedule will never match the run time and never execute.

    If in doubt, simply schedule the event for 1 minute intervals as originally described. The script presents very little load to Homeseer.
    Real courage is not securing your Wi-Fi network.

    Comment


    • #17
      Version 1.3 uploaded.
      I've managed to produce a working HS3 version as well.
      Much more error handling including exception traps for unexpected errors.

      Note for the HS2 version: The data file has been moved from \Homeseer\Data to \Homeseer\Data\RandomLights\

      To upgrade, simply replace the VBEN file in the \Scripts Folder, and move your data file to the new location.

      I would like to produce a ASP.NET version of the Web interface. When this is completed, a final version will become available.
      Real courage is not securing your Wi-Fi network.

      Comment


      • #18
        Greg,

        I'm seeing this error with 1.3.

        ManageRandomLights.csv Not Found!

        I thought the csv file is RandomLights.csv. Nevertheless, I renamed the data file and still no love...


        BTW still creates RandomLights..tmp in the DATA root directory.
        Rob
        HS3PRO 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


        • #19
          Originally posted by langenet View Post
          Greg,

          I'm seeing this error with 1.3.

          ManageRandomLights.csv Not Found!

          I thought the csv file is RandomLights.csv. Nevertheless, I renamed the data file and still no love...


          BTW still creates RandomLights..tmp in the DATA root directory.
          Rob
          I think I mentioned that in the txt file. The file was moved to \Homeseer\Data\RandomLights\. Just move your file into that folder.
          Perhaps I'll look at creating the file if it doesn't exist, but for anyone who happened to have used the earlier versions, it'll look like the schedule has disappeared. And oops. I did forget to change the folder in the ZIP. I'll do that now.
          Real courage is not securing your Wi-Fi network.

          Comment


          • #20
            OK that's Done. To retain your original file, just move it; to have the directory created for you, just download this version again, then copy your original file to the directory. Sorry for the confusion. It's just that this tends to keep the \Homeseer\Data\ directory a little cleaner.
            Real courage is not securing your Wi-Fi network.

            Comment


            • #21
              Sorry... perhaps I wasn't clear. I read the document which states about the new subdirectory...The issue occurs when I click on the link I created for ManageRandomLights.ash. This is when I get the error:

              ManageRandomLights.csv Not Found!

              Script error: File not foundSet objFile = fso.OpenTextFile(datapath & "csv", ForReading)
              If delimiter <> "" Then
              response.write ""
              response.write " " response.write "" Response.Write " " response.write

              I've copied the lastest into the HTML folder.

              Rob
              HS3PRO 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


              • #22
                Originally posted by langenet View Post
                Sorry... perhaps I wasn't clear. I read the document which states about the new subdirectory...The issue occurs when I click on the link I created for ManageRandomLights.ash. This is when I get the error:

                ManageRandomLights.csv Not Found!

                Script error: File not foundSet objFile = fso.OpenTextFile(datapath & "csv", ForReading)
                If delimiter <> "" Then
                response.write ""
                response.write " " response.write "" Response.Write " " response.write

                I've copied the lastest into the HTML folder.

                Rob
                OK. My bad. I forgot to update the web page file. Try one more time.
                This is what happens when I try to juggle two versions of three different projects at the same time. Sorry.
                Real courage is not securing your Wi-Fi network.

                Comment


                • #23
                  Ah... that's better!

                  Thanks.
                  HS3PRO 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


                  • #24
                    Originally posted by langenet View Post
                    Ah... that's better!

                    Thanks.
                    No problem. Glad to help. In retrospect, I ought to have left things alone rather than change on the fly, but I wanted as little difference between the HS2 and HS3 versions as possible.
                    Real courage is not securing your Wi-Fi network.

                    Comment


                    • #25
                      I donno Greg... I just can't seem to make this work.
                      In my test, this is my error - even after a restart of HS.

                      30/11/2014 11:52:00 AM Event Running script in background: Away Mode Random Lights HS2.vben
                      30/11/2014 11:52:00 AM RandomLights Error in record ALL|11:52|Kitchen Counter|On|1|5|15|30 Dim level or On/Off action is not valid
                      HS3PRO 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


                      • #26
                        Although ver 1.1 worked for me, ver 1.3 no longer does.

                        Can't add new schedule; get this error:

                        Script error: Exception from HRESULT: 0x800A0035 (CTL_E_FILENOTFOUND)

                        Set oFile = fso.OpenTextFile(fSource, 8) ' 8=ForAppending
                        sDay = UCase(trim(Request.Form.Item("NewDay")))
                        Also get this error message when event is run:
                        <TABLE style="FONT-FAMILY: Verdana, Arial, sans-serif; WORD-SPACING: 0px; TEXT-TRANSFORM: none; LETTER-SPACING: normal; TEXT-INDENT: 0px; -webkit-text-stroke-width: 0px" cellSpacing=2 cellPadding=0 width="100%" border=0> <TBODY> <TR> <TD class=LOGDateTime1 style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana, Tahoma, Arial, Helvetica, sans-serif; BACKGROUND: rgb(223,223,223); PADDING-LEFT: 3px; PADDING-RIGHT: 3px" noWrap align=left>11/30/2014 1:25:48 PM </TD> <TD class=LOGType1 style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana, Tahoma, Arial, Helvetica, sans-serif; BACKGROUND: rgb(223,223,223); PADDING-LEFT: 3px; PADDING-RIGHT: 3px" colSpan=3 align=left>RandomLights </TD> <TD class=LOGEntry1 style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana, Tahoma, Arial, Helvetica, sans-serif; BACKGROUND: rgb(223,223,223); PADDING-LEFT: 3px; PADDING-RIGHT: 3px" colSpan=8 align=left>Item: ALL|1:30PM|Den Desk Lamp|On|5|10|5|10 Time of day is incorrectly formatted. Conversion from string "30PM" to type 'Double' is not valid.</TD></TR></TBODY></TABLE>

                        tried changing time to 1:30 PM and got this:
                        <TABLE style="FONT-FAMILY: Verdana, Arial, sans-serif; WORD-SPACING: 0px; TEXT-TRANSFORM: none; LETTER-SPACING: normal; TEXT-INDENT: 0px; -webkit-text-stroke-width: 0px" cellSpacing=2 cellPadding=0 width="100%" border=0> <TBODY> <TR> <TD class=LOGDateTime1 style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana, Tahoma, Arial, Helvetica, sans-serif; BACKGROUND: rgb(223,223,223); PADDING-LEFT: 3px; PADDING-RIGHT: 3px" noWrap align=left>11/30/2014 1:53:48 PM </TD> <TD class=LOGType1 style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana, Tahoma, Arial, Helvetica, sans-serif; BACKGROUND: rgb(223,223,223); PADDING-LEFT: 3px; PADDING-RIGHT: 3px" colSpan=3 align=left>RandomLights </TD> <TD class=LOGEntry1 style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana, Tahoma, Arial, Helvetica, sans-serif; BACKGROUND: rgb(223,223,223); PADDING-LEFT: 3px; PADDING-RIGHT: 3px" colSpan=8 align=left>Item: ALL|1:30 PM|Den Desk Lamp|On|5|10|5|10 Time of day is incorrectly formatted. Conversion from string "30 PM" to type 'Double' is not valid.</TD></TR></TBODY></TABLE>
                        Last edited by ameridan; November 30th, 2014, 03:33 PM. Reason: restarted Homeseer

                        Comment


                        • #27
                          Originally posted by langenet View Post
                          I donno Greg... I just can't seem to make this work.
                          In my test, this is my error - even after a restart of HS.

                          30/11/2014 11:52:00 AM Event Running script in background: Away Mode Random Lights HS2.vben
                          30/11/2014 11:52:00 AM RandomLights Error in record ALL|11:52|Kitchen Counter|On|1|5|15|30 Dim level or On/Off action is not valid
                          Originally posted by ameridan View Post
                          Although ver 1.1 worked for me, ver 1.3 no longer does.

                          Can't add new schedule; get this error:


                          Also get this error message when event is run:
                          <table style="FONT-FAMILY: Verdana, Arial, sans-serif; WORD-SPACING: 0px; TEXT-TRANSFORM: none; LETTER-SPACING: normal; TEXT-INDENT: 0px; -webkit-text-stroke-width: 0px" border="0" cellpadding="0" cellspacing="2" width="100%"> <tbody> <tr> <td class="LOGDateTime1" style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana, Tahoma, Arial, Helvetica, sans-serif; BACKGROUND: rgb(223,223,223); PADDING-LEFT: 3px; PADDING-RIGHT: 3px" align="left" nowrap="">11/30/2014 1:25:48 PM </td> <td class="LOGType1" style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana, Tahoma, Arial, Helvetica, sans-serif; BACKGROUND: rgb(223,223,223); PADDING-LEFT: 3px; PADDING-RIGHT: 3px" colspan="3" align="left">RandomLights </td> <td class="LOGEntry1" style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana, Tahoma, Arial, Helvetica, sans-serif; BACKGROUND: rgb(223,223,223); PADDING-LEFT: 3px; PADDING-RIGHT: 3px" colspan="8" align="left">Item: ALL|1:30PM|Den Desk Lamp|On|5|10|5|10 Time of day is incorrectly formatted. Conversion from string "30PM" to type 'Double' is not valid.</td></tr></tbody></table>

                          tried changing time to 1:30 PM and got this:
                          <table style="FONT-FAMILY: Verdana, Arial, sans-serif; WORD-SPACING: 0px; TEXT-TRANSFORM: none; LETTER-SPACING: normal; TEXT-INDENT: 0px; -webkit-text-stroke-width: 0px" border="0" cellpadding="0" cellspacing="2" width="100%"> <tbody> <tr> <td class="LOGDateTime1" style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana, Tahoma, Arial, Helvetica, sans-serif; BACKGROUND: rgb(223,223,223); PADDING-LEFT: 3px; PADDING-RIGHT: 3px" align="left" nowrap="">11/30/2014 1:53:48 PM </td> <td class="LOGType1" style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana, Tahoma, Arial, Helvetica, sans-serif; BACKGROUND: rgb(223,223,223); PADDING-LEFT: 3px; PADDING-RIGHT: 3px" colspan="3" align="left">RandomLights </td> <td class="LOGEntry1" style="FONT-SIZE: 8pt; FONT-FAMILY: Verdana, Tahoma, Arial, Helvetica, sans-serif; BACKGROUND: rgb(223,223,223); PADDING-LEFT: 3px; PADDING-RIGHT: 3px" colspan="8" align="left">Item: ALL|1:30PM|Den Desk Lamp|On|5|10|5|10 Time of day is incorrectly formatted. Conversion from string "30 PM" to type 'Double' is not valid.</td></tr></tbody></table>
                          OK. I'll delete my file and start from scratch with it to find out what might be going on. May be a day or two though.
                          I did add some checks for entering time in several different formats: 13:30, 1:30PM, 1330 should all evaluate to 13:30. This is likely the problem there.
                          The On/Off/Dim problem I wouldn't expect except perhaps from HS3 if the device didn't support the function.
                          I'm assuming you're both on HS2, so I'll concentrate on that.
                          Last edited by Wadenut; November 30th, 2014, 02:45 PM.
                          Real courage is not securing your Wi-Fi network.

                          Comment


                          • #28
                            I think I've found both bugs. I want to let this run tonight, hopefully to be sure nothing else bites me. I'll package up both HS2/3 versions in the morning.
                            Real courage is not securing your Wi-Fi network.

                            Comment


                            • #29
                              v1.4 is ready.

                              Corrected an error where On/Off actions entered in lower case caused an error in the schedule.
                              Time of day is now displayed in AM/PM format for easier reading. Time can still be entered in 24 hour format.
                              Both HS2 and HS3 versions are affected.

                              Please report your results here, either good or bad.
                              Real courage is not securing your Wi-Fi network.

                              Comment


                              • #30
                                Thank you for fixing. Tried HS2 version 1.4 and it worked properly now.

                                Comment

                                Working...
                                X