cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
44959
Views
160
Helpful
100
Replies

CE9.2.1 Macro Framework discussions

Magnus Ohm
Cisco Employee
Cisco Employee

The new Macro Framework that came with CE9.2.1 allows you to create your own small "features" that runs natively on the codec. You can also create a user interface for your features by combining the In-Room Control feature with the Macro Framework!

 

Please share your ideas, questions, code and anything else related to the newly released Macro Framework. Happy coding!

 

PS: The Macro Framework is currently not supported on the SX10 (N)

 

Please visit the official DEVNET page for ROOM DEVICES. 

https://developer.cisco.com/site/roomdevices/

100 Replies 100

Thanks  for following up!

Yes. We don't need the macro for getting Serial#. 

Yuki Iwagishi
Cisco Employee
Cisco Employee

Cisco Video Endpoint has AGC feature to increase Volume of input. It doesn't appropriate for music. SX80 has AGC on / off by commands. I created small inroom control & macro for AGC control.

Yuki Iwagishi
Cisco Employee
Cisco Employee

On CE9.3, we can get the event by clicking Panel with Panel ID. I modified Quick Dial sample to trigger panel touch.

 

function listenToGui() {
  xapi.event.on('UserInterface Extensions Panel Clicked', (event) => {
      const number = numbers[event.PanelId];
      if (number) dial(number);
  });
}

index.png

 

Gordon Ross
Level 9
Level 9

What would be really cool, is if there was a way to centrally apply macros to devices, rather than having to manually do it on each endpoint.

Please rate all helpful posts.

CE9.3 has introduced bulk backup/recovery feature. TMS and UCM with devicepack supports it for bulk-deployment.

https://www.cisco.com/c/dam/en/us/td/docs/telepresence/endpoint/software/ce9/release-notes/ce-software-release-notes-ce9.pdf

Check P.16-17

I'm confused about which device pack I would need to allow for CUCM 10(5) provisioning of DX and SX endpoints running CE9 and above.

Would anyone know?

Many Thanks in advance

Thanks that's great

Hi, 

 

By chance does someone have a Macro for having an endpoint dial into out at a specific time?

I would like to have our endpoint dial out into our internal bridge first thing in the morning.

 

Thanks, 

Brandon

On CE endpoint Macro editor, there is a sample of "Scheduling" in Macro Tutorial.

 

function schedule(time, action) {
let [alarmH, alarmM] = time.split(':');
let now = new Date();
now = now.getHours() * 3600 + now.getMinutes() * 60 + now.getSeconds();
let difference = parseInt(alarmH) * 3600 + parseInt(alarmM) * 60 - now;
if (difference <= 0) difference += 24 * 3600;
return setTimeout(action, difference * 1000);
}
const StandupTime = '09:00'; const StandupUri = 'macro@polo.com'; const Sunday = 0, Saturday = 6;
function dialStandup() { const weekDay = new Date().getDay(); if (weekDay !== Sunday && weekDay !== Saturday) { xapi.command('Dial', { Number: StandupUri }); } schedule(StandupTime, dialStandup); // schedule it for the next day }
schedule(StandupTime, StandupUri);

 

 

 

Yuki Iwagishi
Cisco Employee
Cisco Employee

Cisco Headset 531/532 has Call button on its remote controller. When I push it, there is an event.

 

*e Audio UsbHeadset CallButton

So I created one button to push by Cisco Headset.

 

const xapi = require('xapi');
// Modify destination number
const dest = "sip:example@example.com";


function dial(number) {
  console.log('dial', number);
  xapi.command('dial', {number});
}

xapi.event.on('Audio UsbHeadset CallButton', () => {
      xapi.status.get('calls')
      // No calls found. Dial
      .catch(() => dial(dest));
});

This is awesome Yuki.

Yuki Iwagishi
Cisco Employee
Cisco Employee

For click to call app, CE can check if it's business hour or not.

 

 

function listenToGui() {
  const now = new Date();
  const weekday = now.getDay() > 0 && now.getDay() < 6;
  const businesshour = now.getHours() > 9 && now.getHours() < 18 && weekday;

  xapi.event.on('UserInterface Extensions Panel Clicked', (event) => {
      const number = numbers[event.PanelId];
      if (businesshour) {
        if (number) dial(number);
      }
      else
      prompt("Notice","Sorry but our receptionist is not available.Please click Call and select Favorites.You can call our department directly.",15);
  });
}

SyntaxEditor Code Snippet

This macro allows to auto restart the device at the time of your choosing:



const xapi = require('xapi'); const intervalSec = 60; function checkTime() { const now = new Date(); const weekday = now.getDay() > 0 && now.getDay() < 6; const wakeupNow = now.getHours() === 14 && now.getMinutes() === 17 && weekday; if (wakeupNow) xapi.command('SystemUnit Boot'); } setInterval(checkTime, intervalSec * 1000);

akoukis
Level 1
Level 1

Hi to all,

 

I try to make Video Composite with two Cisco Precision 60 using In-Room Control and macros. I manage to make it work when the layout is equal but when I try to change it to PIP I take the following error on the editor

 

VideoComposite ReferenceError: identifier 'PIP' undefined
at [anon] (duk_js_var.c:1198) internal
at composite (VideoComposite:20) strict
at [anon] (extensions/xapi.js:6453) strict
at _dispatch (extensions/xapi.js:3962) strict
at [anon] (extensions/xapi.js:3966) strict preventsyield
at forEach () native strict preventsyield
at _dispatch (extensions/xapi.js:3967) strict
at [anon] (extensions/xapi.js:3966) strict preventsyield
at forEach () native strict preventsyield
at _dispatch (extensions/xapi.js:3967) strict
at [anon] (extensions/xapi.js:3966) strict preventsyield
[...]20

 

I have attached my code and from the xAPI guide I found out that the command is 

 

xCommand Video Input SetMainVideoSource ConnectorId: 1 ConnectorId: 2 Layout: PIP

 

How I can convert the above xAPI to a macro?

 

 Best Regards