npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ide_qsys

v1.5.7

Published

programatically get and set data from a Q-Sys core

Downloads

27

Readme

Description

This is a nodeJS tool for uploading code (or component changes) to your Q-Sys core from your IDE

Installation

npm install ide_qsys

Add dependency

const Core = require("ide_qsys");
//or with es6:
import Core from "ide_qys"

Initialize new core instance

this takes an object with 4 arguments

let deployment = new Core({
  ip: "192.168.1.1", //ip address of core
  username: "TestUser", //if authenticated, username
  pw: 1234, //if authenticated, pin number
  comp: "TextController" //component name of code you're updating
})

Authentication

Your Q-Sys core might be hardened with authentication for QRC.

[!WARNING] this is separate from authenticaion on the core itself

Authentication is performed in Q-Sys Administator: Image

Add arguments after initializing

add function will add or modify argruments after initializing

let deployment = new Core();

deployment.ip = "192.168.1.1";
deployment.username = "TestUser";
...etc

console.log(deployment);

Push code to the core

create .lua file

touch updateMe.lua

add code to .lua file

print("this is me adding code")

use update() to update:

deployment.update('updateMe.lua')

... plus 2 optional arguments:

let options = {
  id: "5678", //if not specified, id is 1234
  type: //default is code, but possible to add any control
}

if you add an options.type, then the first argument has to be the value you are changing the component type to:

 deployment.update(true, {type: "Audio.1.visibility"})

Image

Pull data from core (NEW)

you can now pull data from core, and return to object, or stream to file:

deployment.retrieve(options)

...same optional arguments above, plus output for a file name to stream to, as well as verbose for deeper logging, ability to return all data:

let options = {
  id: "5678",
  type: "script.error.count", //if there is no type specified, it pull all controls via GetControls
  output: "data.json",
  verbose: true
}

example:

let core = new Core({
  ip: "192.168.42.148",
  username: "QSC",
  pw: "5678",
  comp: "X32"
})

console.log(await core.retrieve({type: "script.error.count", verbose: true}));

will return:

trying credentials....
Retriving X32's script.error.count
{"jsonrpc":"2.0","method":"EngineStatus","params":{"Platform":"Core 110f","State":"Active","DesignName":"Tutorial_Main","DesignCode":"XavSo9Z8KKC8","IsRedundant":false,"IsEmulator":false,"Status":{"Code":5,"String":"Initializing - 8 OK, 1 Fault, 1 Initializing"}}}
{"jsonrpc":"2.0","result":{"Name":"X32","Controls":[{"Name":"script.error.count","String":"0","Value":0.0,"Position":0.0}]},"id":"1234"}
[
  {
    jsonrpc: '2.0',
    method: 'EngineStatus',
    params: {
      Platform: 'Core 110f',
      State: 'Active',
      DesignName: 'Tutorial_Main',
      DesignCode: 'XavSo9Z8KKC8',
      IsRedundant: false,
      IsEmulator: false,
      Status: [Object]
    }
  },
  {
    jsonrpc: '2.0',
    result: { Name: 'X32', Controls: [Array] },
    id: '1234'
  }
]
server closed connection

and:

console.log(await core.retrieve({type: "script.error.count", output: "test.json"}));

will return:

trying credentials....
Retriving X32's script.error.count
creating file at test.json with return data
{
  Name: 'X32',
  Controls: [
    { Name: 'script.error.count', String: '0', Value: 0, Position: 0 }
  ]
}
server closed connection

...as well as print this data to a test.json file

Questions? Issues and PRs always welcome!