Announcement

Collapse
No announcement yet.

RegisterStatusChangeCB vs. ScriptName/ScriptFunc

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

    RegisterStatusChangeCB vs. ScriptName/ScriptFunc

    I need a virtual device to run a script on any setting of value or text- even if the value itself is unchanged.

    The RegisterStatusChangeCB doesn't work as it only triggers if the status has "changed". The Scriptname/ScriptFunc capabilities of a script created Virtual Device doesn't work - because - well - it just doesn't work period. It seems to be a bug. The script never triggers.

    So...back to the drawing board. Any ideas?

    I can't use event triggers because I have over 24 devices (matrix switcher)...

    Ugh!

    #2
    I need a virtual device to run a script on any setting of value or text- even if the value itself is unchanged.
    When exactly do you need a script to run? With HS3 virtually everything is based on the value of a device changing so even the ScripName functions also work when the device changes value (albeit they have an additional function of triggering when a string changes but really you shouldn't need to be using device strings).

    Comment


      #3
      Originally posted by mrhappy View Post
      When exactly do you need a script to run? With HS3 virtually everything is based on the value of a device changing so even the ScripName functions also work when the device changes value (albeit they have an additional function of triggering when a string changes but really you shouldn't need to be using device strings).
      Here's an example:
      - I have a physical device - A Xantech MX-88 8 channel distribution amp.
      - It can also be independently controlled by a keypad.
      - I have created virtual devices for Power, Input and Volume.
      - I use drule's IP/Serial plugin to send commands to it.
      - Unfortunately, it's pretty dumb and doesn't respond with a status message and therefore, it is entirely possible that the Homeseer device state and the actual device state fall out of sync. For example, Homeseer may show the power as off, when in fact it is on.
      - Then when I click the "off" device button in homeseer, the RegisterStatusChangeCB doesn't trigger, since it thinks it's already off! What I want is to send the OFF commands from script, regardless of what the homeseer thanks is the current status.

      As for ScriptName and ScriptFunc - I can't get these to work at all!
      Would love to know how to get them to work as it's a lot less overhead than RegisterStatusChangeCB.

      Hope that helps explain it!

      Comment


        #4
        OK I'm not sure that the ScriptName function if/when it is fixed will help either, been a while since I used it but my understanding is that it probably works the same as RegisterStatusChangeCB.

        I've had a very quick look at the documentation and it looks as if that you can request data from the unit concerning the zone states, whilst it does not appear you can get a list of a byte of data for all the zones you are likely to be able to get the individual zones quickly. I would say one option available is a single recurring event in HS, query all the zones in quick succession and then set the HS device values, that way then HS should know the true status. You will get a delay in this and I don't know what your limits are concerning how often you would like to poll this but it would at least make sure they are loosely in sync.

        Comment

        Working...
        X