Coder Social home page Coder Social logo

bitfocus / companion-satellite Goto Github PK

View Code? Open in Web Editor NEW
78.0 19.0 16.0 3.14 MB

Satellite Streamdeck connector for Companion

License: MIT License

TypeScript 80.98% JavaScript 8.86% Dockerfile 1.32% Shell 6.88% HCL 1.20% NSIS 0.15% HTML 0.59% SCSS 0.02%
companion streamdeck elgato elgato-stream-deck

companion-satellite's Introduction

Companion Satellite

License Version

A small application to allow for connecting a streamdeck to Bitfocus Companion over a network.

Companion 2.2.0 and newer are supported

Each device will appear in companion as its own 'satellite' device, and can be configured as if they are local.

Note: This connects over the satellite device api which uses port TCP 16622.

Satellite Getting Started

Getting started

You can find installers on the BitFocus website

Raspberry Pi

A prebuilt image is provided for recent releases. Check the releases tab for the latest image.

After writing the image to an sd card, edit the satellite-config file in the boot partition to point to your companion instance.

Desktop

This application can be built with electron to provide a minimal ui and to allow for minimising to the system tray. You can right click the tray icon to:

  • Set the ip address of the companion instance to connect to
  • Force a manual scan for devices. This is done automatically when a new device is detected, but it can sometimes miss some

To manually build the latest version for your machine:

  • yarn install
  • yarn dist
  • Locate the output under electron-output/

Manual Headless / Raspberry pi

If using a Raspberry Pi, we recommend using the 64bit 'Raspberry Pi OS Lite' images, the non-64bit version should work too but it less tested.
If using a different brand SBC, we recommend running Armbian specifically the minimal debian images, as this provides a minimal and consistent debian environment and are typically more up to date then the manufacturer images.

It can be built and run as a systemd service on a pi or other linux machine

No images are provided for this, but the process has been written to be a single script.

As root, run the following:

curl https://raw.githubusercontent.com/bitfocus/companion-satellite/main/pi-image/install.sh | bash

After this, you can use sudo satellite-update to change the version it has installed. Note: this is currently not fully implemented.

Note: This script will create a new user called satellite, which Satellite will be run as and will own the configuration.

REST API

The default rest port is 9999 a GET request to http://Satellite-IP:9999/api/host will return the current target ip in plain text a GET request to http://Satellite-IP:9999/api/port will return the current target port in plain text a GET request to http://Satellite-IP:9999/api/config will return the current target port and ip as json

a POST request to http://Satellite-IP:9999/api/host with json body {"host": "newhostip"} or plain text newhostip will connect the satellite to that ip or hostname a POST request to http://Satellite-IP:9999/api/port with {"port": 16622} or plain text 16622 will connect the satellite to that port a POST request to http://Satellite-IP:9999/api/config with {"host": "newhostip", "port": 16622} will connect the satellite to that ip/hostname and port

Development

NodeJS 18 is required

Electron

  1. Install the dependencies yarn install
  2. Ensure the electron dependencies are installed yarn electron-rebuild
  3. Run it yarn dev-electron

You can package for electron with yarn dist.
Building for another platform has not been tested.

Headless

  1. If you are running this after either running in electron, or packaging for electron, it is best to remove the node_modules folder and rerun yarn install
  2. Run it yarn dev 127.0.0.1 substituting in your companion instance ip address

companion-satellite's People

Contributors

alex-arc avatar brianteeman avatar companion-module-bot avatar dependabot[bot] avatar hammady avatar jeffreydavidsz avatar josephdadams avatar julusian avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

companion-satellite's Issues

Rasperry image has no LAN drivers?

This might be a stupid question, so I am sorry in advance, but when i install the Pi image to my 1B+ the LAN port doesn'T work.

So I was wondering if the Pi image maybe is missing the NIC drivers?

Received unhandled command: BEGIN

Using the latest beta build of Companion (2.2.0+3975-beta-37696128) and latest master on a Raspberry Pi 3B+. Running into this error when I run dev:

pi@satellite:~/companion-satellite $ yarn dev 192.168.88.53
yarn run v1.22.17
$ yarn ts-node src/main.ts 192.168.88.53
$ /home/pi/companion-satellite/node_modules/.bin/ts-node src/main.ts 192.168.88.53
Starting
Connecting to 192.168.88.53:16622
Connected
connected
registerAll []
Received unhandled command: BEGIN CompanionVersion=2.2.0+3975-beta-37696128 ApiVersion=1.1.0

