Changes

9,403 bytes added ,  09:36, 23 August 2021
Created page with "===MULTIROOM OUTPUT POINT CONTROL INSTRUCTIONS=== setStatus(MR, {SpeakerCmd}); MRID – speaker address, for example 738:30; SpeakerCmd – set of commands, seperated by spac..."
===MULTIROOM OUTPUT POINT CONTROL INSTRUCTIONS===

setStatus(MR, {SpeakerCmd});
MRID – speaker address, for example 738:30;
SpeakerCmd – set of commands, seperated by space.

===List of commands===

{|class="wikitable"
|-
!Parameter!!Value!!Description
|-
|v<br>vol<br>volume||0…250<br>+0…250<br>-0…250||volume level. With "+" or "-" increasing or decreasing volume level by the value
|-
|m<br>mute|0<br>1<br>other||mute on<br>mute off<br>inverse
|-
|p<br>pos<br>position||s.ms<br>h:m:s.ms<br>m:s||position for start playing
|-
|s=1<br>play||||start playing
|-
|s=0<br>stop||||stop playing
|-
|s=4<br>pause||||pause playing
|-
|ss||s.ms<br>m:s||soft start for current track
|-
|ssd||s.ms<br>m:s||default level of soft start, it works for all tracks until the reboot
|-
|r<br>prior<br>priorites||0…250<br>-1||priorities of playing sounds<br>r=-1 send command with the priority of current or last track
|-
|u<br>url||||link to media file
|}
Example:

<syntaxhighlight lang="xml" line>
When script activated , start playing (s=1) to speaker 582:30 with mute off (m=0) from position 1 minute 20 seconds (p=1:20) with volume level 120(v=120),
priority 1 (r=1), soft start 10 seconds 50 milliseconds (ss=10.50), link to media file ("url=http://192.168.1.111/NAME.mp3").
When script turned off, send stop command to speaker 582:30 with priority 1.

<item addr="582:200" name="Play" type="script" uniq_id="5328">
V-ID/V-ADDR
{
if(opt0()) setStatus(582:30,{"v=120 m=0 p=1:20 s=1 r=1 ss=10.50 url=http://192.168.1.111/NAME.mp3"});
else setStatus(582:30,{"stop r=1"});
}
</item>
</syntaxhighlight>

===Previously version of commands (fully supported). SpeakerCmd is array of command code and value to set===

<syntaxhighlight lang="xml" line>
SpeakerCmdPlay = 1, file/link play. Example: setStatus(MRID:30, {1, VOLUME, PRIORITY, "MIDURL"});,
here VOLUME - sound level, PRIORITY - priority, MIDURL - link to media file. Example: setStatus(297:30, {1, 120, 0, "http://192.168.1.125/voice/sirena.mp3"});.
For reproducing from interface to the loudspeaker - setStatus(MRID:30, {1, 180, 0, "mr://INTERFACE_ID:31"}); and to stop broadcasting - setStatus(MRID:30, 0);.
For reproducing from interface to the interface - setStatus(INTERFACE_ID1:30, {1, 180, 0, "mr://INTERFACE_ID2:31"}); and to stop broadcasting - setStatus(INTERFACE_ID1:30, 0);.

