cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2527
Views
0
Helpful
3
Replies

Cisco Touch 10 Action Button Macro (Crestron/Event)

Hi to all,

 

i want to use a cisco touch 10 device to control some crestron devices. For most commands we use the touch 10 module available via Cisco Touch 10 Room Control v1.0 - Crestron Application Market in addition to some widgets (Buttons and Text). That's working fine.

 

The Problem is that i could not find a way to send commands to crestron with Action Button and macros. 

I need to

- send commands with action button and macro to crestron

- or trigger an button event on widget page with the action button and macros

 

Do you have any idea to fix this problem? 

Thank you very much!

3 Replies 3

It is about Air Media Action Button.It is about Air Media Action Button.IMG_2246-1.JPG

Philip Glenn
Level 1
Level 1

Were you able to make this work?

Hi Philip,
it is now working fine with this solution: We added an http-server on the crestron control system listening on specific http-port. At successful connection the crestron ist doing some commands and functions. We just added the following macro behind the action button on cisco panel to connect to the server:

//Basic Code
const xapi = require('xapi');
const api_header = 'Content-Type: application/json';
const HTTP_TIMEOUT = 1;
const data = 'request';

//HTTP Request
//Enter ip adress of crestron control system
function sendrequest() {
var url = 'http://111.222.333.444:5001';
console.log(url);
return xapi.command('HttpClient Get', {
'Url': url,
'Header': api_header,
'Timeout': HTTP_TIMEOUT,
}
).catch(e => console.error('HTTP Command error or Server not reachable'));

}

//Event Listener Action Button AirMedia
xapi.event.on('UserInterface Extensions Panel Clicked', (event) => {
if(event.PanelId === 'cisco_btn_airmedia'){
console.log('Button AIRMEDIA pressed');
sendrequest();
}
});