Announcement

Collapse
No announcement yet.

how do I send the status of a device in a Skype SMS?

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

    how do I send the status of a device in a Skype SMS?

    Hi There.
    I would like to send the status of a specfic device when I send a Skype SMS.
    I there a way to do something like that with the HS webinterface (I can not program).

    Btw. Fantastic plug-in I enjoy it every day.
    Best,
    Jakob Sand, I automate everything!

    #2
    I don't think there is a way to do what you are asking for without creating a small HomeSeer script, because there is no possible parameter substitution in the skype send sms event action.

    You could use the following script, by replacing the phone Number and device code with what you need.

    send_sms.vb

    Sub Main( param As String )

    Dim phoneNumber as String = "+12345678"
    Dim message As String = "Device xxx status=" & hs.DeviceString( "A1" )

    hs.Plugin( "Skype Connector").SendSMS( phoneNumber, message )

    End Sub


    Best regards,

    stipus
    --
    stipus

    Comment


      #3
      Stipus, have you considered calling hs.ReplaceVariables() within your plugin for the arguments of the different actions (place skype call, send skyoe sms, send skype message), and maybe event for the APIs?

      This would add support for the standard HS2 replacement variables in actions defined in the web page without using a script. Please refer to the HS2 manual for the list of built-in replacement variables (I extended it for my plugins/scripts to support replacement variables from INI files, global variables and device name, status code, etc). Glad to share the code if you want it. For more complex logic users can still write scripts.

      Comment


        #4
        Thanks !

        I found this discussion on variable replacements:
        http://board.homeseer.com/showthread...placeVariables

        I think it would be easy to add this replacement function call to the Skype event action parameters.

        I'll look into it !
        --
        stipus

        Comment


          #5
          Glad I could help!

          I updated the procedure since I published it in the mentioned thread to support global variable replacement, call the hs built in replacement variable for the default HS replacement variables (for ease of maintenance/compatibility) and revise my additional replacement variable names to make them non case sensitive (or clash with the built in ones). I can add upload the latest version tonight.

          Comment


            #6
            Shall i wait then?

            Hi Stipus,
            Thank you for the quick response.
            Not being a programmer and reading your and other replys - shall I wait for an update that will enable this or throw my self into the code example you gave?

            Best Jakob
            Best,
            Jakob Sand, I automate everything!

            Comment


              #7
              Here is a new version of the main plugin dll, with variable replacement added.

              Variable replacement is only active from the HS Event Skype Actions (Send Skype SMS for the message, Place Skype Call for the script parameter, Send Skype Message for the message). This is not available from the scripting API from which it's already easy to add HS device strings and names to the messages.

              Looking at the replacement variable thread on the forum, you should be able to set your sms message as:

              The status of the Family Room Light is $$DS:B5

              $$DS:B5 looks to be the way to get the device string for B5. There are other string replacements available. see the thread or doc for more info.

              Regards,

              stipus

              [EDIT] Attachement removed as it's now available from the HomeSeer updater
              Last edited by stipus; October 13, 2008, 08:03 PM.
              --
              stipus

              Comment


                #8
                It works

                Fantastic - Thank you.
                My SMS's just improved dramacally in quality :-)
                Best,
                Jakob Sand, I automate everything!

                Comment

                Working...
                X