Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert module to v3 format #4

Merged
merged 25 commits into from
Jul 17, 2023
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
26e7b81
Convert module to v3 format
peternewman Jun 24, 2023
daca624
Format help Markdown file
peternewman Jun 24, 2023
d7205ac
Fix a lot of the review comments
peternewman Jun 24, 2023
28d4ee3
Fix a few more comments
peternewman Jun 24, 2023
72144d4
Validate that the host and port actually pass their respective regex
peternewman Jul 14, 2023
f10165c
Correct the regex constants and revert to some basic working config c…
peternewman Jul 14, 2023
c56c62b
Only send changed statuses
peternewman Jul 14, 2023
fc7ba8e
Create dependabot.yml
peternewman Jul 16, 2023
afc400c
Merge pull request #1 from peternewman/patch-1
peternewman Jul 16, 2023
73ca46b
Revert "Create dependabot.yml"
peternewman Jul 16, 2023
82f3445
Merge pull request #2 from peternewman/revert-1-patch-1
peternewman Jul 16, 2023
afc8ad0
Revert "Revert "Create dependabot.yml""
peternewman Jul 16, 2023
8957004
Merge pull request #3 from peternewman/revert-2-revert-1-patch-1
peternewman Jul 16, 2023
e9bf8f7
Fix a few more review comments
peternewman Jul 17, 2023
66268da
Try and check dev dependencies too
peternewman Jul 17, 2023
c600579
Merge pull request #4 from peternewman/patch-1
peternewman Jul 17, 2023
feb02a6
Add some dependencies
peternewman Jul 17, 2023
765fd55
Fix package.json syntax
peternewman Jul 17, 2023
a9132d1
Revert to the simpler config for dependency checking
peternewman Jul 17, 2023
8be08e0
Bump @companion-module/tools from 0.5.2 to 1.2.1
dependabot[bot] Jul 17, 2023
96c586e
Bump @companion-module/base from 1.0.2 to 1.4.1
dependabot[bot] Jul 17, 2023
93391a3
Merge pull request #6 from peternewman/dependabot/npm_and_yarn/compan…
peternewman Jul 17, 2023
efcd91c
Merge pull request #5 from peternewman/dependabot/npm_and_yarn/compan…
peternewman Jul 17, 2023
df5f0a7
Merge branch 'v3' into master
peternewman Jul 17, 2023
6046d1c
Merge pull request #7 from peternewman/master
peternewman Jul 17, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{
"env": { es6: true, browser: true },
"extends": [
"eslint:recommended"
],
"env": { "es6": true, "browser": true },
"extends": ["eslint:recommended"],
"parserOptions": {
"ecmaVersion": 9,
"sourceType": "module"
Expand Down
30 changes: 0 additions & 30 deletions HELP.md

This file was deleted.

3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# companion-module-dashare-multiplay
See HELP.md and LICENSE

See [companion/HELP.md](./companion/HELP.md) and [LICENSE](./LICENSE)
144 changes: 108 additions & 36 deletions actions.js
Original file line number Diff line number Diff line change
@@ -1,52 +1,124 @@
exports.getActions = function() {

var actions = {
'go': {
label: 'GO'
exports.getActions = function (self) {
return {
go: {
name: 'GO',
options: [],
callback: async (action) => {
await sendCommand(self, 'go')
},
},
'stop_all': {
label: 'Stop all cue\'s'
stop_all: {
name: 'Stop all cues',
options: [],
callback: async (action) => {
await sendCommand(self, 'stop_all')
},
},
'fade_all': {
label: 'Fade all cue\'s'
fade_all: {
name: 'Fade all cues',
options: [],
callback: async (action) => {
await sendCommand(self, 'fade_all')
},
},
'pause_all': {
label: 'Pause all cue\'s'
pause_all: {
name: 'Pause all cues',
options: [],
callback: async (action) => {
await sendCommand(self, 'pause_all')
},
},
'resume_all': {
label: 'Resume all cue\'s'
resume_all: {
name: 'Resume all cues',
options: [],
callback: async (action) => {
await sendCommand(self, 'resume_all')
},
},
'stopwatch_start': {
label: 'Stopwatch start'
stopwatch_start: {
name: 'Stopwatch start',
options: [],
callback: async (action) => {
await sendCommand(self, 'stopwatch_start')
},
},
'stopwatch_stop': {
label: 'Stopwatch stop'
stopwatch_stop: {
name: 'Stopwatch stop',
options: [],
callback: async (action) => {
await sendCommand(self, 'stopwatch_stop')
},
},
'stopwatch_reset': {
label: 'Stopwatch reset'
stopwatch_reset: {
name: 'Stopwatch reset',
options: [],
callback: async (action) => {
await sendCommand(self, 'stopwatch_reset')
},
},
'advance': {
label: 'Advance current GO position'
advance: {
name: 'Advance current GO position',
options: [],
callback: async (action) => {
await sendCommand(self, 'advance')
},
},
'pause': {
label: 'Pause cue'
pause: {
name: 'Pause cue',
options: [],
callback: async (action) => {
await sendCommand(self, 'pause')
},
},
'resume': {
label: 'Resume cue'
resume: {
name: 'Resume cue',
options: [],
callback: async (action) => {
await sendCommand(self, 'resume')
},
},
'stop': {
label: 'Stop cue'
stop: {
name: 'Stop cue',
options: [],
callback: async (action) => {
await sendCommand(self, 'stop')
},
},
'jump': {
label: 'Jump to near end of cue'
jump: {
name: 'Jump to near end of cue',
options: [],
callback: async (action) => {
await sendCommand(self, 'jump')
},
},
'next_track': {
label: 'Next track in playlist'
next_track: {
name: 'Next track in playlist',
options: [],
callback: async (action) => {
await sendCommand(self, 'next_track')
},
},
'previous_track': {
label: 'Previous track in playlist'
}
};
previous_track: {
name: 'Previous track in playlist',
options: [],
callback: async (action) => {
await sendCommand(self, 'previous_track')
},
},
}
}

return(actions);
async function sendCommand(self, command) {
try {
console.log('sending command: ' + command)
if (command !== undefined) {
if (self.socket !== undefined && self.socket.isConnected) {
self.socket.send(command + '\n')
} else {
console.error('Socket not connected :(')
}
}
} catch (error) {
self.log(`error`, `sendCommand Action Callback Error: ${error.message}`)
}
}
31 changes: 31 additions & 0 deletions companion/HELP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
## Da-Share MultiPlay module

This module connects to the MultiPlay program with a Telnet connection.

> At the moment no data from the player is returned therefor no feedback is provided.
> Make sure to activate the TCP connection: File > Production Properties > Telnet Patches > Command Listen > Port number & ACTIVE

Go to [da-share MultiPlay](https://www.da-share.com/software/multiplay/) for download.

### Commands supported

| Action | Description |
| --------------- | -------------------------------------------------------------------- |
| clear | Clears the Telnet client window |
| version | Reports the MultiPlay version |
| quit | Terminates the Telnet session |
| go | GO at current cue list position |
| stop all | Stop all cues |
| fade all | Fade all cues out |
| pause all | Pause all playing cues |
| resume all | Resume all paused cues |
| stopwatch start | Start the stopwatch |
| stopwatch stop | Stop the stopwatch |
| stopwatch reset | Reset the stopwatch |
| advance | Advance the current GO position |
| pause | Pause the currently selected cue |
| resume | Resume the currently selected cue |
| stop | Stop the currently selected cue |
| jump | Jump the currently selected cue to near the end |
| next track | Jump to next track on the currently selected cue (playlist only) |
| previous track | Jump to previous track on the currently selected cue (playlist only) |
26 changes: 26 additions & 0 deletions companion/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"id": "dashare-multiplay",
"name": "dashare-multiplay",
"shortname": "multiplay",
"description": "Remote control of MultiPlay via Telnet.",
"version": "0.0.0",
"license": "MIT",
"repository": "git+https://github.com/bitfocus/companion-module-dashare-multiplay.git",
"bugs": "https://github.com/bitfocus/companion-module-dashare-multiplay/issues",
"maintainers": [
{
"name": "Jeffrey Davidsz",
"email": "jeffrey.davidsz@vicreo.eu"
}
],
"legacyIds": ["da-share-multiplay"],
"runtime": {
"type": "node18",
"api": "nodejs-ipc",
"apiVersion": "0.0.0",
"entrypoint": "../index.js"
},
"manufacturer": "da-share",
"products": ["MultiPlay"],
"keywords": ["Media Server", "Playback", "Software"]
}
Loading