Bitfocus AS
Bitfocus AS

Loading...

Footer

Bitfocus

Subscribe to our newsletter

The latest news, articles, and resources, sent to your inbox.

FacebookInstagramGitHubYouTubeLinkedIn

Products

  • Buttons
  • Companion

Integrations

  • Supported Devices
  • Developer Community
  • Connection Development

Support

  • Support Overview
  • Documentation
  • Video Tutorials
  • Community Forum

Sales

  • Resellers & Integrators
  • Buttons Pricing

Updates

  • Case Studies
  • Events & Trade Shows
  • Press Releases
  • Product Updates
  • Webinars

Legal

  • Legal Overview
  • Privacy Policy
  • Buttons EULA
  • Terms & Cookie Policy

Company

  • About us
  • Press kit
  • Careers
Co-funded by the European Union

Our Bitfocus Workflow 2.0 project is co-funded by the European Union’s Creative Europe programme. About the project

© 2026 Bitfocus AS. All rights reserved.

Encoders
Docs for
Overview
Getting started
What is Bitfocus Buttons?
Install Buttons and get started
Manage your Buttons license
Activate Buttons offline
Find your way around Buttons
Create your first backup
Add an ATEM connection
Choose a control method
Choose an installation path
Install Buttons on Debian or Ubuntu
Understand HA clustering
High Availability
Upgrade Buttons
Remove Buttons
Positions
Understand positions
Encoders and taps
Create a position
Custom button layouts
Add controls and sections to a position
Feedback variables with text
Create your first button
Use a connection's presets
Build more capable button actions
Encoders
Add more feedback to a button
Organize controls in a section
Shift Section
Organize controls with a Folder Section
Add a Popover Section
Build and reuse a Shared Section
Show different controls by role
Choose a routing panel
Build a Router Section
Understand Custom Routers
Custom Router panel
Surfaces
Surface compatibility
Add and attach a surface
Device orientation
Connections
Update a connection's module safely
Monitor and troubleshoot a connection
Port forwarding (HA)
Router integrations
VideoHub and AJA KUMO
Utah Scientific BPS
Generic SW-P-08
Nevion VideoIPath
Arkona BLADE//runner
Evertz Quartz
Imagine LRC
Riedel MediorNet
Nevion MRP
Ross Video NK router
TAG Video Systems MCS
Routing
Physical routing
Shape direction
Configure ports and labels
Take a physical route
Understand route status
Topology graph
Routing Presets
Get started with virtual routing
Configure Nested Shapes
Reverse routing
Tielines
Routing Projects
Routing settings
Troubleshoot a route
Tally
Understand the Tally system
Send ATEM tally and labels to a UMD
Interpret Active Tally state
TSL/UMD connections
Diagnose tally problems
NMOS
Understand NMOS in Buttons
Connect Buttons to an NMOS Registry
Built-in Registry Server
Configure NMOS connections
Discover and adopt
Browse the NMOS inventory
Manage NMOS multicast addresses
Diagnose NMOS problems
Cuelists
Understand Cuelists
Run and stop cues
Build a Cuelist
Cuelist state
Read and advance a running Cuelist
Control a Cuelist from a Position
Workflows
Understand workflows
Build your first workflow
Encoders
Reuse a group of workflow nodes safely
Port forwarding (HA)
Troubleshoot a workflow
Recipes
Sequence a timed automation
Call an HTTP endpoint from a workflow
REST endpoint
Use variables
Understand variable scope
Understand nested variables
Update expressions for v1.8
Plan and use Tags
Access
Create and manage users
Create roles and assign permissions
Grant access to specific resources
Set up PIN and NFC sign-in
SSO
Get started with SSO
Connect a generic OIDC provider
Connect LDAP or Active Directory
Map identity claims to roles
Secure a Buttons deployment
Integrations
External control
Connect to Bitfocus Listener
USB Relay
Install USB Relay on Windows
Install USB Relay on macOS
Desktop app
Install USB Relay on Linux
Install USB Relay on a Raspberry Pi
Get started with the Control API
Secure and monitor the Control API
Control API reference
AI assistants (MCP)
Connect an AI assistant
Edit with an assistant in the editor
What an assistant can do
Manage MCP access and tokens
Actions
HTTP replies
Administration
Enable and manage installable features
Services and health
Configure and monitor scheduled backups
Restore a backup and verify it
Export or import Buttons configuration
Store and rotate connection secrets
Replace the HTTPS certificate
HA backup and recovery
Settings
Collect support information
Reference
Glossary
Button Inspector reference
Network ports reference
Expressions
Internal actions reference
Custom Router button types
Startup configuration reference
Workflow nodes
Connection workflow nodes
Workflow variable and action nodes
Internal workflow nodes
Position workflow nodes
API workflow nodes
Utility workflow nodes

Loading...

Previous
← Build your first workflow
Next
Reuse a group of workflow nodes safely →
Contact support →
You are viewing documentation for Buttons 1.10.See the docs for Buttons 1.8
Buttons/Workflows/Encoders

Encoders

