Closed NicoVermeir closed 6 years ago
Maybe you can have a look at : https://github.com/Alex-Witkowski/openhab.windows/tree/EventSubscriptionTest
It is a first proof of concept with event stream. Currently I'm not very happy with the quality but its time for bed :)
I tried to get long polling to work but was not successful. @NicoVermeir Do you have any documentation that is up to date?
@Alex-Witkowski There are two mechanisms:
Both use SSE, I've ported EventSource4Net to win8.1 universal in the past for a similar project. not sure if that's better than your version https://github.com/NicoVermeir/HomeGenie-WindowsPhone/tree/master/EventSource4Net.Universal
@Alex-Witkowski are you still working on this? just to make sure that we're not working on the same things :)
At the moment I have a lot of load at work and therefor don't have time to code on the app.
So my approach was the "General item update push" and send update events over messenger. Widgets that where actually displayed subscribe to update messages. I think it's not the worst solution but the SSE handling needs improvement.
Any time frame for the next release?
depends on when I actually figure out how git works...
also need to discuss a release cycle with the openhab guys so no idea at the moment
fixed in upcoming version
That was THE bug that makes the application unusable. Thank you.
For my information, what mechanism are you using for updates ? SSE events ?
SSE events indeed. the openHAB api exposes the events through a stream
the code is at the bottom of this file https://github.com/openhab/openhab.windows/blob/master/Openhab.Core/SDK/OpenHAB.cs
the widgets should respons to actions taken from other clients.
for example: when I change a slider value from an android device with habdroid, the corresponding widget on the windows app should set the new value as well so that the app stays in sync with the server