WebSocket Message
Starts the macro when a WebSocket server sends a message, or when the connection opens or drops, e.g. Streamer.bot's or Home Assistant's live events. MacroWin stays connected while the macro is enabled, shares one connection per address and sign-in, and reconnects by itself. Text messages up to 1 MB.
In the editor, press Space on the canvas to add a step, then open Triggers > Web, or type its name. In Simple mode it's under Show all, and search finds it.
Settings
URL
A web address RequiredThe server's WebSocket address, e.g. ws://192.168.1.20:8080/ or wss://example.com/socket. An address that holds a token belongs in Password mode.
Event
A choiceOnly messages containing
TextOnly a message holding this text starts the macro. Empty: every message.
Send after connecting
TextText sent after every connect, for services that need a subscribe message. Sent as typed.
Authorization
TextSent as the Authorization header, e.g. Bearer and the token. Stored as a password.
Headers
Text More optionsOne per line, e.g. Origin: https://example.com
Keep alive every (s)
A whole numberA ping so a quiet connection isn't closed in between.
Outputs
Values the step gives to the steps after it. In the Graph view, drag a wire from an output to another step's field.
| Output | Gives | What it is |
|---|---|---|
| Message | Text | The message's text; empty for Connected and Disconnected. |
Good to know
- Wait for Event can wait for it in the middle of a macro, with the same settings.
- Fields marked as passwords keep their value in the Windows password vault, never in the macro.