I was playing around with it and believe I was successfully sending Hvars to the sim although I probably didn't use the right ones yet. The websocket response to the vars.write command was success=true at least.
But now I ran into some issue. I read about the MobiFlight WASM module and that it made more variables available (eg. for the G1000), so I installed that into the Community folder and when I then started MSFS and was trying to use the websocket server I got the error that it couldn't start the Variables service (see the first screenshot). Since I also had the FSUIPC WASM installed I was thinking that maybe I could not have both WASM modules installed at the same time, so I removed the MobiFlight one again, restarted MSFS and tried again. But I still get the same error (see second screenshot) - and if I click the Start button I get the unhandled exception which I also copied in below. (also tried restarting the computer entirely)
Since I got success=true in the beginning I believe everything was connecting ok under the MSFS Variables tab - but since I don't specifically recall what it said there I can't for sure say whether this problem was there before I tried the MobiFlight WASM module... Any ideas?
System.InvalidOperationException: Invoke or BeginInvoke cannot be called on a control until the window handle has been created.
at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
at FSUIPCWebSocketServer.GUI.ctlVariableServiceStatus.vs_LogEntryReceived(Object sender, LogEventArgs e)
at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
at FSUIPCWebSocketServer.VariableServices.VS_OnLogEntryReceived(Object sender, LogEventArgs e)
at FSUIPC.WAPI.fsuipcw_start()
at FSUIPCWebSocketServer.VariableServices.Start()
at FSUIPCWebSocketServer.GUI.ctlVariableServiceStatus.btnStartStop_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)