No announcement yet.

Chromecast Plug-in - User Guide

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

    Chromecast Plug-in - User Guide

    This plug-in is designed to interface Homeseer with any Google Chromecast or any device with Chromecast Built-in (Google Home, Android TV, etc...)


    System Requirements:
    • This plugin is for HS3 or HS3PRO. It works with both Windows and Linux versions
    • .NET Framework 4.5.1 or later, or mono 4.x needs to be installed on your Homeseer machine
    • To auto discover Chromecasts, this plugin needs a Zeroconf implementation (i.e Bonjour) to run on your HomeSeer server.

      On Windows this is the Apple Bonjour service, if you have installed iTunes (or most of other Apple software), it should already be installed.
      If it isn't, you can download it from the following links:
      64bits version:
      32bits version:

      On Linux this is the Avahi daemon. If it is not already installed and running you need to install the avahi-daemon package. On a Debian like distribution the command to install the package is

      sudo apt-get install avahi-daemon

    Plugin Installation:
    Download and install from the updater ("Media" section), or download package from the Beta Testing thread and follow instructions to install.

    Note: On Linux, if you have Mono.CSharp.dll and CSScriptLibrary.dll in the root HomeSeer folder you must move them to the bin folder. (This problem is already fixed on recent HS3 versions)

    sudo mv /usr/local/HomeSeer/Mono.CSharp.dll /usr/local/HomeSeer/bin/Mono.CSharp.dll
    sudo mv /usr/local/HomeSeer/CSScriptLibray.dll /usr/local/HomeSeer/bin/CSScriptLibrary.dll
    Plugin Configuration
    Start the plugin from the "PLUG-INS > Manage" page and go to the config page "PLUG-INS > Chromecast > Config". If everything is ok, you should see one line for each Chromecast the plugin has detected, as well as one line for each group.

    Click image for larger version

Name:	config.png
Views:	1
Size:	47.7 KB
ID:	1211537

    The Test button lets you check if each chromecast is working as expected by sending to it a short announcement message

    The Chromecast plug-in acts as a "Speak Proxy", meaning that Homeseer sends every speak action (i.e TTS) to the plug-in so that it can send it to the chromecasts. If you have another HS plugin that behave as a Speak Proxy you may need to untick the "Forward speak events to HS Speakers" checkbox, otherwise both plugins will forward the same speak action to the HS speakers and you will hear it twice.

    To troubleshoot any problem set the "Log Level" to Debug or enable "Log To File" and set the "File Log Level" to Debug. In the first case the logs are written the HS logs database in the second case the logs are written to the file Logs/Chromecast.txt

    If for some reason the plugin does not automatically discover your chromecasts, you can manually add them:

    Edit Config/Chromecast.ini, and add something like the following lines in the [CHROMECASTS] section

    abcd1234###name=Living Room
    abcd1234###type=Google Home
    abcd1234 is supposed to be the id of the chromecast, you can use any alphanumeric string as long as it is different for each chromecast.
    Then disbale/enable the plugin, you should now see the device in the config page.
    Last edited by spud; November 1, 2017, 02:41 PM.


    To send a Text To Speech (TTS) announcement to your Chromecasts, create some event action of type "Speak Something" like in the screenshot below:

    Click image for larger version

Name:	speak_action.png
Views:	1
Size:	18.3 KB
ID:	1192417

    By default, the speech will be sent to all enabled Chromecasts as well as all HS Speaker Clients. You can target specifics Chromecasts (or specific speaker clients) by clicking on the "Advanced Options" button (plane with red background), then click on the "Edit Speaker Client List" button, and then enter the name of the chromecast exactly as they appear in the config page.
    Note: the chromecasts will NOT automatically appear in the Connected/Added Speaker Clients list, you have to manually add them like in the screenshot below:

    Click image for larger version

Name:	speakerlist.png
Views:	1
Size:	73.1 KB
ID:	1192418


    The plug-in also creates a set of devices for each Chromecast.
    The Root device status shows if the plug-in is currently connected to the Chromecast.
    The Status device let you Stop/Play/Pause the current media or switch to Previous/Next item.
    The Volume device lets you control and monitor the audio volume of the Chromecast
    The Application device shows what application currently run: Youtube, Google Play Music, etc...
    The Title device shows the title of the Media currently playing
    The Image device shows a thumbnail of the Media currently playing

    Click image for larger version

Name:	devices.png
Views:	1
Size:	193.8 KB
ID:	1192793
    Last edited by spud; October 26, 2017, 08:00 AM.



      All the devices created by the plugin can be used as Triggers or Conditions in events using the native trigger type: "A Device's value is...".
      And they can be controlled using the native event Action: "Control Device"

      For example here is an event that use the Volume device to mute a Chromecast

      Click image for larger version

Name:	mute_chromecast.png
Views:	1
Size:	14.7 KB
ID:	1192419

      There is one specific Chromecast Action that lets you cast any video, audio, picture from a URL:

      Click image for larger version

Name:	cast_action.png
Views:	2
Size:	20.4 KB
ID:	1192420

      A large range of audio and video formats are supported, see here for more information.

      Note: you can use the html folder of your HS3 installation directory to store audio and picture files you would like to cast. For example if you copy a song.mp3 file in html/Audio/ then the url of this file will be
      Unfortunately it doesn't seem to work with video files as the HS web server does not seem to handle them.



        here is the function available from scripts:

        void CastMedia(string chromecastId, string mediaUrl, string mediaMimeType, string mediaTitle, string mediaImageUrl)
        void CastWebPage(string chromecastId, string url)
        void GoTo(string chromecastId, double seconds)
        the first parameter being the id of the chromecast as you can see it from the config page of the plugin
        here is a VB script to show how to call this function to cast a video:

        Sub Main(byVal args As String)
            hs.PluginFunction("Chromecast","","CastMedia", new Object() {"7c18b6e417373156b516c3f9113252fa","", "video/mp4", "Casting to the Future", ""})
        End Sub