Skip to content

Instantly share code, notes, and snippets.

const xapi = require('xapi');
xapi.event.on('UserInterface Extensions Panel Clicked', (event) => {
if(event.PanelId === "web_wbxDemo"){
xapi.command("UserInterface WebView Display", {
URL: "https://youtube.com/embed/zIYzXOE4Ojk?autoplay=1&controls=0"});
}
});
const xapi = require('xapi');
xapi.event.on('UserInterface Extensions Panel Clicked', (event) => {
if(event.PanelId === "web_projectwrkpl"){
xapi.command("UserInterface WebView Display", {
URL: "https://projectworkplace.cisco.com"});
}
});
const xapi = require('xapi');
var IP = "<IP of HDMI Switch>";
function switchHDMI(source){
var url = `http://${IP}/aj.html?a=command&cmd=x${source}AVx1`;
xapi.command('HttpClient Get', {Url: url})
.then((data) => {
console.log(data)
}).catch(err => {console.log(err)})
<Extensions>
<Version>1.5</Version>
<Panel>
<PanelId>panel_1</PanelId>
<Type>Statusbar</Type>
<Icon>Input</Icon>
<Order>1</Order>
<Color>#A866FF</Color>
<Name>Input Control</Name>
<Page>
@voipnorm
voipnorm / SipMessageChannelMacro.js
Last active July 26, 2019 16:44
CE Macro for allow remote camera control
const xapi = require('xapi');
const MAINCAMERAID = '1';
const PRESENTATIONCAMERAID = '2';
//var farendCameraToControl = 'MAIN';
var farendCameraToControl = 'PRESENTATION';
var currentCallId = null;
var farendpresentationactive = 0;
@voipnorm
voipnorm / blync_public.py
Last active July 22, 2019 20:09
BlyncLight Project in Python
#!/usr/bin/env python3
#Simple project to monitor and control a BlyncLight. Some helpful links to make this work:
#https://joshspicer.com/python37-ssl-issue
#https://github.com/cisco-ce/pyxows
#https://pypi.org/project/blynclight/
#https://github.com/signal11/hidapi
#https://kb.mccdaq.com/KnowledgebaseArticle50608.aspx?Keywords=Linux&Keywords=Linux
from pyxows import xows
#accept input data and keys "Status" and "Call"
async def nested_get(input_dict, nested_key):
internal_dict_value = input_dict
for k in nested_key:
internal_dict_value = internal_dict_value.get(k, None)
if internal_dict_value is None:
return None
#test to ensure Status is part of the new list
const ciscoTPClient = require('cisco-tp-client');
const express = require('express');
const app = express();
const bodyParser = require('body-parser');
const port = 3000;
const ip = '<endpoint-IP>';
const serverip = 'http://<server-IP>:3000/';
const status = ["/Status/Audio/Volume"];
const jsxapi = require('jsxapi');
const username = 'admin';
const password = 'password';
const url = 'ssh://ip-address'
const xapi = jsxapi.connect(url, {
username: username,
password: password,
const WebSocket = require('ws');
const XAPI = require('jsxapi/lib/xapi').default;
const WSBackend = require('jsxapi/lib/backend/ws').default;
const url = 'ws://codecip/ws';
const username = 'admin';
const password = '';
const auth = Buffer.from(`${username}:${password}`).toString('base64');
const options = {