B: InputEvent ELECTRICAL_BATTERY_1 doesn't update SimVar ELECTRICAL MASTER BATTERY

Version: 1.1.28.0 (ou ton numéro de build MSFS 2024)

Frequency: Consistently

Severity: High
(Critical but workarounds are available - important feature not working as expected, impacts external hardware panel developers)

Marketplace package name: N/A (Default Asobo C172 G1000)

Context:

  • Aircraft: Cessna 172 Skyhawk G1000 (default Asobo)
  • When: In flight, Developer Mode ON
  • Using SimConnect API to control aircraft via B: InputEvents
  • External application connecting via SimConnect

Similar MSFS 2020 issue: N/A (B: InputEvents are new to MSFS 2024)


Bug description:

The B: InputEvent ELECTRICAL_BATTERY_1 correctly toggles the physical battery switch in the C172 G1000 cockpit, but does NOT update the global SimVar ELECTRICAL MASTER BATTERY:1. This breaks feedback for external applications (hardware panels, MobiFlight, SPAD.neXt, custom panels).

Other B: InputEvents (like LIGHTING_NAV_0) correctly update their corresponding SimVars, making this behavior inconsistent.


Repro steps:

  1. Enable Developer Mode in MSFS 2024
  2. Load Cessna 172 Skyhawk G1000 (Asobo default aircraft)
  3. Start in flight (any location)
  4. Create a SimConnect application that:
    • Gets the hash for B: InputEvent ELECTRICAL_BATTERY_1
    • Sends SetInputEvent(hash, 1.0) to toggle battery
    • Immediately requests ELECTRICAL MASTER BATTERY:1 via RequestDataOnSimObject
  5. Observe the physical battery switch in cockpit toggles correctly
  6. Observe the SimVar value returned does NOT change

Alternative test (no code required):

  • Click the battery switch with mouse in cockpit (mouse uses B: events internally)
  • Physical switch moves :white_check_mark:
  • External SimConnect application monitoring ELECTRICAL MASTER BATTERY:1 sees no change :cross_mark:

Expected behavior:

  • B: InputEvent should update both the physical switch AND the corresponding SimVar
  • This works correctly for other B: events (tested: LIGHTING_NAV_0, LIGHTING_BEACON_0, AS1000_AUTOPILOT_AP_PFD)
  • K: event TOGGLE_MASTER_BATTERY correctly updates the SimVar (workaround available)

Actual behavior:

  • Physical battery switch: :white_check_mark: Toggles correctly
  • SimVar ELECTRICAL MASTER BATTERY:1: :cross_mark: Remains unchanged
  • External LED feedback: :cross_mark: Cannot synchronize with cockpit state

Impact:

  • Breaks external hardware panels LED synchronization
  • Forces developers to use K: events instead of recommended modern B: InputEvents
  • Inconsistent API behavior (some B: events work, some don’t)
  • Affects all SimConnect-based external applications

Workaround:

Use K: event TOGGLE_MASTER_BATTERY instead of B: InputEvent for reliable SimVar feedback.


Additional notes:

Other B: InputEvents that likely have the same issue:

  • ELECTRICAL_ALTERNATOR_1
  • ELECTRICAL_EXTERNAL_POWER_1

This inconsistency suggests a missing SimVar update step in the electrical system’s B: InputEvent handlers, while other systems (lights, autopilot) implement it correctly.


Attachments: N/A

Private attachments: N/A