This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Set timers in the AM to wake device and keep Digital Signage running | |
Timers in the PM allow device to go into standby but wake when | |
someone enters the room but digital signage only plays for short amount of time once in halwake state | |
*/ | |
import xapi from 'xapi'; | |
const Sunday = 0, Saturday = 6; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//CISCOSPARK_ACCESS_TOKEN=<your token> DEBUG=* node server.js | |
var xmpp = require('simple-xmpp'), | |
http = require('http'), | |
ciscospark = require('ciscospark'), | |
assert = require('assert'), | |
fs = require('fs'), | |
path = require('path'), | |
logger = require('log4js'); | |
logger.configure({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//DEBUG=* node server.js | |
var xmpp = require('simple-xmpp'), | |
http = require('http'), | |
fs = require('fs'), | |
path = require('path'), | |
logger = require('log4js'), | |
sparkMessage = require('./myutils/sparkMethods'), | |
os = require('os'); | |
//Console logging to file | |
logger.configure({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Monitoring service route | |
app.get('/monitor', function(req, res){ | |
var json_response = {'name':'JabberAssist'}; | |
res.status(200).json(json_response); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict" | |
var Monitor = require('ping-monitor'); | |
var websites = require('./websites'); | |
var http = require('http'); | |
var port = process.env.PORT || 3008; | |
var events = require('./events'); | |
var logger = require('log4js'); | |
logger.configure({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Module parses all incoming requests from Spark webhooks and provides the responses for the bot from the node-flint framework. | |
*/ | |
var _ = require('lodash'); | |
var botString = "YourBotName "; | |
module.exports = function(flint){ | |
flint.hears(/(^| ).*( |.|$)/i, function(bot, trigger) { | |
var text = trigger.text; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const jsxapi = require('jsxapi'); | |
const username = 'admin'; | |
const password = 'password'; | |
const url = 'ssh://ip-address' | |
const xapi = jsxapi.connect(url, { | |
username: username, | |
password: password, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function callHistory() { | |
const history = await this.xapi.command("CallHistory Recents", {Limit: 1, DetailLevel: "Full"}); | |
console.log(history); | |
return history; | |
} |
NewerOlder