View as Markdown
An encoder can drive a workflow directly. Turn it to set a workflow variable, step a value up and down, or trigger the workflow's own actions, and the workflow takes it from there.
This is useful when one knob should do more than one device action: the workflow can scale the value, send it to several connections, or combine it with other values before anything reaches a device.

Before you begin#

  • A button on a position, turned by an encoder. See Control levels and choices with encoders for the Encoder, Left and Right handlers and how an encoder is assigned to a button.
  • A workflow that is turned on. In the examples it is called Mixer. Its Variable Key, shown in the workflow's Settings, is Mixer, and the examples use it to refer to the workflow's variables.

Choose a way in#

Way in
Handler
What the workflow gets
Use it when
Set Workflow Variable with $(self.encoderValue)
Encoder
The encoder's value, written to a workflow variable
Buttons is the only place the value changes
Set Workflow Variable with an expression that adds or subtracts 1
Left and Right
A workflow variable that moves one step per click
The value can also change in the workflow or from another control
Trigger Workflow Action
Left, Right or Encoder
A run of a Workflow Action node, with any options you send
The workflow should do something on each click, not only store a value
The first two need nothing in the workflow except the variable. The third needs a Workflow Action node for each action.

Create the workflow variable#

  1. Open the Mixer workflow, and drag a Workflow Variable node onto the canvas.
  2. In Create Variable, set Variable Key to level and Type to Number. Set Initial Value, for example 0.
  3. Select the check mark, then select Apply.
Anywhere in Buttons, this variable is now $(Mixer.level): the workflow's Variable Key, a dot, then the variable's key. To show it on the button, put $(Mixer.level) in the button's text.
See Use variables for more about workflow variables.

Send the encoder's value to a workflow variable#

  1. On the button's Actions tab, turn on Encoder. Set Min and Max to the range the workflow expects.
  2. Add the internal action Set Workflow Variable.
  3. Choose Workflow Mixer and Variable level.
  4. In Value, type $(self.encoderValue).
Every turn now writes the encoder's value to level. A Number variable converts the value to a number, so expression mode isn't needed here.
Like every Encoder handler, the button counts from its own value. If level is changed somewhere else, such as by the workflow or another button, the next turn sets it back to the encoder's value. In that case, step the variable instead.

Step a workflow variable up and down#

  1. On the button's Actions tab, turn on Right and add Set Workflow Variable, with Workflow Mixer and Variable level.
  2. Select the √x button next to Value to switch it to expression mode, and enter $(Mixer.level) + 1.
  3. Turn on Left and add the same action, with the expression $(Mixer.level) - 1.
Each click reads the variable's current value and writes it back one step higher or lower, so the variable always moves on from where it actually is, whoever changed it last. Use a bigger number for bigger steps, such as $(Mixer.level) + 5.
Expression mode is what makes this work. Without it, Buttons sends the text, such as 4 + 1, rather than the result, and a Number variable doesn't accept it.
To keep the value in a range, use the expression's functions, such as min($(Mixer.level) + 1, 10) on Right and max($(Mixer.level) - 1, 0) on Left.

Trigger workflow actions from Left and Right#

When each click should run part of the workflow, give the workflow an action for each direction.
  1. In the Mixer workflow, add two Workflow Action nodes. In each node's Configuration, set Title to Up and Down.
  2. Add a Counter node. Connect Up's Event to the Counter's Increase One, and Down's Event to Decrease One.
  3. Connect the Counter's Value to the Write input of the level variable node, then select Apply.
  1. On the button, turn on Right and add the internal action Trigger Workflow Action. Choose Workflow Mixer and Workflow Action Up.
  2. Turn on Left and add the same action with Workflow Action Down.
Each click to the right now fires Up, the Counter goes up by one, and level follows. Anything else connected to Up's or Down's Event runs on every click too, so the same turn can send commands, start a timer or update other variables.
A Workflow Action can also carry options. When the button triggers it, its options appear below Workflow Action, the same way a connection action's options do. On the Encoder handler, a Number option offers Encoder Value, and a Dropdown option offers Create Encoder Selector from choices, so a turn can pick from the workflow's own list.

If you get stuck#

What you see
What to try
"An error occured while executing the action" after Left or Right with Set Workflow Variable.
Check that Value is in expression mode. Without it, the expression is sent as text.
A turn does nothing and the action shows an error.
Check that the workflow is turned on and that you selected Apply after adding the variable. Set Workflow Variable only works while the workflow runs.
The button text shows $(Mixer.level) rather than a number.
Check the workflow's Variable Key in its Settings and the variable's key, and that the reference uses a dot between them: $(Mixer.level).
The value jumps when you start turning.
The variable was changed somewhere else since the encoder last moved it. Use Left and Right to step it instead.
Turning the encoder does nothing at all.
Check the encoder's assignment. See If you get stuck on the encoders page.

Where to go next#

  • Control levels and choices with encoders, for encoder assignment, ranges and showing the value.
  • Workflow variable and action nodes, for the Workflow Variable and Workflow Action nodes.
  • Internal actions, for Set Workflow Variable and Trigger Workflow Action.

Was this helpful?

Was this helpful?

0 of 0 users found this page helpful