Напишите здесь описание Вашего форума ...
0
Answered

Main and Sub-Server communication possible?

Martin Lang 8 months ago in Tips and Tricks • updated by Aleksandr Romanov (CTO) 2 months ago 1

Hi,


for a touring project we need the ability to remotely control a some devices via a UDP command.

But theres no change to get them all together in a seperate LAN, so the idea came up to use one iRidium Server at the company office working as a "Command"-Server. And using additional iRidium Servers with each device that needs to get an UDP command, and that connected via the Internet.


Here's a schematic picture:


The number on the "Sub Servers" is not constant. So, the plan was to make 1 Sub-Server project that connects to the Main-Server. Is this a possible scenario? And, how to setup the Main iRidium Server to be connected by all of these Sub Servers?


The goal is that a iRidium Client that is connected to the Main iRidium Server (iPad) has a simple Interface and can trigger a Remote-Command to the Main-Server. Then the command should be sent out to all the Sub Servers, and they should send out that command via UDP to a connected MediaPlayer.


Ciao

Martin

0
Completed

To open the player Sonos via the name

Sergey (expert) 2 years ago in Tips and Tricks • updated by Aleksandr Romanov (CTO) 2 months ago 1
You can launch the control of Sonos player, selecting it via the name when you pass to control, with the help of the changed script file (change it in JS module Sonos): Sonos_Control.js


Use the described method to call the player via the name of the group where it's located

Public_SelectGroupByName(name);
If the group isn't found? the other one won't be chosen.
The code of the method:
function SelectGroupByName(name) {     // если групп нет выходим 
    if(groups.length == 0) { 
        debug('groups.length == 0'); return; 
    } 
    // ищем id группы по имени 
    var index; 
    for (var i = 0; i < groups.length; i++) { 
        if(groups[i].name == name) { 
            index = i;
        break; 
        } 
    } 
    // если группу не найдем - выходим 
    if(index == undefined){ return; } 
    // подсветка 
    HighLightSelectedZone(index); 
    // отображение
    group = groups[index]; 
    // повторная подписка для получения актуального состояния плейера
    UnSubscribe(group.parent); 
    Subscribe(group.parent); 
    ToggleOpenVolumeGroup(group.members.length > 0); 
}