Skip to content

Latest commit

 

History

26 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

JIB — Jack In the Box

Device host & configuration suite for StreamDock and Stream Deck hardware.

JIB renders live data on StreamDock and Stream Deck LCD button boxes. Map physical controls to any action (keyboard, mouse, vJoy, media, system), manage multi-page touch layouts, and control LEDs — all from a native Windows Configurator.


Architecture

JIB.Configurator.exe (WinUI 3) ───┐
                                  │ TCP (port 16550, 4-byte length-prefix JSON)
JIB.Service.exe (Windows host) ───┘
  ├── Plugins: SimHub, OBS, HTTP, Camera, Keyboard, Mouse, vJoy, Media, System Monitor, System Commands
  ├── SkiaSharp rendering (real-time CPU raster → JPEG)
  └── StreamDockNative.dll (C++ USB HID + SDK passthrough)
  • JIB.Service — background host managing hardware, plugins, rendering, and IPC
  • JIB.Configurator — WinUI 3 desktop application for visual editing
  • StreamDockNative — C++ native layer for USB communication

Plugins are loaded from Plugins/ by the host. The SimHub plugin is the one exception: it runs inside SimHub.exe and streams telemetry to the host over TCP (port 16555, line-delimited JSON). The Configurator communicates with the host over TCP; there is no shared DLL between them.


Installation

Prerequisites

  • Visual C++ Redistributable x64 2015–2022 (vc_redist.x64.exe)
  • Optional: vJoy driver for virtual joystick support

Manual mode (recommended)

  1. Download the latest ZIP from GitHub Releases and extract it anywhere.
  2. Start the host: run Host\JIB.Service.exe (console mode on TCP port 16550; press Ctrl+C to stop).
  3. Open Configurator\JIB.Configurator.exe and connect to localhost:16550.

Windows service (optional, not recommended during alpha)

While JIB is still in alpha, prefer running the host in standalone / console mode. Installing it as a Windows service makes updates, logs, resets, and live diagnostics harder.

Run .\install-service.ps1 from an elevated PowerShell to install the host as a Windows service in C:\Program Files\JIB\ (automatic start, firewall rule, Start Menu shortcut). Use .\update-service.ps1 to update an existing installation.

SimHub telemetry (optional)

To add racing telemetry, copy the contents of Plugins\External\SimHub\ into your SimHub installation folder and restart SimHub.

Do not run the Configurator as Administrator, or drag-and-drop from Explorer into it may be blocked.


Features

Live telemetry display

Real-time telemetry rendered as JPEG frames on device LCD keys — SimHub racing data, system metrics, media levels, and more. Supports numeric gauges, bar gauges, text overlays, and state-dependent coloring (normal vs. alert states). Delta hashing avoids re-rendering frames that haven't changed.

Supported SimHub telemetry categories: speed, RPM, gear, fuel, water/oil temperatures, turbo pressure, ERS, DRS, ABS, TC, brake bias, headlights, wipers, flags, cruise control, parking brake, retarder, diff lock, navigation, trucking data, and more.

Physical controls & dispatch

Every hardware button, knob turn/press, touch zone, and swipe gesture can be mapped to:

Category Examples
Keyboard Any key or hotkey combination
Mouse Click, double-click, scroll, move
Media Play/Pause, next/previous, volume, per-app audio
vJoy Virtual joystick buttons (128) and axes (8)
System Shutdown, restart, sleep, lock, brightness, monitor off
HTTP / Webhook GET/POST/PUT/PATCH/DELETE to any URL
OBS Studio Stream, record, scenes, sources, virtual camera
SimHub Control Mapper Custom roles defined in SimHub
Internal Touch page navigation

Touch pages & swipe navigation

Touchscreen devices (N4, N4 Pro) support multiple main pages, each with its own touch pages and folders. Swipe left/right gestures can be mapped to navigation or other actions. A "home" page anchors the default view. Full CRUD from the Configurator.

LED & brightness control

  • Global RGB LED color — single color across all device LEDs
  • Per-key LED — individual colors per key (N4 Pro)
  • Knob LED rings — per-knob RGB control (N4 Pro)
  • Panel brightness — LCD screen brightness 0–100 %
  • Animated GIF — key GIF and background GIF (device-dependent)

Feature transport (SDK vs. native HID) is resolved per device model, not via a global switch.

Profiles & workspaces

  • Vehicle profiles with learned telemetry min/max values per car
  • Per-profile mapping overrides on top of global workspace
  • Composite workspace save/load — atomic save of bindings, subscriptions, render profile, behavior, and layout

Plugin system

JIB loads plugins from Plugins/ at startup. Ten built-in plugins are included. Third-party plugins can be authored against the JIB.Sdk library.

