Open Christanoid opened 1 day ago
I've seen this behavior before when the EventStream API was just introduced. There was an error after each event. I had some code in the project to catch any exception and reconnect. But with a firmware upgrade this went away. Are you on the latest bridge firmware? Because the EventStream should be able to receive multiple messages.
I have checked on my Philips app and all bridges are up to date (1.67.1967054020). On that note, in case that is a problem, I have two bridges that I connect to at the same time.
Can you run the console sample? It only shows the eventstream changes. It's a basic scenario that should be able to show multiple updates. https://github.com/michielpost/Q42.HueApi/tree/master/src/HueApi.ConsoleSample
Ah, I left out a detail in my original Ticket, sorry. The EventStream works for receiving every time, for as many messages as the bridge happens to send up until I use the attached Update once, after which it stops being able to receive
Ok, I'll make a test scenario later this week to check it out.
Hi, first up thanks again for the quick response in yesterdays ticket ;) Sadly I found another oddity today. I tried to rewrite my code away from polling light colors over to using the EventStream feature. While doing that I noticed some oddities. There are three scenarios:
Using one LocalApiClient for EventStream subscription and sending update commands to the bridge.
System.ObjectDisposedException: Cannot access a disposed object. Object name: 'System.Net.Http.HttpClient'. at System.Net.Http.HttpClient.CheckRequestBeforeSend(HttpRequestMessage request) at System.Net.Http.HttpClient.SendAsync(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationToken cancellationToken) at HueApi.BaseHueApi.HuePutRequestAsync[D](String url, D data)
Using two LocalApiClients, one for receiving the EventStream subscription, the other for sending updates.
Not using the EventStream, instead just polling and updating with the same client.
Just in case I did something wrong here are my receiving and sending functions:
and for updating:
If you need any assistance please feel free to ask.