SDlink for SpaceLynk / LogicMachine
Develop LogicMachine and SpaceLynk projects directly in VS Code.
Stop juggling browser tabs, copy-pasting Lua scripts, and wondering whether the version on the controller matches what's in Git.
SDlink brings LogicMachine and SpaceLynk development into Visual Studio Code with bi-directional synchronization, device management, script execution, logging, and live object monitoring. Work locally, version your projects properly, and synchronize changes with your controllers when you're ready.
Table of contents
Features
Script synchronization
Keep your workspace and controller in step.
- Initial import of every script from the device
- Bi-directional sync with intelligent change detection
- Side-by-side diff view before anything moves
- Per-script pull, push, or skip
- Clear detection of local-only, device-only, and conflicting changes
Auto upload on save
Save a .lua file and it is uploaded to the active device automatically — no browser interaction required. The first upload shows a one-time reminder so the behavior is never a surprise.
Script management
Create and manage scripts without leaving the editor.
- Create new scripts and edit their configuration (name, category, parameters)
- Enable, disable, or bulk-toggle scripts before a deployment
- Delete, fetch, or push individual scripts
Run scripts
Execute scripts without opening the device web interface — from the Command Palette, context menus, or a keyboard shortcut. Works with event, scheduled, resident, and user (library) scripts.
Live logging
Watch what your controller is doing, live, inside VS Code.
- Live log and error streams
- Filtering and a follow active script mode
- Multi-script view with rich, formatted rendering
Multi-device support
Manage several LogicMachine and SpaceLynk installations from one workspace.
- Multiple device profiles with fast switching
- Per-device project folders
- Secure credential storage using VS Code SecretStorage
Object browser (Live Watch)
See and drive device objects in real time.
- Live updates over WebSocket
- Boolean toggles and analog value writes
- Change highlighting, filtering, and sorting by name or recent activity
- Human-readable KNX DPT decoding (including DPT 3 step commands)
- Jump straight to the script that handles a selected object
Object storage viewer
Browse the device's persistent object storage directly from VS Code, when supported by the target device.
GitHub Copilot integration
SDlink registers Language Model Tools so Copilot Chat can reason about your installation — list scripts, trace an event's execution flow, search objects, fetch logs, and more. See the full list below.
Remote access
Connect to controllers behind Cloudflare Access, reverse proxies, custom authentication headers, and secure remote tunnels.
Install
- Install SDlink for SpaceLynk / LogicMachine from the VS Code Extensions view (
Ctrl+Shift+X).
- Open the folder you want to use as your project workspace — one folder maps to one device.
Quick start
- Command Palette (
Ctrl+Shift+P) → SDlink: Setup Device Connection. Enter the device hostname/IP and credentials.
- Run SDlink: Sync Scripts (Diff View) (or
Ctrl+Alt+S) to import your scripts. The first sync writes everything; later syncs show a diff picker so you choose what moves which way.
- Open a
.lua file and press F5 to run it on the device. Logs stream to the SDlink sidebar.
- Edit and save — SDlink uploads the change to the active device automatically.
- Open the SDlink activity-bar icon to watch KNX objects and browse device storage live.
Supported script types: Event, Scheduled, Resident, and User (library).
Commands
All commands are available from the Command Palette under the SDlink: prefix.
Setup & device
| Command |
Description |
SDlink: Setup Device Connection |
First-run wizard — hostname, port, credentials. |
SDlink: Switch Device |
Switch the active device alias. |
SDlink: Configure Portal Authentication |
Add custom headers for Cloudflare Access / portal-fronted devices. |
SDlink: Export Bug Report Log |
Save a diagnostic log you can share when reporting an issue. |
Sync
| Command |
Description |
SDlink: Sync Scripts (Diff View) |
Pull from device with a diff picker (default sync). |
SDlink: Force Full Sync from Device |
Destructive pull — overwrites local with device. |
Scripts (per file)
| Command |
Description |
SDlink: Run Current Script |
Execute the active .lua on the device. |
SDlink: Toggle Enable/Disable Script |
Flip the active flag for the active script. |
SDlink: Fetch Script from Device |
Re-pull only the current script. |
SDlink: Push Script to Device |
Upload only the current script. |
SDlink: View Diff (Local vs Device) |
Side-by-side diff for the current script. |
SDlink: Edit Script Configuration |
Rename, change category, edit params/subparams. |
SDlink: Delete Current Script |
Remove on device and locally. |
Authoring
| Command |
Description |
SDlink: Create New Script on Device |
New script wizard (type, category, name, params). |
SDlink: Bulk Enable/Disable Scripts |
Multi-select picker for mass enable/disable. |
Live logs
| Command |
Description |
SDlink: Start Log Viewer |
Begin streaming logs and errors from the device. |
SDlink: Stop Log Viewer |
Stop streaming. |
SDlink: Clear Sidebar Logs |
Clear the in-memory log/error buffers. |
SDlink: Toggle Follow Active Script Logs |
Auto-filter logs to the script in the active editor. |
Live Watch (KNX)
| Command |
Description |
SDlink: Connect Live Watch |
Open the WebSocket stream of KNX objects. |
SDlink: Disconnect Live Watch |
Close the WebSocket. |
SDlink: Refresh Live Watch |
Force a full object refresh. |
SDlink: Filter Live Watch by Tag |
Restrict the view to a single tag. |
SDlink: Clear Tag Filter |
Drop the tag filter. |
SDlink: Write Object Value |
Send a value to a group address. |
SDlink: Open Source Script |
Jump to the Lua script that handles a selected object. |
Device storage
| Command |
Description |
SDlink: Refresh Storage |
Re-read the storage view from the device. |
Keybindings
| Shortcut |
Action |
When |
F5 |
Run current script |
Lua editor, not in debug mode |
Ctrl+K T / Cmd+K T |
Toggle enable/disable script |
Lua editor |
Ctrl+Alt+S / Cmd+Alt+S |
Sync scripts (diff view) |
A device is configured |
Views
Explorer sidebar
- SDlink Script Logs — tree view of recent log messages.
- SDlink Script Errors — tree view of recent device-side errors.
- SDlink Formatted Logs — webview with grouped / formatted rendering.
SDlink activity bar (Live Watch container)
- KNX Objects — webview with the live object table, search, tag filter, and value editor.
- Device Storage — webview key/value browser for the device's persistent storage.
Common tasks
Set up a new device
SDlink: Setup Device Connection.
- Enter hostname/IP, port (default 80/443), username, and password.
- SDlink verifies the login and stores the credentials securely.
- Run
SDlink: Sync Scripts (Diff View) to import your scripts.
Edit a script
- Open the
.lua file under Event/, Scheduled/, Resident/, or your user-library category folder.
- Make your changes and save — the script uploads to the active device automatically.
- Prefer to review first? Use
SDlink: View Diff (Local vs Device), or run SDlink: Sync Scripts (Diff View) and pick the local-modified entry.
Bulk enable/disable before a deployment
SDlink: Bulk Enable/Disable Scripts.
- Multi-select the scripts to toggle, then pick Enable or Disable.
- The active flag is flipped on the device and the local metadata updated.
Debug an event script with live values
SDlink: Connect Live Watch (or open the SDlink activity bar — it auto-prompts).
- Filter by tag or search for the group address.
- Press F5 on your event script, then watch the object change in real time.
- Use
SDlink: Write Object Value to simulate an input.
Create a new script straight from VS Code
- From the palette:
SDlink: Create New Script on Device, then fill in the prompts.
- Or create a file at
Event/<Category>/MyScript.lua (or Scheduled/…, Resident/…) and save it — SDlink detects the new file, prompts for anything missing, and registers it on the device.
GitHub Copilot integration
SDlink registers Language Model Tools that Copilot Chat can invoke when you talk about your device:
sdlink_device_status — connection and auth state.
sdlink_list_scripts — list scripts known to the workspace.
sdlink_script_dependencies — parse a script's KNX object and helper-function dependencies.
sdlink_trace_script_flow — follow execution from an event trigger across helpers.
sdlink_debug_flow_guide — opinionated walkthrough for diagnosing a misbehaving script.
sdlink_run_script — run a script on the device.
sdlink_search_objects / sdlink_fetch_objects_batch — query KNX objects.
sdlink_fetch_logs — pull recent device logs.
sdlink_write_object_value — write to a group address.
Use them in Copilot Chat with normal questions like "why isn't my dimming script reacting to 1/2/3?" — Copilot will pick the right tool.
Remote access
For devices reached through a Cloudflare Access tunnel or other authenticating proxy:
SDlink: Configure Portal Authentication.
- Paste the headers your portal requires (e.g.
CF-Access-Client-Id, CF-Access-Client-Secret, or a session cookie). One header per prompt.
- SDlink merges them into every request to the device. The portal status bar item shows whether portal auth is currently active.
Self-signed device certificates are accepted automatically — SDlink uses a tolerant TLS agent for https:// device URLs.
Requirements
- Visual Studio Code 1.96 or newer.
- A LogicMachine 5 or SpaceLynk controller reachable over HTTP or HTTPS. Self-signed certificates are handled automatically.
Security
Device credentials are stored securely using VS Code SecretStorage and are never written to project files or source control. Portal and tunnel headers are stored the same way, per device.
Designed for
- LogicMachine and SpaceLynk developers
- KNX integrators
- Building automation engineers
- System integrators
- Teams managing multiple customer installations
Good to know
- Use one workspace folder per device. Pointing a device's folder at a different device will rewrite the local files.
- Each synced
.lua file starts with a small managed header block — leave it as-is. SDlink maintains it and strips it before uploading to the device.
- Sync state lives in a local
.sdlink-metadata.json file; no credentials are ever stored there.
Troubleshooting
Session expired / 401 / 403 loops
- Local devices: re-run
SDlink: Setup Device Connection to refresh credentials.
- Portal-fronted devices: re-run
SDlink: Configure Portal Authentication — Cloudflare cookies expire.
Some scripts didn't sync
- Run
SDlink: Force Full Sync from Device. Malformed rows are skipped with a warning instead of aborting the whole pull.
- For details, open the SDlink Debug output channel and check the
Skipped … lines.
Logs not appearing
- Confirm
SDlink: Start Log Viewer is running.
- If Follow Active Script is on, switch to a tracked
.lua file or turn the follow mode off.
Live Watch shows no objects
- Run
SDlink: Refresh Live Watch.
- Confirm the device's WebSocket endpoint is reachable on the configured port.
Still stuck? Run SDlink: Export Bug Report Log and share the saved file when you report the issue.
Feedback
Feedback, bug reports, feature requests, and workflow suggestions are genuinely appreciated — they shape where SDlink goes next.
When reporting a problem, please attach the log from SDlink: Export Bug Report Log.
About this project
SDlink VS code extension started as a way to solve the everyday friction of managing larger LogicMachine and SpaceLynk projects — the browser tabs, the copy-paste, the "which version is actually on the controller?" It has since grown into a full development workflow for scripting, synchronization, debugging, and device management.
Development is ongoing, and there is plenty more on the roadmap. The core functionality is stable and used in production, while some areas continue to be refined as new real-world use cases appear. If you run into something, have an idea, or think a workflow could be smoother, please reach out on the forum — community feedback directly influences future development.