Plugins have:

  • Typed settings (TextBox, Toggle, NumberBox, ComboBox, Endpoint)
  • Health monitoring (10 s interval, auto-disable after 5 consecutive failures)
  • Enable/disable per plugin from the Configurator
  • [JibPlugin] attribute for display metadata

Built-in plugins

Keyboard

Map any StreamDock button to a keyboard key or key combination (modifiers + key). Dispatches Press/Release events to the OS for held actions like push-to-talk or modifier keys.

Mouse

Left, middle, and right clicks. Double-click. Scroll up/down. Relative cursor movement (delta) and absolute positioning. Configurable sensitivity (1–200 %) and scroll speed (1–20 notches).

vJoy

Virtual joystick output via the vJoy driver. Auto-discovers configured vJoy devices. Up to 128 buttons and 8 axes (X, Y, Z, RX, RY, RZ, Slider1, Slider2) per device. Press/Release dispatch for held button states, PulseOnly for instant axis actions.

Media

Multimedia transport: Play/Pause, Next Track, Previous Track. Volume Up, Volume Down, Mute. Per-application audio discovery dynamically creates individual volume controls for every active audio application. Master volume level exposed as a renderable gauge (0–100 %).

System Monitor

System resource telemetry gauges: CPU usage, RAM, GPU (usage, VRAM, temperature), network throughput, uptime, battery level. Configurable refresh interval (1–60 s). All metrics exposed as renderable gauges and assignable display functions.

System Commands

System-level operations dispatched from any button: Shutdown, Restart, Sleep, Hibernate, Lock, Brightness Up/Down, Monitor Off. Also supports per-card program launch — map any button to launch an executable with custom arguments, working directory, and window visibility, configured via the mapping metadata.

OBS Studio

Control OBS Studio via WebSocket v5. 8 built-in actions: toggle stream, record toggle/pause/resume, replay buffer toggle/save, virtual camera toggle, screenshot. Dynamic scene switching and source visibility toggling. Live telemetry: stream status (LIVE/OFF), recording status (REC/PAUSE/OFF), and current scene name displayed on buttons with colour-coded gauges. Zero external dependencies — native System.Net.WebSockets client with SHA-256 authentication.

HTTP / Webhook

Send HTTP requests on button press. Configure up to 10 endpoints, each with: display name, URL, HTTP method (GET/POST/PUT/PATCH/DELETE), custom JSON headers, and request body. Configurable timeout (1–60 s). Last status code and request duration rendered on the assigned button. Health degrades when the last request failed.

Camera

Display a camera feed on device buttons. The source is configured per button — a local webcam or a network stream (MJPEG/RTSP). Zero external dependencies, streamed through the host rendering pipeline.

SimHub

Live telemetry from any racing simulator. Exposes hundreds of telemetry fields as assignable display functions. Also publishes SimHub Control Mapper roles and event triggers for bidirectional control. Game-aware: rebuilds path mappings automatically when the active simulator changes. Per-vehicle learned value profiles. Requires the SimHub plugin copied into your SimHub installation (see Installation).


How mapping works

Every rendered control has two parts:

  1. a display — what the control shows (a telemetry gauge, camera feed, or system metric);
  2. mappings — event triggers that run actions when the control is used.

1. Assign a display

Drag a display source from the palette onto a control — a system metric, a camera feed, SimHub telemetry, a static image, and so on.

2. Add events and actions

Each control exposes event slots — Press, Long press, Increment, Decrement, Swipe left, Swipe right. Drop actions into an event slot: keyboard, mouse, OBS, HTTP, media, system, or navigation actions.

3. Pick a dispatch mode

Mode Behaviour Use for
Press / Release Held signal with distinct press and release events Keyboard shortcuts, vJoy button hold, push-to-talk
PulseOnly Instant one-shot trigger Page navigation, mute, system commands
Auto Plugin-recommended default (fallback depends on MappingTargetKind) General use

4. Assign to a hardware control

Bind the mapping to a physical button press/release, knob turn (left/right), knob press, touch zone tap, or swipe gesture (left/right). The Configurator shows a live preview as you edit.

Hardware control types

Control Supported on
Button press / release All LCD key devices
Knob turn left / right N3, N4, N4 Pro, M3, K1 Pro
Knob press N4, N4 Pro, K1 Pro
Touch zone tap N4, N4 Pro (touchscreen surfaces)
Swipe left / right N4, N4 Pro (touchscreen surfaces)
Auxiliary button N3, N1, M18 (non-LCD buttons)

Hardware compatibility

JIB maintains a hardware catalog with VID:PID identification for 15 device families across 30+ branded models.

