Announcement

Collapse
No announcement yet.

Device value changes and increases (or decreases) ?

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

  • Device value changes and increases (or decreases) ?

    I have a need to detect increases or decreases in a virtual device value as a trigger to an event. I see EasyTrigger triggers like A device value was and becomes... but what if I don't know values, only that they increase or decrease from previous values? Is it possible to detect this?

    Thanks
    Nathan
    HS 3.0.0.435 (PRO)
    Hardware: Napco GEM-P9600 | VenstarT1800 w/Insteon 2441V adapter | Insteon PLM
    Plugins HS3: Napco Gemini (mine) | Insteon Thermostat (mine) | Insteon Plug-in (mnsandler) | HSTouch Server (HST)
    Platform: Windows 10 Pro 64bit, core2 duo 2.0Ghz, 4GB memory
    http://www.kazteel.com/

  • #2
    I think you may need a second virtual device to store the previous value.

    Then you would need 2 events:

    event 1:
    IF "virtual device" value changes
    THEN run event 2
    THEN wait 1 second // you may need this to be sure that "virtual device old" still contains the old value in event 2 comparison
    THEN set "virtual device old" to "virtual device"

    event 2:
    IF "virtual device old" < "virtual device"
    THEN ....

    Comment


    • #3
      Nathan
      Not sure what you are doing but I have a similar situation where I control a 10 speed house fan. I wrote a script that allows me to use a single vDevice as the "remote". The script detects speed changes made to the remote, up / down / off and sends the proper set of commands to the fan.

      Look for my posted Airscape WHF script.

      Sent from my SM-G950U using Tapatalk

      Comment


      • #4
        Originally posted by Ltek View Post
        Nathan
        Not sure what you are doing but I have a similar situation where I control a 10 speed house fan. I wrote a script that allows me to use a single vDevice as the "remote". The script detects speed changes made to the remote, up / down / off and sends the proper set of commands to the fan.

        Look for my posted Airscape WHF script.

        Sent from my SM-G950U using Tapatalk
        Can you kindly provide a link to your script?

        Comment


        • #5
          what spud provided work great for exactly what you asked but if you need something more complex for control of something using numeric values ...

          Originally posted by NetworkGuy View Post
          Can you kindly provide a link to your script?
          https://forums.homeseer.com/showthre...40#post1315540

          Let me know if you have any questions. You should be able to adapt it to about anything that needs numeric based "control".

          The script is designed for events to pass speed numbers. It could easily be changed to simply read a given device's value - basically by adding one line of code.


          If you don't need to do anything complex

          FYI - google search for "Airscape Homeseer" brings it up, first link. You can always use google searches to find stuff on the forum. Or the forum search engine
          Last edited by Ltek; June 8th, 2018, 03:27 PM.

          Comment


          • #6
            Originally posted by Ltek View Post
            what spud provided work great for exactly what you asked but if you need something more complex for control of something using numeric values ...



            https://forums.homeseer.com/showthre...40#post1315540

            Let me know if you have any questions. You should be able to adapt it to about anything that needs numeric based "control".

            The script is designed for events to pass speed numbers. It could easily be changed to simply read a given device's value - basically by adding one line of code.


            If you don't need to do anything complex

            FYI - google search for "Airscape Homeseer" brings it up, first link. You can always use google searches to find stuff on the forum. Or the forum search engine
            Thanks Ltek, I appreciate that. It's always nice to have scripts that can be used (and/or modified) for my own needs.


            Dave

            Comment


            • #7
              Thanks for all the replies - it's good to have a few different ways to approach this solution.

              Nathan
              HS 3.0.0.435 (PRO)
              Hardware: Napco GEM-P9600 | VenstarT1800 w/Insteon 2441V adapter | Insteon PLM
              Plugins HS3: Napco Gemini (mine) | Insteon Thermostat (mine) | Insteon Plug-in (mnsandler) | HSTouch Server (HST)
              Platform: Windows 10 Pro 64bit, core2 duo 2.0Ghz, 4GB memory
              http://www.kazteel.com/

              Comment

              Working...
              X