"My Home Automation Projects"

Devices - Synch

Please also read the Disclaimer

MediaNet - Device Modules - Synch

Purpose: To provide a pseudo device for synchronisation of other devices

This module loads a list (see below) of synchronisation groups which appear as devices in the "control menu" of a device
This pseudo device is used to control all devices attached to it. Once it has at least 1 member it will appear as a device in it's own right

Devices in a synch group still retain local control and display, but all functions are performed on the group (with the exception of volume and mute)
When a device joins a synch group it will remain silent until the next song begins (else press stop/play or next/previous)

Devices may join in to a group in either "tight" or "loose" mode
"tight" mode means a group of devices of the same type supporting synch
"loose" mode means a group of devices of the same or different type being started at the same time
Each group can be configured to specify if devices of a particular type should join in "tight" mode

The synch system allows for a mixture of tight and loose devices in a single group (though where a device in the group is tight, all devices of the same type will also be tight)
You may also have multiple synch groups running, though a device can only be in a single group at any one time!

You can also specify that only a specific device type can use the synch group

The synch system also presents a web control interface for managing synch groups, a link to which can be found on the main web server page
When in synch mode the main web server has the option to globally mute or adjust the volume of all devices by an increment,
but also presents a list of all devices with their current volume and permits adjustment of each device

The synch group get's it's repeat/random/playstyle (clear, append, insert) from the first device to join
The volume level of devices is left intact under full local control

Barcode support is works as normal and may be directed at either the synch group or any member device
Pronto control works as normal
Protocol Interfaces (such as xPL) MUST be directed (other than volume/mute) to the Synch Group
Text-To-Speech is NOT currently supported
The synch device supports OSD menu/status display (if available) and interface control/status messages for protocols such as xPL.

Synch groups appear as devices, but are NOT stored in clients.xml

Note: the current release ONLY supports Synchronisation for Rio/DDAR (loose/tight) and Barix ExStreamer (loose)
Support for other devices will be added soon

LOADER.xml

Most entries in loader.xml are default values assigned to new each synch group

<loader>
    <instance>
        <device module="SYNCH" enabled="y" type="synch" />
          set enabled="n" to disable the use of synch groups
        <settings stats_enabled="y" stats_helper="STATS" />
          specify whether played tracks should be added to the play statistics in the database
        <module>
            <load module="SYNCHDISCOVERY" enabled="y" />
            <web enabled="y" title="Synchronisation Control" port="8086" ppc="y" />
              to disable the synch control web server set enabled="n"
              set title= whatever takes your fancy
              set port= to a free port number for the web server to use
              set ppc="n" to hide this web server from the PPC web server index page

        </module>
          the module section above loads the module that loads the defined synch groups
    </instance>
</loader>

You define the synch groups you require in SYNCHS.xml

<config>
    <synchs>
        <synch enabled="y" title="Synch Any" timeout="20" menusize="4" synchriotight="n" type=""
          osd_enabled="n" osd_device="tonyt-tivoosd.lounge" osd_menu="y" osd_status="y" osd_helper="XPLOSD" />
        <synch enabled="y" title="Synch Rio" timeout="20" menusize="4" synchriotight="y" type="rio"
          osd_enabled="n" osd_device="tonyt-tivoosd.lounge" osd_menu="y" osd_status="y" osd_helper="XPLOSD" />
    </synchs>
</config>

The items are:

enabled="y" or "n" specifies if this synch group is active and should be made available
title= specifies a name for the synch group (same as a device name)
timeout="20" specifies how many seconds before we give up waiting for a device when attempting to play (15 to 60)
menusize="4" specifies the default menu size for the synch device (see below *)
synchriotight="y" or "n" specifies if rio's joining this group should be synch'd tight or loose
type="" to restrict a synch group to a single device type specify it here (e.g. type="rio")
osd_enabled, osd_device, osd_menu, osd_status and osd_helper have the same meaning as for any other device (they can be omitted)

* When a synch group contains multiple device types that support DIFFERENT screen sizes the synch group maintains seperate menu's for each screen size
It normally defaults to 4 (osd always uses 4), if you always use a particular device in a group it's probably worth adjusting menusize to match to save a few resources
e.g. if you mainly use MVP then 10 would be a better default
It's a particularly good idea when using the type= to restrict the group to a single device type to set menusize to the devices own menu size

Remote Controls

All front panel and remote control buttons are mapped via keymap.xml of the relevant device being used to control the synch group

If you want to enable joining/leaving a synch group from the remote control of a device then simply edit keymap.xml for the device(s) as follows in the <device> section

To join groups use <synch_<group> ir="eight" /> where <group> is the synch group name (for spaces use _, no numbers allowed in name)
e.g. <synch_party ir="one" /> or <synch_first_floor ir="three" /> etc

To enable leaving the current synch group use <synch_release ir="nine" />

Obviously ir= can be any spare key