Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

On / Off Button - StreamDeck

Featured Replies

Hello,

I looked through the manual and I must be missing something.  I want to use the OnOff button that came with the AAO StreamDeck plugin.

When I press the button I want the sim to PAUSE and the button to show it is selected (green light).  When I press the button again the sim should un-pause.

Sounded simple...

Here's what I have tried so far:

I believe I want to use:  L:PAUSE_TOGGLE, Number

In the actual button I tried this:

Write Event:  L:     PAUSE_TOGGLE
On Value:  1

Write Event:  L:     PAUSE_TOGGLE
Off Value:  0

What am I missing?  Thanks for your help!

  • Commercial Member

PAUSE_TOGGLE is a K: event, the SDK default.

(L: are only variables, only to be used if and when the aircraft logic specifically requires this. Strictily speaking, they are not meant to be controlling aircraft systems - only animations)

When in doubt, open the Script Editor in AAO and use the "Insert variable" or "Insert Event" buttons as appropriate. There you can also test the event. You can copy the event name directly from the selection list too, using left-click-right-click. Then you can paste it into the StreamDeck PI.

A "Toggle" action would be better suited for this, since the event is a Toggle too (you can't switch Pause on/off deterministically with that, so your values of 0 and 1 are of no consequence anyway)

Note: in MSFS 2024 (>K:PAUSE_TOGGLE) doesn't seem to work anymore. I had to use 1 (>K:PAUSE_SET) and 0 (>K:PAUSE_SET)

Edited by Lorby_SI

LORBY-SI

  • Commercial Member

Please note that there is no official SDK variable telling you that the sim is paused. 

AAO has an internal variable for that though: (L:PauseState) It is either 0 or 1, depending on the state of the simulation.

Edited by Lorby_SI

LORBY-SI

  • Author

Thanks for your help.

I switched to the Toggle type of button and entered the following parameters:

Key Down Event:     K:     PAUSE_SET
Event Value:  1

Nothing happens.  

  • Commercial Member
1 hour ago, IrwinMFletcher said:

Thanks for your help.

I switched to the Toggle type of button and entered the following parameters:

Key Down Event:     K:     PAUSE_SET
Event Value:  1

Nothing happens.  

What simulator are you trying to do this with? And what kind of pause are you trying to operate (MSFS has different types of "pause")? 

_TOGGLE is best used with Toggle Actions.

_SET is an On/Off Event, so that would be best used with an On/Off Action.

Be mindful of what I wrote above. In both cases you need a variable to read the current state from. If you just want to trigger the Event - use the "Event" action.

Edited by Lorby_SI

LORBY-SI

  • Author

This is for MSFS 2024.

I am not sure about different types of pause.  I just want to be able to pause the game if the phone rings, etc, etc

I'll try what you suggested.  Thanks again.

Edited by IrwinMFletcher
more info added

  • Commercial Member
35 minutes ago, IrwinMFletcher said:

This is for MSFS 2024.

I'll look into that. I had trouble with the pause events too in that sim, just yesterday (my Time Machine app). PAUSE_SET seems to be the only one that is working.

LORBY-SI

  • Commercial Member
42 minutes ago, IrwinMFletcher said:

This is for MSFS 2024.

Action: "OnOff"
Write Event: K: PAUSE_SET
ON value: 1
Write event: K: PAUSE_SET
OFF value: 0
Repeat No
Read variable: L: PauseState
ON value: 1

(Long press and autoscript empty)
Submit

LORBY-SI

Is it me?  I think that the "Toggle" button example in the Elgato Plugin documentation found on the web site does not match that that I have in 37.01 version of the plugin.  In the document it shows a "Write Event", "Send Value" and a "Read Value".  But in Stream Deck the Toggle action is very similar to the On/Off action.  By chance does the document need to be updated to the latest release?

Thanks

2 hours ago, Lorby_SI said:

Yes, I guess that hasn't been updated in a while.

I mention this partly because I'm having difficulty getting toggle events to work with the toggle action.  I have to keep reverting the On/Off action.  The Toggle and On/Off actions seem very similar now.

  • Commercial Member
1 minute ago, n116dh said:

I'm having difficulty getting toggle events to work

Do you have an example that I could look at? I've seen the Toggle action in use on many SD profiles, I'm not aware that there is anything wrong with it.

LORBY-SI

Please give me some time to work up some screen shots.  I will respond when ready, but could be a couple of days.

  • Commercial Member
17 minutes ago, n116dh said:

The Toggle and On/Off actions seem very similar now.

Not really. With Toggle you only need a single Toggle event (=it must be a toggle in itself, meaning a TOGGLE event or a script that flips the aircraft system On/Off). With OnOff you need two separate events, one for ON the second for OFF.

With both you have to add a return variable that tells the action if the aircraft system that you are operating is on or off, so it can set the icon correctly.

Edited by Lorby_SI

LORBY-SI

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.