WebHapticsPlugin

By Jasper M-W | Published at 2026-01-03

haptics.jmw.nz Fallstop/HapticWebPlugin

Haptic Feedback for the Web

A Logi Actions SDK plugin that exposes MX Master 4 haptic feedback via a local HTTPS server and WebSocket API.

Why Haptics?

Every phone, game controller, smartwatch, and even my laptop’s trackpad can now give nuanced tactile feedback… except the browser.

All we get is the Vibration API (wow, you can make the user’s device buzz), which Mobile Safari still doesn’t support and is still less capable than what hobbyists have achieved with WebHID game controllers. There is a lot to gain when micro-interaction feels like it clicks, drags, and snaps the same way the pixels do. The whole UI suddenly becomes more satisfying and real.

My new MX Master 4 mouse features a haptic motor, so I created a simple WebSocket bridge plugin to enable any website to send haptic events. Playing with it, I’ve found that any basic-ass slider feels satisfying to use when you can feel the bumps from each tick. Still, the mouse only provides 15 baked waveforms for you to use, with no control over intensity.

There’s always the flip side, though. Remember what happened when we got push notifications: every site instantly weaponised them. Pop-up windows were so abused that every browser had to kill them with fire. If a real Haptics API ships with actual support, how long before an ad network starts serving “feel this deal!” vibrations on every load to harvest 2% extra attention?

It’s likely that Haptics will never get the critcal-mass attention for wide adoption, but dammit - I’m going to keep building with it.

How It Works

The plugin installs into Logi Options+ and runs a local HTTPS server on port 41443. Websites can then trigger haptic feedback through either a REST API or WebSocket connection.

The local.jmw.nz Trick

One of the trickier parts was getting HTTPS to work locally. Browsers rightfully refuse to connect to self-signed certificates, and you can’t just serve HTTP from a secure context. The solution: local.jmw.nz resolves to 127.0.0.1, but with a valid SSL certificate that the plugin automatically downloads from GitHub. The cert gets cached locally and refreshed every 24 hours. You read that correctly, I’m shipping a valid SSL cert for my own domain straight to the browser.

API Options

REST API for simple one-off triggers:

curl -X POST -d '' https://local.jmw.nz:41443/haptic/sharp_collision

WebSocket for lower latency when you need rapid feedback:

const ws = new WebSocket('wss://local.jmw.nz:41443/ws');
ws.onopen = () => {
  // Send a single byte with the waveform index
  ws.send(new Uint8Array([7])); // "completed" waveform
};

Available Waveforms

The MX Master 4 provides 15 built-in waveforms across different categories:

WaveformIndexCategory
sharp_collision0Precision enhancers
sharp_state_change1Progress indicators
knock2Incoming events
damp_collision3Precision enhancers
mad4Progress indicators
ringing5Incoming events
subtle_collision6Precision enhancers
completed7Progress indicators
jingle8Incoming events
damp_state_change9Precision enhancers
firework10Progress indicators
happy_alert11Progress indicators
wave12Progress indicators
angry_alert13Progress indicators
square14Progress indicators

Tech Stack

The plugin itself is built with C# using NetCoreServer for the HTTPS/WSS server. The demo website at haptics.jmw.nz is a Svelte app with a playground where you can test all the waveforms if you have the mouse and plugin installed.

The whole thing is open source under MIT and has been submitted to Logitech Marketplace for easier user installation, but I’m yet to hear back.