voorkant / voorkant-core

https://voorkant.org/
MIT License
2 stars 3 forks source link

"what(): Send out a command, but received something with a different ID." when messages from HA are not received in order #78

Closed cyclops1982 closed 2 months ago

cyclops1982 commented 2 months ago

The error "what(): Send out a command, but received something with a different ID." occurs when messages received from HA are not responded to in the order that we requested them. Each request has it's own ID, and this error triggers when we're expecting an ID, but we receive an other ID.

We do not have a clear reproduction for this now, but it does seem to happen faster when we're trying to run client-lvgl with the dashboard command and the given dashboard does not exist.

To fix this, we'll need some kind of queue/list that understands which requests ID's have been send out, and which we've received. It should then make sure that whatever asked for request id 5, is also provided with response id 5.

cyclops1982 commented 2 months ago

One (bad) idea to solve this: