Skip to content

Commit

Permalink
chore: restructure readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Julusian committed Jan 23, 2021
1 parent 3821983 commit f0bb8b5
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 4 deletions.
49 changes: 46 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,54 @@

A small application to allow for connecting a streamdeck to [Bitfocus Companion](https://github.com/bitfocus/companion) over a network.

Once running, it will sit in the system tray. Right click it to set the ip address of the companion instance to connect to.
There is no need to scan for new devices, the application will detect any devices being connected and automatically use them.
Companion 2.1.2 and newer are supported

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

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

Companion 2.1.2 and newer are supported
## Running

### Electron

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/`

### Headless

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

To prepare the application, after cloning:

- `yarn install`
- `yarn build`

An example systemd unit (make sure to update the paths and companion ip as appropriate):

```
[Unit]
Description=Bitfocus Companion Remote
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=pi
WorkingDirectory=/home/pi/companion-remote
ExecStart=node /home/pi/companion-remote/dist/main.js 192.168.0.1
Restart=on-failure
KillSignal=SIGINT
TimeoutStopSec=60
[Install]
WantedBy=multi-user.target
```
4 changes: 3 additions & 1 deletion src/cards.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ export class CardGenerator {
const h = deck.ICON_SIZE * deck.KEY_ROWS

const size = Math.round(Math.min(w, h) * 0.6)
const icon = await sharp(await this.loadIcon()).resize(size).toBuffer()
const icon = await sharp(await this.loadIcon())
.resize(size)
.toBuffer()

return sharp({
create: {
Expand Down

0 comments on commit f0bb8b5

Please sign in to comment.