Announcement

Collapse
No announcement yet.

A bug? Motion Sensor & Dusk/Dawn Sensor Script Package Version 4.30d

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

    A bug? Motion Sensor & Dusk/Dawn Sensor Script Package Version 4.30d

    I think that there may be a little bug someplace in the DD portion of the scripts. At least once a day, I don't know exactly when, a few of my DD sensors loose the image tag in the devicestring setting. It ends up being img="" and this raise cane with the HS web server (causes lots of errors if logging is on) and major delays when rendering the HS status web page.

    When I find out more, I'll let Jim know about it.

    Thanks
    Bryan
    Bryan
    (Config is in my profile)

    #2
    I am not sure but I think you may have a missing value for one of the image file constants. These constants are specified in the my_motion_const.txt file. Here are my settings which are the same ones in the distribution package:

    Const LowBatteryImg = "images/battery.gif"
    Const MotionImg = "images/motion.gif"
    Const NoMotionImg = "images/nomotion.gif"
    Const LightImg = "images/sun.gif"
    Const DarknessImg = "images/sunset.gif"
    Const OccupiedImg = "images/home.gif"
    Const VacantImg = "images/away.gif"

    If the LightImg, DarknessImg, or VacantImg constant is not set, you would see img="" during a DD event.

    If this is not the source of your problem, then I would check any changes you may have made to the my_motion_custom.txt file that may be changing devicestrings of DDs.

    Otherwise, I am at a loss and maybe someone else has a suggestion.

    Jim Doolittle
    Jim Doolittle

    My Twitter
    My Hardware & Software

    Comment


      #3
      Jim

      I have all the constants set properly. I just logged on tonight and all but one DD sensor had nothing in the image tag (it had just changed to dark). I ran my_motioninit.txt to reset them and they all came back fine.

      The only modifications I've done to the my_motion_custom.txt is to turn devices on and off again.

      Bryan
      Bryan
      (Config is in my profile)

      Comment


        #4
        Somehow, I'm still loosing the image tab only on the DD sensors. I added this code to the my_montionsensor.txt in the section for the reoccuring motion sensors. As soon as it ran HS displayed fixed messages for all of my DD sensors and the web page displayed properly.

        (Sorry it looses formatting)
        Bryan


        elseif Right(dev_type, 3) = " DD" Then
        dev_code = dev.hc & dev.dc
        dev_name = dev.location & " " & dev.name
        dev_on = hs.IsOn(dev_code)
        dev_off = hs.IsOff(dev_code)
        dev_mt = hs.DeviceTime(dev_code)
        If dev_off Then
        ' Only update device string if necessary
        If InStr(hs.DeviceStringByName (dev_name),LightImg) = 0 or InStr(hs.DeviceStringByName(dev_name),"Light Detected") = 0 Then
        SetLightString dev_code
        hs.WriteLog "DUSK/DAWN",">>>>>>>> FIXED Light Detected - " & dev_name
        End If
        Call Dusk2DawnLightAction(dev_name)
        Else
        ' Only update device string if necessary
        If InStr(hs.DeviceStringByName(dev_name),DarknessImg) = 0 or InStr(hs.DeviceStringByName(dev_name),"Darkness Detected") = 0 Then
        SetDarknessString dev_code
        hs.WriteLog "DUSK/DAWN","<<<<<<<< FIXED Darkness Detected - " & dev_name
        End If
        Call Dusk2DawnDarkAction(dev_name)
        End If
        Bryan
        (Config is in my profile)

        Comment


          #5
          I am seeing this same behavior on my machine as well. Is there an updated package that is going to be posted soon? I am also using the motion.asp page, don't know if that has anything to do with it or not.

          One other thing I am noticing is that once you get the events set up, anytime you click OK on an event, it says that there is duplicate event names which may cause problems. I wonder is if this has anything to do with it.

          Mike

          Comment


            #6
            I loaded the motion scripts last night.

            Where do you get the VBS module you need for web support? Didn't see it in the zip.

            SteveP

            Comment


              #7
              I don't have any update planned as I do not know what is not working correctly. I would try deleting all motion devices controlled by the script package and then rerun the initialization script. Otherwise, look for duplicate event names and delete one of them. I have seen this error with other events but not those assoicated with the motion script package.

              I am not sure if motion.asp has anything to do with some of the reported problems other than it has some requirements for setting it up that must be followed. I do not currently support the use of motions.asp as I have my own motion charting page. My chart page requires nothing but that all motion activity be logged in HomeSeer and then subsequently stored in UltraLog. My ASP page then charts the information contained in UltraLog totally independent of the scripts themselves.

              If someone points out how I can make the scripts more robust, I will incorporate the code but I am at a loss when the scripts work fine for me. I have progressively updated HomeSeer to each of the latest builds and have encountered no problems with the motion scripts other than problems related to the operation of HomeSeer as a whole (much of that was VR related as I moved from SAPI4 to SAPI5).

              Jim Doolittle
              Jim Doolittle

              My Twitter
              My Hardware & Software

              Comment


                #8
                OK, I removed all of my Events for the motion sensors, recopied in your Motion Scripts again, shut down homeseer, restarted it, ran the my_motioninit.txt and everything is back to normal.

                There must be something wrong with the motion.asp page or related scripts.

                I guess I will hold off for now until that has been fixed.

                Mike

                Comment

                Working...
                X