Announcement

Collapse
No announcement yet.

Exposed Chromecast functions for scripting (via PluginFunction)

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

    Exposed Chromecast functions for scripting (via PluginFunction)

    From Ver. 3.0.0.62 plugin exposes functions for scripting - via HS PluginFunction function.

    The PluginFunction function takes the function name (listed below) and array of arguments.
    The first argument in the array should be Chromecast ID or Name.

    Note 1: for Chromecast groups using Name is recommended as ID may (does) change.

    Note 2: plugin name has a space after AK: "AK GoogleCast"

    I.e.

    VB
    Code:
    hs.PluginFunction("AK GoogleCast", "", "Speak", New Object() {"131a967da316b73614c56964a67042d2", "Text to speak"})
    hs.PluginFunction("AK GoogleCast", "", "Speak", New Object() {"All House Group", "Text to speak"})
    C#
    Code:
    &shs.PluginFunction("AK GoogleCast", "", "Speak", new object[] {"Bedroom speaker", "Text to speak"});
    &shs.PluginFunction("AK GoogleCast", "", "PlayMediaFile", new object[] {"Bedroom speaker", "Media/Store_Door_Chime.mp3"});
    &shs.PluginFunction("AK GoogleCast", "", "Control", new object[] {"Bedroom speaker", -1008});
    All Chromecast device functions can be executed this way, most useful:

    1. Speak(string text)

    2. PlayMediaFile(string fname)

    Note: fname can be absolute or relative to HS root folder

    3. SendMedia(string ContentId, string ContentType)

    Note: ContentId may be a URL or Webpage (ContentType = "iframe")

    4. SetMute(bool mute)

    5. Play, Pause, Stop, Prev, Next, Rewind, Forward, Disable

    6. Control(int state)

    Most states are available via shortcut functions above (except for LOAD and SEEK).

    Note: functionality depends on the particular app running in the device, some states may not be supported by some apps.

    List of states (note: negative numbers):
    Value Comment
    ENABLE -1000 Enable Chromecast
    DISABLE -1001 Disable Chromecast
    STOP -1006
    PAUSE -1007
    PLAY -1008
    REWIND -1010
    FORWARD -1011
    PREVIOUS -1012
    NEXT -1013
    LOAD -1014 Load current content displayed in ContentID HS device
    SEEK 1-100 Move current track position in %

    #2
    Good Morning, First I want to Commend you on an actual Plugin that is fully functional. I have watched this one mature from inception. I purchased it yesterday and it work flawlessly.
    My configuration is as follows HS4PRO Ver 4.1.4.0- on a Virtual Windows 2019 Server- irunning on VMWare Fusion - on a wired network - connecting to the Google Home Hubs on WiFI in a different subnet and VLAN. Now for my question based on the above is it possible to after an event trigger to send a command to Google Home Hub to display the nest Cam in that area and then stop and resume the picture roll I currently have running. Kudo's to your work !!!!!

    Comment


      #3
      Originally posted by rmies1 View Post
      Good Morning, First I want to Commend you on an actual Plugin that is fully functional. I have watched this one mature from inception. I purchased it yesterday and it work flawlessly.
      My configuration is as follows HS4PRO Ver 4.1.4.0- on a Virtual Windows 2019 Server- irunning on VMWare Fusion - on a wired network - connecting to the Google Home Hubs on WiFI in a different subnet and VLAN. Now for my question based on the above is it possible to after an event trigger to send a command to Google Home Hub to display the nest Cam in that area and then stop and resume the picture roll I currently have running. Kudo's to your work !!!!!
      It's late afternoon in Australia Good morning. And thank you.

      It's a good idea to post either in
      https://forums.homeseer.com/forum/me...atures-request or
      https://forums.homeseer.com/forum/me...e-introduction or
      open a new thread.

      This thread is about using the plugin in scripting, which I don't think you want.

      I'm not sure how to display the nest cam on the home hub. Does the Nest Cam has a url for fetching the feed?

      Probably a new thread is better - for others to contribute.

      Comment


        #4
        will investigate and get back to you and place in features

        Comment


          #5
          Originally posted by rmies1 View Post
          will investigate and get back to you and place in features
          Thank you. Better start a new thread. It may become a long discussion

          Comment

          Working...
          X