Inhaltsverzeichnis

Plugin-Daten
AutorAleš Berka (Aleq)
Logo
StatusBETA
Version0.2.31
Min. LB Version1.2.2
Release Downloadhttp://aleq.eu/chromecast4lox/chromecast-4lox-plugin-0.2.31.zip
BeschreibungBasic Chromecast (audio) control for Loxone
SprachenEN
Diskussionhttps://www.loxforum.com/forum/projektforen/loxberry/plugins/174244-chromecast-control-early-access-english

Chromecast 4 Lox

Version History...


Download

Latest version here: http://aleq.eu/chromecast4lox/

Installation

Requires LoxBerry 1.2.2+ (briefly tested to work with 2.2)

  1. Follow the standard installation procedure to install the plugin, just link/upload the ZIP file in/to the LoxBerry Plugin Management.
  2. After the installation, head to the plugin pages in the LoxBerry Web UI and enter the Configuration.
  3. Return to Overview once finished to validate the configuration:
    1. LoxBerry status should say "server running". If not, check your configuration of UDP Port and restart LoxBerry, if still not OK. Check Log, still not OK
    2. Chromecast status should say "Connected". If not, check your configuration of Chromecast IP. Make sure the Chromecast is on the same network (same sub net). See Troubleshooting, tips below
    3. "Replies will be sent to:" section shows the configured Loxone target. Optional.

Plugin function

Plugin contains a server, which listens for UDP commands coming from Loxone Miniserver, performs desired actions on Chromecast and replies results back to Loxone via another UDP transmission.

Supported Chromecast actions:

Configuration

Plugin needs to be configured first. You need to set:

Loxone Config

To control Chromecast:

  1. Create Virtual Output, as address use udp://<loxberry_ip>:<configured_udp_port>
  2. Under this Virtual Output, create desired Virtual output commands. This is a list of supported functions (to be entered into "Command for ON"):
    1. GET_STATUS
    2. GET_VOLUME
    3. SET_VOLUME <v> (Uncheck Use as digital output and copy paste the command including the angle brackets and "v" (less-than and greater_than signs)!
    4. ADJUST_VOLUME 5 (feel free to change 5 to a different number, if you want bigger or smaller volume increase in one step)
    5. ADJUST_VOLUME -5 (feel free to change -5 to a different number, if you want bigger or smaller volume decrease in one step)
    6. PLAY stream_url
    7. PAUSE
    8. QUIT

To receive replies from plugin (OPTIONAL, simple version):

  1. Create Virtual UDP Input, pick any port number, put it into "UDP receive port" and also into the Chromecast 4 Lox configuration, field "Loxone UDP Port"
  2. Under this Virtual UDP Input, add Virtual UDP input commands:
    1. Volume
      1. Uncheck Signed values
      2. Command recognition: "VOLUME \v;" without quotes
      3. Unit: "<v>" without quotes
      4. Minimum value: 0
      5. Maximum value: 100

You can use the UDP monitor (feature of Loxone Config) to explore the replies

UDP communication

You can send multiple commands at once, separated by semicolon ( ; ). Replies always start with asterisk ( * ) and end with semicolon ( ; ). There is no escaping at the moment

Commands (received and recognized by Chromecast 4 Lox)

GET_STATUS

Checks the Chromecast status. Returns free text returned from builtin Chromecast controlling utility prefixed by "STATUS:\n" and ended by ";"

Sample response:

*STATUS: Connecting to 192.168.1.51:8009... Connected [Default Media Receiver] Default Media Receiver Volume: 0.41 ;


GET_VOLUME

Queries Chromecast volume, which is returned as integer value 0-100, prefixed by "*GET_VOLUME_ACK " (including the space) and ended by ";"

Possible responses are:

Sample response:

*GET_VOLUME 41;

SET_VOLUME

Sets the new volume level. Command format "SET_VOLUME number" where number is the volume level, integer, 0-100.

Possible responses are:

ADJUST_VOLUME

Adjusts the new volume level by defined difference (positive or negative for volume increase or decrease). Command format "ADJUST_VOLUME delta" where delta is the volume difference, integer, -100..100, to be added to the current volume level. The purpose of this function is accommodate volume up and volume down operations.

Possible responses are:


Sample command:

ADJUST_VOLUME -10;


Sample response (from a Chromecast having a volume level 65 before the command was processed):

*ADJUST_VOLUME_ACK 55;

PLAY <url>

Plays (casts) remote stream (defined by URL) on Chromecast. Supported formats rely completely on Chromecast, LoxBerry plugin passes just the URL. Command format "PLAY url" where url is the address of the stream. From the Chromecast Help, Chromecast Audio supports: HE-AAC, LC-AAC, MP3, Vorbis, WAV (LPCM), Opus, FLAC with support for high-resolution streams (24-bit/96KHz).

Possible responses are:


Sample command:

PLAY http://amp.cesnet.cz:8000/cro1-256.ogg;


Sample response:

*PLAY_ACK http://amp.cesnet.cz:8000/cro1-256.ogg;

PAUSE

Pauses Chromecast playback. 

Possible responses are:

STOP

Stops Chromecast playback. 

Possible responses are:

QUIT

Closes current app on Chromecast

Possible responses are:


Messages sent to Loxone Miniserver (besides replies to commands described above)

Periodic volume notification

Periodic check of volume (if configured) sends "*VOLUME number;" messages to Loxone upon volume change, where number is the new volume level, integer, 0-100.

Sample message sent to Loxone Miniserver:

*VOLUME 5;

Connection status

Chromecast connection status is reported (if changes) after each communication with the device. Offline message is repeated after each failed attempt. Periodic repeating of the message can be configured on top of this. It is important to understand the status reporting period is dependent on any action on Chromecast. Without it will not report anything, ie. it is recommended to have Periodic volume notification enabled (and the Period of volume notifications should be less or equal to Connection status reporting period).

Messages sent to Loxone Miniserver:


Sample message sent to Loxone Miniserver:

*STATUS_ONLINE;

Road map

To be considered:

Troubleshooting, tips


Known issues, limitations


Questions, bug reports

Vodnici.net, czech Loxone forum

Loxforum.com

E-mail: ales.berka.dev at gmail