So it seems like they're noticing each other, but the satellite isn't displaying in the Surfaces tab.

Lockout pin pad not shown

I'm trying the Companion-remote on the RPi 4 and everything runs fine. I activated the lockout function in Companion but unfortunately, It seems that it's not sending back the actual pin pad characters. If I press the buttons they are working and I can input the pin, but I can't see what I'm pressing.
If I connect streamdeck directly to companion it works.

Any thoughts? Maybe even a hint where I can modify the code to allow it happen. Thank you!

Companion version: 2.2.0
Companion remote: (latest)
RPI 4: 8GB model
Node version 14.16.0
Streamdeck: XL (32 buttons)

Improve readme.md by adding dev howto

Which node.js version? Info about the different commands, etc.

❯ node -v
v12.19.1

~/Dev/companion-remote master
❯ yarn dev-electron
yarn run v1.22.10
$ yarn build:main && electron dist/electron.js
$ tsc -p tsconfig.build.json
App threw an error during load
Error: The module '/Users/williamv/Dev/companion-remote/node_modules/usb-detection/build/Release/detection.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 72. This version of Node.js requires
NODE_MODULE_VERSION 82. Please try re-compiling or re-installing```

Add device failed: {"ERROR":true,"MESSAGE":"Device exists elsewhere"}

Any idea what is causing this?

Apr 17 15:53:49 deckconnect08 node[1627]: Starting
Apr 17 15:53:49 deckconnect08 node[1627]: adding new device: 0001:0002:00
Apr 17 15:53:49 deckconnect08 node[1627]: existing = []
Apr 17 15:53:49 deckconnect08 node[1627]: Registering key events for AL49J2C11001
Apr 17 15:53:49 deckconnect08 node[1627]: Connecting to 192.168.113.101:16622
Apr 17 15:53:49 deckconnect08 node[1627]: Connected
Apr 17 15:53:49 deckconnect08 node[1627]: connected
Apr 17 15:53:49 deckconnect08 node[1627]: registerAll [ 'AL49J2C11001' ]
Apr 17 15:53:49 deckconnect08 node[1627]: Connected to Companion: CompanionVersion=2.2.0+4003-493404d6 ApiVersion=1.1.0
Apr 17 15:53:49 deckconnect08 node[1627]: Add device failed: {"ERROR":true,"MESSAGE":"Device exists elsewhere"}

Primary/Secondary companion instance option

It would be useful to be able to switch the companion ip in a couple of clicks.
This will allow for primary/backup flows, and other workflows.

I think it would be best implemented as having a submenu in the tray of known instances, being able to edit that list freely, and switching the active one by selecting in the list

Local Companion Crashing 2.1.4 (b03d4f0f-2714) [BUG]

I attempting to connect to my host device running 2.1.4 (b03d4f0f-2714). I've changed the ip and included the port. What I'm I doing wrong?

I used the prebuilt installer for mac(V.0.4.0).

Do I need the Stream Deck or Companion softwere running on the remote computer?

Thanks!

update dev rules for StreamDeck Mini

Looks like there is a new version os the mini with different product ID

Bus 003 Device 002: ID 0fd9:0090 Elgato Systems GmbH Stream Deck Mini

Bus 003 Device 002: ID 0fd9:0090 Elgato Systems GmbH Stream Deck Mini
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x0fd9 Elgato Systems GmbH
  idProduct          0x0090 
  bcdDevice            1.10
  iManufacturer           1 Elgato Systems
  iProduct                2 Stream Deck Mini
  iSerial                 3 BL22L2BXXXXX
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x0029
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.10
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength     217
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 1024 bytes
        bInterval               1
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            0 
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0000
  (Bus Powered)

Error on install Raspberry Pi

Hello,

I'm having a heck of a time getting this to run on a headless pi. Can you help? I've installed nodejs, and cloned companion-satellite. Here's the output when I run yarn install...

pi@raspberrypi:~/companion-satellite $ yarn install
yarn install v1.22.15
[1/5] Validating package.json...
[2/5] Resolving packages...
warning Resolution field "[email protected]" is incompatible with requested version "[email protected]"
[3/5] Fetching packages...
[4/5] Linking dependencies...
[5/5] Building fresh packages...
[-/8] ⠐ waiting...
[-/8] ⠐ waiting...
[3/8] ⠈ sharp
[4/8] ⠈ usb-detection
error /home/pi/companion-satellite/node_modules/usb-detection: Command failed.
Exit code: 1
Command: prebuild-install || node-gyp rebuild
Arguments:
Directory: /home/pi/companion-satellite/node_modules/usb-detection
Output:
prebuild-install WARN install No prebuilt binaries found (target=14.18.1 runtime=node arch=arm libc= platform=linux)
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | arm
gyp info find Python using Python version 2.7.16 found at "/usr/bin/python"
gyp http GET https://nodejs.org/download/release/v14.18.1/node-v14.18.1-headers.tar.gz
gyp http 200 https://nodejs.org/download/release/v14.18.1/node-v14.18.1-headers.tar.gz
gyp http GET https://nodejs.org/download/release/v14.18.1/SHASUMS256.txt
gyp http 200 https://nodejs.org/download/release/v14.18.1/SHASUMS256.txt
gyp info spawn /usr/bin/python
gyp info spawn args [
gyp info spawn args '/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/home/pi/companion-satellite/node_modules/usb-detection/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/home/pi/.cache/node-gyp/14.18.1/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/home/pi/.cache/node-gyp/14.18.1',
gyp info spawn args '-Dnode_gyp_dir=/usr/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/home/pi/.cache/node-gyp/14.18.1/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/home/pi/companion-satellite/node_modules/usb-detection',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory '/home/pi/companion-satellite/node_modules/usb-detection/build'
CXX(target) Release/obj.target/detection/src/detection.o
../src/detection.cpp: In function ‘void Find(const Nan::FunctionCallbackInfov8::Value&)’:
../src/detection.cpp:166:68: warning: cast between incompatible function types from ‘void ()(uv_work_t)’ {aka ‘void ()(uv_work_s)’} to ‘uv_after_work_cb’ {aka ‘void ()(uv_work_s, int)’} [-Wcast-function-type]
uv_queue_work(uv_default_loop(), req, EIO_Find, (uv_after_work_cb)EIO_AfterFind);
^~~~~~~~~~~~~
In file included from ../src/detection.h:5,
from ../src/detection.cpp:1:
../src/detection.cpp: At global scope:
/home/pi/.cache/node-gyp/14.18.1/include/node/node.h:787:43: warning: cast between incompatible function types from ‘void ()(v8::Localv8::Object)’ to ‘node::addon_register_func’ {aka ‘void ()(v8::Localv8::Object, v8::Localv8::Value, void*)’} [-Wcast-function-type]
(node::addon_register_func) (regfunc),
^
/home/pi/.cache/node-gyp/14.18.1/include/node/node.h:821:3: note: in expansion of macro ‘NODE_MODULE_X’
NODE_MODULE_X(modname, regfunc, NULL, 0) // NOLINT (readability/null_usage)
^~~~~~~~~~~~~
../src/detection.cpp:226:1: note: in expansion of macro ‘NODE_MODULE’
NODE_MODULE(detection, init);
^~~~~~~~~~~
CXX(target) Release/obj.target/detection/src/deviceList.o
CXX(target) Release/obj.target/detection/src/detection_linux.o
../src/detection_linux.cpp:1:10: fatal error: libudev.h: No such file or directory
#include <libudev.h>
^~~~~~~~~~~
compilation terminated.
make: *** [detection.target.mk:111: Release/obj.target/detection/src/detection_linux.o] Error 1
make: Leaving directory '/home/pi/companion-satellite/node_modules/usb-detection/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:400:28)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:282:12)
gyp ERR! System Linux 5.10.17-v7l+
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/pi/companion-satellite/node_modules/usb-detection

Thanks for your assistance!

Donation

Hi, I'd like to make a $ donation to this project/author. Being able to use Satellite decks as opposed to having to run local Companion on each device is amazing.

v2 API suggestions

I am working on a port to arduino
https://github.com/alex-Arc/companion-satellite-arduino

And have come across a couple of things I think should be changed

BEGIN message

Upon connection you will receive BEGIN Companion Version=2.2.0-d9008309-3449 stating the build of companion you are connected to. This should not be relied on to be meaningful to your application, but can be presented as information to the user, or to aid debugging.

  • Should I not rely on this to chenk that the V2 API is suported. Or could we send a different message with the API version?
  • should it not be "Companion_Version" or is "Companion" just at loose Arg without meaning?

VAL with spaces

Messages follow the general format of COMMAND-NAME ARG1=VAL1 ARG2 ARG3="VAL3 with spaces"\n.

could we not prohibit spaces in values or or auto translate them to and from _
this would make parsing much more simple.

ARG without a value is the same as TRUE"

Messages follow the general format of COMMAND-NAME ARG1=VAL1 ARG2 ARG3="VAL3 with spaces"\n. Note the ARG2 which is shorthand for ARG2=true

is it really worth it to save to save the data and nort write the true every time, for the added complexety in parasing the message?
(we could also change it to 1 and 0 if we want to save data)

If kept every ting should at least default to false so that you only get what you ask for.
see -> https://github.com/bitfocus/companion/wiki/Satellite-API#adding-a-satellite-device -> Optional parameters: -> BITMAPS

Module Status (enhancement)

get the relevant module status, like the small square at the top of the streamdeck button
maybe KEY-STATE STATUS=OK KEY-STATE STATUS=WARN and KEY-STATE STATUS=ERROR

Companion log (enhancement)

The connection and disconnection of a Satellite should be logged in companion

vh Alex :-)

macos: not detecting devices on plug

When plugging in a device it is not automatically used.
It will only when another streamdeck is plugged in (the second wont work until another is detected)

Performance optimisations (ideas wanted)

This is not optimised for running over a vpn or slow network. This is a list of ideas of things that could be investigated to improve performance:

  • in companion generate checksum for bitmaps and only send if not already 'known' by this remote. Instead of being sent every bitmap when the page changes, we could be more intelligent and only be sent new images if the checksum from above hasnt changed
  • compression of the bitmaps? (rle, png, gz)

Status connected but buttons are not changing

I'm using multiple companion remotes running on different raspberry pi models 2b and 3b. Unfortunately, we sometimes have network dropouts and the stream decks disconnect and display the connecting image on the buttons.
Usually it reconnects within a few seconds, but sometimes it connects and doesn't seem to reconnect the stream deck to the companion instance running on an intel nuc.
Most of my companion remotes are linked by cable and one of them over wifi.
On the wifi model this sometimes happens when roaming between different access points. Usually after connecting to a 3rd access point it reconnects again.
Is there something I'm missing? Or do you have any idea why it sometimes connects as expected and sometimes it doesn't?
Thank you very much!

Companion: 2.1.2
Companion remote: 0.2.2
Node: 14.16.0

disconnected
connected

Javascript Error

Error

I have seen this error come up a few times, not sure what is causing it.

Stream Deck MK2 Panels not recognized

I have companion remote up and running on a Raspberry PI and it works great with the original 15 button stream decks, however it is not recognizing the MK2 panels - is this an easy fix ?

Thanks

Jonathan

fillImage failed: RangeError: Expected image buffer of length 19200, got length 27648

Got things working, but the screen is corrupted and this error is output.

device(BL31J1B01102): fillImage failed: RangeError: Expected image buffer of length 19200, got length 27648
device(BL31J1B01102): fillImage failed: RangeError: Expected image buffer of length 19200, got length 27648
device(BL31J1B01102): fillImage failed: RangeError: Expected image buffer of length 19200, got length 27648
device(BL31J1B01102): fillImage failed: RangeError: Expected image buffer of length 19200, got length 27648
device(BL31J1B01102): fillImage failed: RangeError: Expected image buffer of length 19200, got length 27648
device(BL31J1B01102): fillImage failed: RangeError: Expected image buffer of length 19200, got length 27648

IMG_1138

Not able to change IP/Port when run as root on macOS

We are using Satellite on a machine that is used by many people with different user accounts, in a space where sometimes people bring their own machine. Because of this, I'd like Satellite to run before any user has logged in. I've done this in the past with LaunchDaemons running as root, but for some reason I can't get the IP and port arguments to work as root.

Comparing the logs between running as root vs running as a user, there isn't any "Connecting to xxx.xxx.xxx.xxx:xxxx" line at all, so I'm not sure what the issue is.

Here's the log output from running as root:

sh-3.2# ./Companion\ Satellite 192.168.50.12 16622
Starting
adding new device: IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/XHC1@14/XHC1@14000000/HS14@14600000/4-Port USB 2.0 Hub@14600000/AppleUSB20Hub@14600000/AppleUSB20HubPort@14610000/Stream Deck Mini@14610000/IOUSBHostInterface@0/AppleUserUSBHostHIDDevice
existing = []
Registering key events for BL44H1B05882
App ready
set tray
objc[7974]: Class WebSwapCGLLayer is implemented in both /System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebCore.framework/Versions/A/Frameworks/libANGLE-shared.dylib (0x7ffb4846fec8) and /Applications/Companion Satellite.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libGLESv2.dylib (0x112effce0). One of the two will be used. Which one is undefined.

ECONNREFUSED

Having used Companion Satellite (with dropouts) for a while, I've just reinstalled it on a headless pi. I'm now experiencing ECONNREFUSED and can't get the client to connect to the server. Any ideas?

failing to compile

Hello,

I am trying to compile on Armbian latest. I've install node and yarn as below. When I do yarn-dist the following errors appear.

curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt update && sudo apt install -y yarn nodejs && apt -y autoremove
npm install rimraf
npm install tsc
npm install typescript

git clone https://github.com/Julusian/companion-remote.git
cd companion-remote
root:~/companion-remote# yarn dist
yarn run v1.22.5
$ yarn build && yarn electron-builder
$ rimraf dist && yarn build:main
$ tsc -p tsconfig.build.json
error TS2688: Cannot find type definition file for 'node'.
  The file is in the program because:
    Entry point of type library 'node' specified in compilerOptions

  tsconfig.build.json:12:13
    12   "types": ["node"],
                   ~~~~~~
    File is entry point of type library specified here.

tsconfig.build.json:2:13 - error TS6053: File '@sofie-automation/code-standard-preset/ts/tsconfig.bin' not found.

2  "extends": "@sofie-automation/code-standard-preset/ts/tsconfig.bin",
              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Found 2 errors.

error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
root@DeckConnect03:~/companion-remote# 

Help wanted

From the description I'm just not getting which way around satellite works.
When I run this app, I see no difference in behaviour anywhere.

Anyway, I'm looking for a way to hit/press/click/trigger a stream deck key on a different computer (over the network).
The titles satellite and remote made me wonder if this app might be a solution.

Any help is always appreciated.

Connecting Reseting

Ver 0.2.2

Single Streamdeck connected over LAN to companion.
Every 60 secs a reconnection seems to occur.

[Bug] Windows 10, javascript error

Thought I'd pass on an error I'm getting today after a first time install.

See screenshot. When opens get this popup, then after clearing popup task manager shows 3 Companion Remote processes.
Current windows 10 Home 20H2 install with latest updates if it helps.

Thanks, otherwise looks like a handy little project.

Capture error

Loupedeck live issues

Follow up to #50

  • Unplugging device doesnt de-register it from companion (does satellite know it was unplugged?)
  • After drawing the splash screen, the image remains slightly visible between buttons
  • First draw of display skips the lower rows of buttons.

set up redundancy

would it be possible to add an option in the context menu for a secondary/backup IP address? that way, if the satellite install loses connection to the main companion install, it can try a different computer automatically. that would allow us to create a backup companion set up, and switch over on failure. thanks!

device(CL29K1A06374): scale image failed: Error: VipsImage: memory area too small --- should be 15552 bytes, you passed 1980

This error appears in the syslog when an XL is connected, and then results in a connect/disconnect loop.

Apr 18 16:49:28 deckconnect11 node[2243]: Connecting to 172.25.198.101:16622
Apr 18 16:49:29 deckconnect11 node[2243]: Connected
Apr 18 16:49:29 deckconnect11 node[2243]: connected
Apr 18 16:49:29 deckconnect11 node[2243]: registerAll [ 'CL29K1A06374' ]
Apr 18 16:49:29 deckconnect11 node[2243]: Connected to Companion: CompanionVersion=2.2.0+4003-493404d6 ApiVersion=1.1.0
Apr 18 16:49:29 deckconnect11 node[2243]: ping timeout
Apr 18 16:49:29 deckconnect11 node[2243]: Connection closed
Apr 18 16:49:29 deckconnect11 node[2243]: disconnected
Apr 18 16:49:30 deckconnect11 node[2243]: Trying reconnect
Apr 18 16:49:30 deckconnect11 node[2243]: Connecting to 172.25.198.101:16622
Apr 18 16:49:30 deckconnect11 node[2243]: Connected
Apr 18 16:49:30 deckconnect11 node[2243]: connected
Apr 18 16:49:30 deckconnect11 node[2243]: registerAll [ 'CL29K1A06374' ]
Apr 18 16:49:31 deckconnect11 node[2243]: device(CL29K1A06374): scale image failed: Error: VipsImage: memory area too small --- should be 15552 bytes, you passed 9934
Apr 18 16:49:31 deckconnect11 node[2243]: ping timeout
Apr 18 16:49:31 deckconnect11 node[2243]: Connection closed
Apr 18 16:49:31 deckconnect11 node[2243]: disconnected
Apr 18 16:49:32 deckconnect11 node[2243]: Trying reconnect
Apr 18 16:49:32 deckconnect11 node[2243]: Connecting to 172.25.198.101:16622
Apr 18 16:49:32 deckconnect11 node[2243]: Connected
Apr 18 16:49:32 deckconnect11 node[2243]: connected
Apr 18 16:49:32 deckconnect11 node[2243]: registerAll [ 'CL29K1A06374' ]
Apr 18 16:49:33 deckconnect11 node[2243]: device(CL29K1A06374): scale image failed: Error: VipsImage: memory area too small --- should be 15552 bytes, you passed 1980
Apr 18 16:49:33 deckconnect11 node[2243]: ping timeout
Apr 18 16:49:33 deckconnect11 node[2243]: Connection closed
Apr 18 16:49:33 deckconnect11 node[2243]: disconnected
Apr 18 16:49:34 deckconnect11 node[2243]: Trying reconnect
Apr 18 16:49:34 deckconnect11 node[2243]: Connecting to 172.25.198.101:16622
Apr 18 16:49:34 deckconnect11 node[2243]: Connected
Apr 18 16:49:34 deckconnect11 node[2243]: connected
Apr 18 16:49:34 deckconnect11 node[2243]: registerAll [ 'CL29K1A06374' ]
Apr 18 16:49:34 deckconnect11 node[2243]: device(CL29K1A06374): scale image failed: Error: VipsImage: memory area too small --- should be 15552 bytes, you passed 13175

Cannot build and run electron app on Apple M1

I cloned this repo, did yarn install and yarn dist. I see some errors in the build output although the package was generated successfully. When I run the package I get the below errors.

image

Sorry, I am new to electron. I just assumed the instructions here will work, there was no mention for system dependenceis.

yarn dist output:

$ yarn dist
yarn run v1.22.17
$ yarn build && yarn electron-builder
$ rimraf dist && yarn build:main
$ tsc -p tsconfig.build.json
$ /Users/hammady/Workspace/companion-satellite/node_modules/.bin/electron-builder
  • electron-builder  version=22.14.13 os=21.3.0
  • loaded configuration  file=package.json ("build" field)
  • writing effective config  file=electron-output/builder-effective-config.yaml
  • rebuilding native dependencies  dependencies=@julusian/[email protected], [email protected], [email protected], [email protected] platform=darwin arch=arm64
  • install prebuilt binary  name=node-hid version=2.1.1 platform=darwin arch=arm64 napi=
  • install prebuilt binary  name=@julusian/jpeg-turbo version=1.1.1 platform=darwin arch=arm64 napi=
  • install prebuilt binary  name=sharp version=0.28.3 platform=darwin arch=arm64 napi=
  • build native dependency from sources  name=node-hid
                                          version=2.1.1
                                          platform=darwin
                                          arch=arm64
                                          napi=
reason=prebuild-install failed with error (run with env DEBUG=electron-builder to get more information)
                                          error=prebuild-install info begin Prebuild-install version 6.1.4
    prebuild-install WARN install prebuilt binaries enforced with --force!
    prebuild-install WARN install prebuilt binaries may be out of date!
    prebuild-install info looking for local prebuild @ prebuilds/node-hid-v2.1.1-napi-v4-darwin-arm64.tar.gz
    prebuild-install info looking for cached prebuild @ /Users/hammady/.npm/_prebuilds/dd9601-node-hid-v2.1.1-napi-v4-darwin-arm64.tar.gz
    prebuild-install http request GET https://github.com/node-hid/node-hid/releases/download/v2.1.1/node-hid-v2.1.1-napi-v4-darwin-arm64.tar.gz
    prebuild-install http 404 https://github.com/node-hid/node-hid/releases/download/v2.1.1/node-hid-v2.1.1-napi-v4-darwin-arm64.tar.gz
    prebuild-install WARN install No prebuilt binaries found (target=4 runtime=napi arch=arm64 libc= platform=darwin)
    
  • build native dependency from sources  name=sharp
                                          version=0.28.3
                                          platform=darwin
                                          arch=arm64
                                          napi=
reason=prebuild-install failed with error (run with env DEBUG=electron-builder to get more information)
                                          error=prebuild-install info begin Prebuild-install version 6.1.4
    prebuild-install WARN install prebuilt binaries enforced with --force!
    prebuild-install WARN install prebuilt binaries may be out of date!
    prebuild-install info looking for local prebuild @ prebuilds/sharp-v0.28.3-napi-v3-darwin-arm64.tar.gz
    prebuild-install info looking for cached prebuild @ /Users/hammady/.npm/_prebuilds/260fb3-sharp-v0.28.3-napi-v3-darwin-arm64.tar.gz
    prebuild-install http request GET https://github.com/lovell/sharp/releases/download/v0.28.3/sharp-v0.28.3-napi-v3-darwin-arm64.tar.gz
    prebuild-install http 404 https://github.com/lovell/sharp/releases/download/v0.28.3/sharp-v0.28.3-napi-v3-darwin-arm64.tar.gz
    prebuild-install WARN install No prebuilt binaries found (target=3 runtime=napi arch=arm64 libc= platform=darwin)
    
  • rebuilding native dependency  name=node-hid version=2.1.1
  • rebuilding native dependency  name=sharp version=0.28.3
  • rebuilding native dependency  name=usb version=2.1.1
  • packaging       platform=darwin arch=arm64 electron=16.0.8 appOutDir=electron-output/mac-arm64
  • signing         file=electron-output/mac-arm64/Companion Satellite.app identityName=Apple Development: Hossam Hammady (REDACTED) identityHash=REDACTED provisioningProfile=none
  • building        target=DMG arch=arm64 file=electron-output/companion-satellite-arm64.dmg
  • Detected arm64 process, HFS+ is unavailable. Creating dmg with APFS - supports Mac OSX 10.12+
  • building block map  blockMapFile=electron-output/companion-satellite-arm64.dmg.blockmap
✨  Done in 52.18s.

show connection status in tray

It is not possible to get any information on the connection status.
It would be useful to see for when it is not working

Feature: Lockout satellite surfaces

This may be more for companion rather than companion-remote, but the ability to lock out satellite surfaces from any local-to-companion surface would be great. There are times where I would want all of the remote panels to have access but then other times where only certain panels should have access. Especially given the nature of how Companion works, with every connected surface having access to all the pages.

In the meantime, I would probably settle for just making a dummy lockout page with no traversable buttons and send the internal "Set surface to page" action.

Not able to build on arch arm (eg Raspberry Pi)

I'm having difficulty getting it built on a Raspberry Pi / Arm.

pi@raspberrypi:~/companion-remote $ yarn install
yarn install v1.22.10
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
[4/5] Linking dependencies...
warning " > @sofie-automation/[email protected]" has incorrect peer dependency "typescript@~4.0".
[5/5] Building fresh packages...
[1/8] ⠁ @julusian/jpeg-turbo
[7/8] ⠁ electron
[3/8] ⠁ sharp
[4/8] ⠁ usb-detection
error /home/pi/companion-remote/node_modules/@julusian/jpeg-turbo: Command failed.
Exit code: 1
Command: prebuild-install -r napi || cmake-js compile --target jpegturbo
Arguments:
Directory: /home/pi/companion-remote/node_modules/@julusian/jpeg-turbo
Output:
prebuild-install WARN install No prebuilt binaries found (target=3 runtime=napi arch=arm libc= platform=linux)
[
'/usr/local/bin/node',
'/home/pi/companion-remote/node_modules/@julusian/jpeg-turbo/node_modules/.bin/cmake-js',
'compile',
'--target',
'jpegturbo'
]
info TOOL Using Unix Makefiles generator.

Unsupported arch arm stackTrace

trying to compile on Armbian.

apt-get dist-upgrade
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt update && sudo apt install -y yarn nodejs && apt -y autoremove
git clone https://github.com/Julusian/companion-remote.git
cd companion-remote
yarn install
yarn dist
yarn install
yarn install v1.22.5
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
info There appears to be trouble with your network connection. Retrying...
[4/5] Linking dependencies...
warning " > @sofie-automation/[email protected]" has incorrect peer dependency "typescript@~4.0".
[5/5] Building fresh packages...
[1/8] ⡀ @julusian/jpeg-turbo
[8/8] ⢀ electron
[3/8] ⢀ sharp
[4/8] ⢀ usb-detection
error /root/companion-remote/node_modules/@julusian/jpeg-turbo: Command failed.
Exit code: 1
Command: prebuild-install -r napi || cmake-js compile --target jpegturbo
Arguments: 
Directory: /root/companion-remote/node_modules/@julusian/jpeg-turbo
Output:
prebuild-install WARN install No prebuilt binaries found (target=3 runtime=napi arch=arm libc= platform=linux)
[
  '/usr/bin/node',
  '/root/companion-remote/node_modules/@julusian/jpeg-turbo/node_modules/.bin/cmake-js',
  'compile',
  '--target',
  'jpegturbo'
]
info TOOL Using Unix Makefiles generator.
info TOOL Building only the jpegturbo target, as specified from the command line.
info DIST Downloading distribution files.
http DIST 	- https://nodejs.org/dist/v12.21.0/SHASUMS256.txt




root@:~/companion-remote# yarn dist
yarn run v1.22.5
$ yarn build && yarn electron-builder
$ rimraf dist && yarn build:main
$ tsc -p tsconfig.build.json
$ /root/companion-remote/node_modules/.bin/electron-builder
  • electron-builder  version=22.9.1 os=5.10.16-sunxi
  • loaded configuration  file=package.json ("build" field)
  • writing effective config  file=electron-output/builder-effective-config.yaml
  ⨯ Unsupported arch arm  stackTrace=
                            Error: Unsupported arch arm
                                at archFromString (/root/companion-remote/node_modules/builder-util/src/arch.ts:43:13)
                                at computeArchToTargetNamesMap (/root/companion-remote/node_modules/app-builder-lib/src/targets/targetFactory.ts:30:24)
                                at Packager.doBuild (/root/companion-remote/node_modules/app-builder-lib/src/packager.ts:429:41)
                                at Packager._build (/root/companion-remote/node_modules/app-builder-lib/src/packager.ts:373:57)
                                at Packager.build (/root/companion-remote/node_modules/app-builder-lib/src/packager.ts:337:12)
                                at executeFinally (/root/companion-remote/node_modules/builder-util/src/promise.ts:12:14)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Which protocol Ports ?

hey, i was wondering which ports this app is using is it possible to point it do different ones ?

Clarify/improve inactive/debug states on the streamdeck

When the connection to companion core is not established, or a streamdeck is not initialised with companion yet, the top left button shows a colur as a basic debugging tool.

This behaviour should be improved to utilise the whole area of the deck and using text

blue = device being setup
red = no connection to companion
green = connected to companion, waiting for images

Reconnecting unsyncs devices

Streamdeck gets stuck with the 'green light' and the log is full of Draw: Error: Unknown deviceId: 1

Unplugging and replugging the streamdeck gets it back.

This suggests that it is reconnecting, but the deviceId management is bad around reconnects

C++ implementation

Hello
I am going to write a c++ implementation of this for arduino and stuff
do you want it as a fork of this or some where else?

Elgato Streamdeck Plugin

Firstly thanks for the awesome work - it's really made remote working a breeze.

Currently I am using satellite natively on my streamdeck but I would really like to be able to use the streamdeck companion button instead so that I can use other features of the streamdeck.

However the streamdeck companion button only finds local instances of companion. Am I missing something to make the streamdeck see the satellite or is it just not possible

Unable to read USB devices unless sudo/root permissions

I'm running headless on a pi, and am able to get everything working if I run

sudo node /home/pi/companion-remote/dist/main.js 10.1.1.2

If I run without sudo (or use systems unit) I error opening up the USB devices. Anyone know how to resolve?

Connecting to 10.1.1.2:37133
May 13 21:54:40 raspberrypi node[7752]: Connected
May 13 21:54:40 raspberrypi node[7752]: sending version
May 13 21:54:40 raspberrypi node[7752]: connected
May 13 21:54:40 raspberrypi node[7752]: clear id map
May 13 21:54:40 raspberrypi node[7752]: adding new device: 0001:0005:00
May 13 21:54:40 raspberrypi node[7752]: existing = []
May 13 21:54:40 raspberrypi node[7752]: Open "0001:0005:00" failed: TypeError: cannot open device with path 0001:0005:00
May 13 21:54:40 raspberrypi node[7752]: Confirmed version PlainConstructor { versionMajor: 1, versionMinior: 1 }

Custom icon

For now I have used the same icons as Companion.

This should be altered in some way or competely replaced to make it more easily identifiable

Second Stream Deck won't connect: device exists elsewhere

I have two Stream Deck Mini mk.2 and one of them sometimes cannot connect to Companion.
One device is connected to a linux machine running companion-satellite 3b188e2 from git master. This one remains connected almost all the time.
The other device is connected to a Mac running release version 1.0.1. This is the one with the problem. This one always appears in Companion surfaces tab even when I quit the Satellite application. To fix it I have to restart Companion on the server.
My server is running Companion 2994a6d0 from git master.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.