Brand Model Status Family Details
MiraBox N3 Full support SDN3 3×2 keys · 3 knobs · 3 aux buttons · native brightness
Ajazz AKP03 / AKP03E / AKP03R Full support SDN3
Soomfon Stream Controller SE Full support SDN3
Mars Gaming MSD-TWO Full support SDN3
TreasLin N3 Full support SDN3
Redragon Skyrider SS-551 Full support SDN3
MiraBox 293 V2 / V3 Full support SD293 5×3 keys
MiraBox 293S Full support SD293S 5×3 keys · 3 screens · key GIF
FHOOU 293S Full support SD293S Rebrand of MiraBox 293S (VID:PID 5548:6670)
Ajazz AKP153 / AKP153E / AKP153R Full support SD293S
Mars Gaming MSD-ONE Full support SD293S 293S rebrand (VID:PID 0B00:1000 / 0B00:1005)
Maddog GK150K Full support SD293S
Risemode Vision 01 Full support SD293S
TMICE Stream Controller Full support SD293S
Soomfon XF-CN001 Full support SD293S
MiraBox N4 / N4 E Full support SDN4 5×2 keys · 1 touchscreen · 4 knobs · touch/swipe · native brightness
Ajazz AKP05E Full support SDN4 Non-Pro family
MiraBox N4 Pro / N4 Pro E Full support SDN4 Pro 5×2 keys · 1 touchscreen · 4 knobs · per-key LED · knob LED rings · native brightness
Ajazz AKP05E PRO Full support SDN4 Pro Pro family · knob LED rings · vibration
MiraBox N1 Partial support SDN1 5×3 keys · 3 screens · 1 knob · 2 aux buttons
VSD N1 Partial support SDN1 Hardware validation in progress
MiraBox M18 / M18E Partial support SDM18 5×3 keys · 3 aux buttons · key + BG GIF
MiraBox M3 Full support SDM3 5×3 keys · 3 knobs · key + BG GIF
MiraBox XL / XLE Experimental SDXL 8×4 keys · key + BG GIF · pending end-to-end validation
MiraBox K1 Pro / K1 Pro EU Experimental K1Pro 3×2 keys · 3 knobs · key GIF · pending end-to-end validation
Elgato Stream Deck Classic Experimental SDClassic 5×3 keys · pending end-to-end validation
Elgato Stream Deck XL Experimental SDDXL 8×4 keys · pending end-to-end validation
Elgato Stream Deck Neo Experimental SDNeo 8 keys · 1 touchscreen · touch/swipe · pending end-to-end validation
Elgato Stream Deck + Experimental SDPlus 8 keys · 1 touchscreen · 4 knobs · touch/swipe · pending end-to-end validation
Elgato Stream Deck + XL Experimental SDPlusXL 36 keys · 1 touchscreen · 6 knobs · touch/swipe · pending end-to-end validation

Status legend:

  • Full support — validated in normal use, recommended for end users
  • Partial support — usable, features or behaviours still under validation
  • Experimental — native driver registered, not yet validated end to end

Configurator overview

The JIB Configurator is a WinUI 3 desktop application for visual editing.

Screens

Screen Purpose
Infos Connection and runtime overview, active host, discovered hosts
Devices Hardware inventory and host-owned per-device settings (rotation, startup, palette, transport policy)
Controls Visual layout editor — scenes, pages, touch pages, display sources and mapping assignment
Plugins Plugin management — health, telemetry, settings, enable/disable
Datas Browse user-visible data published by plugins
Settings Host runtime tuning — render quality, FPS, brightness, screensaver, network access
Hosts Host discovery, identity, node administration, database
Transports Live transport monitoring
Dev Hardware bring-up and VID/PID compatibility
Debug Diagnostics — render route, pressure, USB probe, box validation
Logs Runtime log viewer
About Project information, version, links
Options Local Configurator preferences (theme, close-to-tray)

Composite save model

The Configurator uses a global save entry point. Individual editors show their state via colour-coded chips but do not have local save buttons:

  • Gray — clean, no pending changes
  • Orange — dirty, unsaved changes
  • Blue — saving in progress
  • Green — saved successfully
  • Red — save failed

SDK (for plugin developers)

Third-party plugins can be authored against the JIB.Sdk library. Two authoring modes are available:

  • SDK-only — parameterless constructor, portable, suitable for third-party distribution
  • Internal host — constructor receives DeviceHostPluginServices with full access to RuntimeProviderChangeTracker, transports, and host services

Key SDK concepts:

  • IDeviceHostPlugin / DeviceHostPluginBase — base plugin contract
  • RuntimeProviderChangeTracker — push live state updates (catalog changes, control states)
  • [JibPlugin] attribute — display metadata (name, description, version)
  • Typed settings system — auto-generated UI editors in the Configurator
  • Static vs. dynamic catalogs — choose based on whether functions are known at compile time
  • Health monitoring — automatic with configurable disable threshold

The IPC protocol is documented in docs/IPC-Protocol.md. Sample plugins are provided in Plugins/Samples/.

About

Jack In the BOX

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors