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
function Monitor (opts) { | |
// default http request method | |
this.method = 'GET'; | |
// holds website to be monitored | |
this.website = ''; | |
//Track status | |
this.webStatus = 'down'; |
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 config = require('./config.json'); | |
var message = require('./myUtils/sparkMessage'); | |
var botToken = "<Your bot token>"; | |
/* | |
Handles events emitted when a websites stop being monitored | |
@param - (String) website - website url | |
*/ |
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
var request = require('request'); | |
var logger = require('log4js'); | |
logger.configure({ | |
appenders: [ | |
{type:'console'}, | |
{type: 'file', filename: 'logs/application.log', catergory:'application'} | |
], | |
replaceConsole: true | |
}); |
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
var TpXapi = require( "./utils/endpoint"); | |
const codecs = ['10.10.10.116']; | |
const videoArray = []; | |
codecs.forEach( function (ip) { | |
const endpoint = { | |
'password':"password", | |
'username':"admin", | |
'ipAddress':ip | |
}; | |
const videoCodec = new TpXapi(endpoint); |
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
//Constructor for creating a endpoint object with video xapi. | |
const util = require('util'); | |
const EventEmitter = require('events').EventEmitter; | |
const jsxapi = require('jsxapi'); | |
//pass in object | |
function TPXapi(endpoint){ | |
this.endpoint = endpoint; | |
this.xapi; | |
this.connectedStatus = 'false'; |
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"; | |
const jsxapi = require('jsxapi'); | |
let camera1active = false; | |
module.exports = class TPXapi { | |
constructor(endpoint) { | |
//super(); |
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 xapi = require('xapi'); | |
const MAINCAMERAID = '1'; | |
const PRESENTATIONCAMERAID = '2'; | |
//var farendCameraToControl = 'MAIN'; | |
var farendCameraToControl = 'PRESENTATION'; | |
var currentCallId = null; | |
var farendpresentationactive = 0; | |
var lastDirection = null; |
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
#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 |
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
#!/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 |