Announcement

Collapse
No announcement yet.

when run event, want to execute COMMAND and as parm , pass value of the vdevice

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

    when run event, want to execute COMMAND and as parm , pass value of the vdevice

    when run event, want to execute COMMAND and as parm , pass value of the vdevice.

    e.g. if button #1234 has value of 23 that just changed to 23, i want event to run that executes command "foo.sh 23"

    is there a way to retrieve current value and place as parm like foo.sh {curvalue}

    #2
    What do you mean by [executes command "foo.sh 23"]?
    You can use a device value as a parameter in a script by calling the functions hs.DeviceValue(1234) or hs.DeviceValueEX(1234).
    You can also use the EasyTrigger plug-in to set a device to the value of another device.
    Can you explain more about what you want to do?
    Mike____________________________________________________________ __________________
    HS3 Pro Edition 3.0.0.548, NUC i3

    HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF | RFXCOM | Vantage Pro | Green-Eye | Edgeport/8 | Way2Call | Ecobee3 | EtherRain | Ubiquiti

    Comment


      #3
      I need a variable exposed by HS and the event trigger.

      when run event, want to execute COMMAND and as parm , pass value of the vdevice that caused the event to trigger.

      Comment


        #4
        Originally posted by geeTee View Post
        when run event, want to execute COMMAND and as parm , pass value of the vdevice that caused the event to trigger.
        Pass the value to what?
        What is the nature of the event trigger?
        Can you post a screen shot of a prototype event?

        Mike____________________________________________________________ __________________
        HS3 Pro Edition 3.0.0.548, NUC i3

        HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF | RFXCOM | Vantage Pro | Green-Eye | Edgeport/8 | Way2Call | Ecobee3 | EtherRain | Ubiquiti

        Comment


          #5
          see the top of thread.

          Comment


            #6
            I don't understand what you mean by 'COMMAND'. Are you referring to a script command? a voice command? a command from a received email? something else?
            To my knowledge 'COMMAND' is not a defined term in HS.

            As I asked in post #2: What do you mean by [executes command "foo.sh 23"]? I do not recognize that structure.
            If you describe what you want to happen as a result of your event action, perhaps that will help.
            Mike____________________________________________________________ __________________
            HS3 Pro Edition 3.0.0.548, NUC i3

            HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF | RFXCOM | Vantage Pro | Green-Eye | Edgeport/8 | Way2Call | Ecobee3 | EtherRain | Ubiquiti

            Comment


              #7
              One additional option, if you are trying to issue a TTS command, you can use the replacement variable $$DVR1234).
              TTS: "The value of device 1234 is $$DVR1234)"

              PS. If you are seeing a face after DVR, that's supposed to be a colon : followed by a paren (
              Mike____________________________________________________________ __________________
              HS3 Pro Edition 3.0.0.548, NUC i3

              HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF | RFXCOM | Vantage Pro | Green-Eye | Edgeport/8 | Way2Call | Ecobee3 | EtherRain | Ubiquiti

              Comment


                #8
                Originally posted by Uncle Michael View Post
                One additional option, if you are trying to issue a TTS command, you can use the replacement variable $$DVR1234).
                TTS: "The value of device 1234 is $$DVR1234)"

                PS. If you are seeing a face after DVR, that's supposed to be a colon : followed by a paren (

                Hi Uncle Michael, I am new to HS's environment so I apologize up front...
                I am converting lots of code I wrote for Vera to HS. One of the things I am trying to understand (related to this thread) is how I can generate a dynamic string to provide as an event parameter.
                My scenario: I am directing a Sonos device to stream a URL but the URL is dynamically generated. I would like to create an event like this:
                Event Action: Sonos Action ("Play URL") and the URL string needs to be dynamically generated (needs a ToD timestamp in it).
                so my questions are:
                a) How can I generate/update a variable to be replaced?
                b) How do I specify a variable replacement in the Sonos Play URL action's URL string (using the variable from step a))?

                I am assuming I could create an event with action #1 executing some code to update some variable. Then create action #2 which specifies the Sonos Play Url action with a URL string that would be something like "http://myserver/%MyVariableName%.

                If you can point me in the right direction I would be very appreciative.

                Thank you. Cheers!



                Comment

                Working...
                X