SpeakerCmdStop = 0, stop. setStatus(MRID:30, 0);
SpeakerCmdPause = 2, pause. setStatus(MRID:30, 2);.
SpeakerCmdContinue = 3, continue. setStatus(MRID:30, 3);.
SpeakerCmdVolume = 4, sound level setting VOLUME, 0-250. setStatus(MRID:30, {4,VOLUME});.
SpeakerCmdVolumeRel = 5, increment/decrement sound for VOLUME value from the current. setStatus(MRID:30, {5,-VOLUME});.
SpeakerCmdMute = 6, sound off. setStatus(MRID:30, {6,1})- mute off, setStatus(MRID:30, {6,0})- mute on.
SpeakerCmdBalanse = 7, balance.
SpeakerCmdSetUrl = 8, URL play. setStatus(297:30, {8,"http://stream1.lux.fm:8088"});.
SpeakerCmdSeek = 9, playback setting from the position specified in the command, milliseconds from track start, 4 bytes. setStatus(MRID:30, {9,0,1,0,0}); - playback starting from 256 milliseconds.
SpeakerCmdSeekRel = 10, forward/backward winding.
SpeakerCmdPauseReverse = 11, change of the command "pause" into the command "continue" and change from "continue" into "pause" setStatus(MRID:30, 11);
SpeakerCmdSetSyncMaster = 32, synchronise, setStatus(MRID:30,{32,MasterSubID,MasterID_low,MasterID_hi});
SpeakerCmdPlayingSync = 33, synchronise the reproduction on the devices, setStatus(MRID:30,{32,SlaveSubID,SlaveID_low,SlaveID_hi,SlaveSubID1,SlaveID1_low,SlaveID1_hi,...,SlaveSubIDN,SlaveIDN_low,SlaveIDN_hi});
SpeakerCmdPlayingMove = 34, relocate the reproduction on the devices, setStatus(MRID:30,{32,,SlaveSubID,SlaveID_low,SlaveID_hi,SlaveSubID1,SlaveID1_low,SlaveID1_hi,...,SlaveSubIDN,SlaveIDN_low,SlaveIDN_hi});
SpeakerCmdError = 48, error.
SpeakerCmdVolume2 = 0xfe, sound level for binding to dimmer, setStatus(MRID:30,{0xFE,VOLUME});.
SpeakerCmdSeek = 0xFF, change of the command "stop" into the command "continue" and change from "continue" into "stop" setStatus(MRID:30, 0xFF);
</syntaxhighlight>

Mediapoint control PRIORITY (0-lowest level, 250-highest)
If you play with priority 1 and higher, then the interface will have priority 0. Control from the application will not work.

===MEDIA POINT STATUS===

Byte media point status:
0 – SpeakerStatusOffsetState, 0 – off, 1 – is playing, 2 – error, 4 – pause;
1 – SpeakerStatusOffsetVolume, sound level;
2 – SpeakerStatusOffsetMute, Mute status;
3 – SpeakerStatusOffsetBalanse, balance;
4 – SpeakerStatusOffsetPriority, priority;
5 – SpeakerStatusOffsetMsDuration, track length;
9 – SpeakerStatusOffsetMsDuration, track current position;
13 – SpeakerStatusOffsetSyncMasterAddr, device address synchronised with media point;
13 – SpeakerStatusOffsetSyncMasterSubId, device SubID synchronised with media point;
14 – SpeakerStatusOffsetSyncMasterId, device ID synchronised with media point;
16 – SpeakerStatusOffsetSyncSlaveCount, number of devices synchronised with media point. If non-zero values then the devices addresses will be recorded after URL;
17 – SpeakerStatusOffsetURL, tracked URL reference.

The comment as for Multiroom tools tab in the interface:

*'''Message''': reproduction of the message recorded to the speaker (speakers) via the microphone of interface. For recording the messages select speaker (speakers), volume and press to start speaking. After recording the message press the button “stop speaking” and the message will be displayed on the selected speaker.
*'''Synchronize''': reproduction is synchronized between 2 speakers. Upon that two speakers replay media files synchronically, reproduction is managed from the speaker it is synchronized with. For stopping press “stop” on the synchronized speaker.
*'''Move reproduction''': reproduction is moved. At that the reproduction is stopped on the speaker from which it is moved. It is possible to manage the track from the speaker where the reproduction is moved.
*'''Synchronize play list''': play list synchronization.

===Previously version of commands (fully supported). SpeakerCmd is array of command code and value to set===

