Announcement

Collapse
No announcement yet.

Showing Time of last ON/OFF in HStouch...

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Showing Time of last ON/OFF in HStouch...

    Is there any way to show the logged status change time on HStouch?

    I created rules and status only devices to show which occupants are currently home. All of that works fine, but I would also like to show the time that they got home or left the house.

    Regards,
    CM
    HomeSeer Version: HS3 Pro Edition
    Operating System: Microsoft Windows 10 Pro
    Processor Type and Speed: i7 - 3.26 GHz
    Total Physical Memory: 16Gig

    Plugins: BlBackup | EasyTrigger | FitbitSeer | HSTouchServer | Insteon | WeatherXML

    #2
    hs.DeviceLastChange("A1")
    Mike

    Comment


      #3
      sorry but I don't know how to use that. I'm really new to HS and haven't figured out everything yet.

      CM
      HomeSeer Version: HS3 Pro Edition
      Operating System: Microsoft Windows 10 Pro
      Processor Type and Speed: i7 - 3.26 GHz
      Total Physical Memory: 16Gig

      Plugins: BlBackup | EasyTrigger | FitbitSeer | HSTouchServer | Insteon | WeatherXML

      Comment


        #4
        Originally posted by codemonkey View Post
        sorry but I don't know how to use that. I'm really new to HS and haven't figured out everything yet.

        CM
        Sorry about that...

        Create a virtual device in HS (for example call it A2), and then you can create an event that triggers when the device (A1) changes and have it run a script like this:

        Sub Status(parm as object)
        hs.setdevicestring("A2",hs.DeviceLastChange("A1"),true)
        End Sub

        The script will populate the device A2 with the date/time when your device (A1) is last updated.
        Mike

        Comment


          #5
          That worked great!! Thank you so much!

          CM
          HomeSeer Version: HS3 Pro Edition
          Operating System: Microsoft Windows 10 Pro
          Processor Type and Speed: i7 - 3.26 GHz
          Total Physical Memory: 16Gig

          Plugins: BlBackup | EasyTrigger | FitbitSeer | HSTouchServer | Insteon | WeatherXML

          Comment


            #6
            Why not using directly [$SCRIPT=&hs.DeviceLastChange("A1")] in HSTouch in Apparence / Text instead of using a script + event ?

            Comment


              #7
              Originally posted by eole View Post
              Why not using directly [$SCRIPT=&hs.DeviceLastChange("A1")] in HSTouch in Apparence / Text instead of using a script + event ?
              There appears to be a known problem with too many [$SCRIPTs] running on HSTouch. I think it can result in memory leaks, which over time bring HS to a halt. By using the script and a ghost device, it eliminates the potential leak.

              I like the inline [$SCRIPT=&hs.... approach better myself, but, if it is used on multiple HSTouch clients, it's less efficient as each client forces HS to run the script once a second to keep it up-to-date. The device method does the script once, and can send updates to the client when it changes.
              huggy_d1

              Automating made easy

              Comment


                #8
                Originally posted by huggy_d1 View Post
                There appears to be a known problem with too many [$SCRIPTs] running on HSTouch. I think it can result in memory leaks, which over time bring HS to a halt. By using the script and a ghost device, it eliminates the potential leak.
                I used to have this problem, but I thought the problem has gone with the last version. But I still use your method for my main screen. For the others screens, I use [$SCRIPT].

                Comment

                Working...
                X