Add device definitions for oppsk-cob-uv-par and lixda-par12-led

Always parse the config as JSON from now on
This commit is contained in:
Sebastian Wiedenroth 2017-07-30 16:39:02 +02:00
parent 9932101db2
commit ec852df0bb
3 changed files with 73 additions and 14 deletions

View file

@ -52,12 +52,48 @@ module.exports = {
}
},
'ultra-pro-24ch-rdm': {
channels: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24' ],
channels: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24' ]
},
'oppsk-cob-uv-par': {
channels: ['dimmer', 'strobe', 'program-speed', 'sound-activity']
},
'lixda-par12-led': {
channels: ['ctrl', 'static-color', 'speed', 'dimmer', 'red', 'green', 'blue', 'white'],
ranges: {
'dimmer': {
'type': 'slider',
'min': 0,
'max': 255
'ctrl': {
'type': 'option',
'options': [
{'value': 0, 'label': 'Off'},
{'value': 11, 'label': 'Static Color'},
{'value': 51, 'label': 'Jump'},
{'value': 101, 'label': 'Gradual'},
{'value': 151, 'label': 'Sound Activate'},
{'value': 200, 'label': 'Strobe'}
]
},
'static-color': {
'type': 'option',
'options': [
{'value': 0, 'label': 'All Color'},
{'value': 40, 'label': 'Red'},
{'value': 50, 'label': 'Green'},
{'value': 60, 'label': 'Blue'},
{'value': 70, 'label': 'Yellow'},
{'value': 80, 'label': 'Cyan'},
{'value': 90, 'label': 'Purple'},
{'value': 100, 'label': 'White'},
{'value': 110, 'label': 'Red + Green'},
{'value': 120, 'label': 'Red + Blue'},
{'value': 130, 'label': 'Red + White'},
{'value': 140, 'label': 'Green + Blue'},
{'value': 150, 'label': 'Green + White'},
{'value': 160, 'label': 'Blue + White'},
{'value': 170, 'label': 'Red + Green + White'},
{'value': 180, 'label': 'Red + Blue + White'},
{'value': 190, 'label': 'Green + Blue + White'},
{'value': 200, 'label': 'Red + Green + Blue'},
{'value': 210, 'label': 'Red + Green + Blue + White'}
]
}
}
}

View file

@ -3,8 +3,10 @@
"listen_port": 8080,
"listen_host": "::",
"comment1": "On linux drop privileges by adding the following lines: uid: www-data and gid: www-data",
"comment2": "On Macos uid and gid must be set in the launchd script."
"_uid": "www-data",
"_gid": "www-data",
"_comment1": "To drop privileges change the '_uid' and '_gid' keys to 'uid' and 'gid'.",
"_comment2": "On macOS uid and gid must be set in the launchd script."
},
"presets": [
{
@ -42,7 +44,7 @@
"office": {
"output": {
"driver": "enttec-usb-dmx-pro",
"device": "/dev/cu.usbserial-6A1KQK87"
"device": "/dev/cu.usbserial-6AVNHXS8"
},
"devices": [
{
@ -68,13 +70,33 @@
{
"type": "stairville-led-par-56",
"address": 76
},
{
"type": "oppsk-cob-uv-par",
"address": 99
},
{
"type": "lixda-par12-led",
"address": 109
},
{
"type": "lixda-par12-led",
"address": 119
},
{
"type": "lixda-par12-led",
"address": 129
},
{
"type": "lixda-par12-led",
"address": 139
}
]
},
"bedroom": {
"output": {
"driver": "dmxking-ultra-dmx-pro",
"device": "/dev/cu.usbserial-6AVNHXS8",
"device": "/dev/cu.usbserial-6AVNHXS9",
"options": {
"port": "A"
}
@ -109,7 +131,7 @@
"livingroom": {
"output": {
"driver": "dmxking-ultra-dmx-pro",
"device": "/dev/cu.usbserial-6AVNHXS8",
"device": "/dev/cu.usbserial-6AVNHXS4",
"options": {
"port": "B"
}

View file

@ -1,6 +1,7 @@
#!/usr/bin/env node
"use strict"
var fs = require('fs')
var http = require('http')
var connect = require('connect')
var express = require('express')
@ -15,7 +16,7 @@ program
.parse(process.argv)
var config = require(program.config)
var config = JSON.parse(fs.readFileSync(program.config, 'utf8'))
function DMXWeb() {
var app = express()