UNPKG

msfs-mcp-server

Version:

Model Context Protocol server for Microsoft Flight Simulator SimConnect integration

181 lines (144 loc) โ€ข 4.56 kB
# MSFS Lighting Events Troubleshooting Guide ## ๐Ÿ” **Common Issues with Lighting Events** ### Problem: Events report "success" but lights don't change **Root Causes:** 1. **Aircraft-specific events** - Complex aircraft (PMDG, Fenix, FBW) often ignore standard SimConnect events 2. **Event name variations** - Different aircraft respond to different event names 3. **SimConnect vs Aircraft Systems** - Some aircraft have custom electrical/lighting systems ## ๐ŸŽฏ **Standard MSFS Lighting Events** ### Navigation Lights - `NAV_LIGHTS_ON` - `NAV_LIGHTS_OFF` - `NAV_LIGHTS_TOGGLE` - `TOGGLE_NAV_LIGHTS` (alternative) ### Landing Lights - `LANDING_LIGHTS_ON` - `LANDING_LIGHTS_OFF` - `LANDING_LIGHTS_TOGGLE` - `TOGGLE_LANDING_LIGHTS` (alternative) ### Beacon Lights - `BEACON_LIGHTS_ON` - `BEACON_LIGHTS_OFF` - `BEACON_LIGHTS_TOGGLE` - `TOGGLE_BEACON_LIGHTS` (alternative) ### Strobe Lights - `STROBES_ON` - `STROBES_OFF` - `STROBES_TOGGLE` - `TOGGLE_STROBES` (alternative) ### Taxi Lights - `TAXI_LIGHTS_ON` - `TAXI_LIGHTS_OFF` - `TAXI_LIGHTS_TOGGLE` - `TOGGLE_TAXI_LIGHTS` (alternative) ## ๐Ÿงช **Debugging Steps** ### Step 1: Check Current Light Status ``` "What's the status of my navigation lights?" "Are my landing lights on?" "Check all my lights status" ``` ### Step 2: Try Different Event Variations ``` "Send event NAV_LIGHTS_TOGGLE" "Send event TOGGLE_NAV_LIGHTS" "Send event NAV_LIGHTS_OFF" ``` ### Step 3: Use SET Events with Parameters ``` "Send event NAV_LIGHTS_SET with data 0" (off) "Send event NAV_LIGHTS_SET with data 1" (on) "Send event LANDING_LIGHTS_SET with data 0" ``` ### Step 4: Verify with SimVar Reading After sending an event, immediately check: ``` "Are my navigation lights on now?" "Check navigation lights status" ``` ## ๐Ÿš **Aircraft-Specific Solutions** ### Default MSFS Aircraft - Usually respond to standard events - Try `TOGGLE_*` events first ### Complex Add-on Aircraft (PMDG, Fenix, FBW) - Often have custom systems - May require clicking cockpit switches - Try both standard and SET events - Some may not respond to SimConnect at all ### Steam Gauge Aircraft - Usually work with standard events - Try `*_ON`/`*_OFF` events ## ๐Ÿ”ง **Alternative Methods** ### If Events Don't Work: 1. **Try Key Events** (keyboard simulation): ``` "Send event KEY_TOGGLE_NAV_LIGHTS" "Send event KEY_LANDING_LIGHTS" ``` 2. **Use L:Vars** (for complex aircraft): ``` "Set SimVar L:LIGHTING_NAV_Switch to 1" "Set SimVar L:LIGHTING_Landing_Switch to 0" ``` 3. **Manual Cockpit Interaction**: Some aircraft require manual switch operation ## ๐Ÿ“ **Test Commands for Troubleshooting** ### Test All Light Toggle Events: ``` "Send event NAV_LIGHTS_TOGGLE" "Send event LANDING_LIGHTS_TOGGLE" "Send event BEACON_LIGHTS_TOGGLE" "Send event STROBES_TOGGLE" "Send event TAXI_LIGHTS_TOGGLE" ``` ### Test with SET Events: ``` "Send event NAV_LIGHTS_SET with data 0" "Send event LANDING_LIGHTS_SET with data 0" "Send event BEACON_LIGHTS_SET with data 0" ``` ### Verify Status: ``` "Check all my lights status" "Are any lights on?" "Get LIGHT NAV status" "Get LIGHT LANDING status" "Get LIGHT BEACON status" ``` ## ๐ŸŽ›๏ธ **Master External Lights Commands** ### Turn Off All External Lights: Try these in sequence: ``` "Send event NAV_LIGHTS_OFF" "Send event LANDING_LIGHTS_OFF" "Send event BEACON_LIGHTS_OFF" "Send event STROBES_OFF" "Send event TAXI_LIGHTS_OFF" ``` ### Alternative All-Off Commands: ``` "Send event NAV_LIGHTS_SET with data 0" "Send event LANDING_LIGHTS_SET with data 0" "Send event BEACON_LIGHTS_SET with data 0" "Send event STROBES_SET with data 0" "Send event TAXI_LIGHTS_SET with data 0" ``` ## ๐Ÿ” **Debugging Output** When you run the MCP server, you should see console output like: ``` ๐Ÿ“ก Sending event: NAV_LIGHTS_OFF with data: 0, eventId: 1004 โœ… Event sent successfully: NAV_LIGHTS_OFF ``` If you don't see this output, the event isn't being sent properly. ## ๐Ÿ’ก **Recommendations** 1. **Test with Default Aircraft First** (C172, C208) to verify events work 2. **Try Multiple Event Names** for the same function 3. **Use SimVar Reading** to verify if events actually worked 4. **Check Aircraft Documentation** for specific event requirements 5. **Consider Aircraft Complexity** - some aircraft may not support SimConnect lighting control --- **Next Steps:** 1. Try the alternative event names listed above 2. Check the console output for debugging info 3. Test with a default MSFS aircraft first 4. Use SimVar reading to verify light status changes