Closed bobbydog closed 9 months ago
there is no SSE being used. it's just an http stream (done via IAsyncEnumerable
):
also the endpoint does not cause a GetStatus Command to be issued to the inverter per browser client.
it sends the same status data to all connected browsers.
reading the status data from the inverter is done by a background service which queues GetStatus Command
s which queues the QPIGS
command every 2 seconds.
there's a separate background service for the main queue (which stores all type of commands) and executes them serially.
the architecture is a bit difficult to understand but that's the only way i found to query data from the inverter and distribute that data to multiple client browsers in a reliable way.
This SSE example Endpoint GetStatus , I wonder when there are more than two browser clients subsribed "status", the code is seemed to be the CommandQueue.GetCommand() method will just Peek one comand for the one client to comsume, yet others won't get response ?