{|class="wikitable"
|-
!Key!!Name!!Description!!Example
|-
|1||file/link play||start playing, where VOLUME – sound level, PRIORITY – priority, MIDURL – link to media file||<syntaxhighlight lang="xml" line>
setStatus(MRID:30, {1, VOLUME, PRIORITY, "MIDURL"});
setStatus(297:30, {1, 120, 0, "http://192.168.1.111/NAME.mp3"});
</syntaxhighlight>
|-
|0||stop||stop playing||<syntaxhighlight lang="xml" line>
setStatus(MRID:30, 0);
</syntaxhighlight>
|-
|2||pause||pause playing||<syntaxhighlight lang="xml" line>
setStatus(MRID:30, 2);
|-
|3||continue||continue playing||<syntaxhighlight lang="xml" line>
setStatus(MRID:30, 3);
</syntaxhighlight>
|-
|4||volume||volume level setting VOLUME, 0-250||<syntaxhighlight lang="xml" line>
setStatus(MRID:30, {4,VOLUME});
</syntaxhighlight>
|-
|5||change volume by value||increment/decrement sound for VOLUME value from the current||<syntaxhighlight lang="xml" line>
setStatus(MRID:30, {5,-VOLUME});
</syntaxhighlight>
|-
|6||mute||mute on or mute off||<syntaxhighlight lang="xml" line>
setStatus(MRID:30, {6,1}); - mute on
setStatus(MRID:30, {6,0}); - mute off.
</syntaxhighlight>
|-
|8||URL||URL play||<syntaxhighlight lang="xml" line>
setStatus(MRID:30, {8,"http://stream1.lux.fm:8088"});
</syntaxhighlight>
|-
|9||playback starting||playback setting from the position specified in the command, milliseconds from track start, 4 bytes||<syntaxhighlight lang="xml" line>
setStatus(MRID:30, {9,0,1,0,0});
playback starting from 256 milliseconds.
</syntaxhighlight>
|-
|10||-||forward/backward winding.||-
|-
|11||inverse||change of the command "pause" into the command "continue" and change from "continue" into "pause"||<syntaxhighlight lang="xml" line>
setStatus(MRID:30, 11);
</syntaxhighlight>
|-
|32||-||synchronise||<syntaxhighlight lang="xml" line>
setStatus(MRID:30,{32,MasterSubID,MasterID_low,MasterID_hi});
</syntaxhighlight>
|-
|33||-||synchronise the reproduction on the devices||<syntaxhighlight lang="xml" line>
setStatus(MRID:30,{32,SlaveSubID,SlaveID_low,
SlaveID_hi,SlaveSubID1,SlaveID1_low,SlaveID1_hi,...,
SlaveSubIDN,SlaveIDN_low,SlaveIDN_hi});
</syntaxhighlight>
|-
|34||-||relocate the reproduction on the devices||-
|-
|48||-||Error||-
|-
|64||Next track||Change track to next in playlist||<syntaxhighlight lang="xml" line>
setStatus(MRID:30, 64);
</syntaxhighlight>
|-
|65||Prev track||Change track to previous in playlist||<syntaxhighlight lang="xml" line>
setStatus(MRID:30, 65);
</syntaxhighlight>
|-
|0xFE||-||sound level for binding to dimmer||<syntaxhighlight lang="xml" line>
setStatus(MRID:30,{0xFE,VOLUME});
</syntaxhighlight>
|-
|0xFF||-||change of the command "stop" into the command "continue" and change from "continue" into "stop"||<syntaxhighlight lang="xml" line>
setStatus(MRID:30, 0xFF);
</syntaxhighlight>
|}

===Command to controll playlists===
*pl-load – load playlist
*pl-save – save playlist
*pl-play – play playlist
Example:

<syntaxhighlight lang="xml" line>
setStatus(MRID:30, "pl-load:/PL");
setStatus(MRID:30, "pl-save:PL");
setStatus(MRID:30, "pl-play:/PL");
</syntaxhighlight>
where PL – playlist name.