Open llamahunter opened 8 years ago
The openHAB server supports pushing updates
Note that all clients (Android / iOS) currently do this using blocking HTTP on the sitemap - if some value changes, you get the sitemap page back as a whole and you can re-render your page. You do not stand a chance to have any more finegrained results returned.
In openHAB 2, you have actually more features, because SSE is used for fine-grained updates, see https://www.eclipse.org/smarthome/documentation/features/rest.html#server-sent-events-sse The new Basic UI already uses this successfully. The only thing missing there is a specific event for widget updates (see https://github.com/eclipse/smarthome/issues/674) - currently, the Basic UI subscribes on item updates, but loses the state formatting (https://github.com/eclipse/smarthome/issues/640).
So, what's the release plan for OH2? Does it have an expected ship date? What's the EOL date for OH1?
No release date yet, but openHAB 1.8 from Jan 11 was the last 1.x release - the next one will be 2.0 (maybe around early summer?). Nonetheless, it will still be for a long time that people use a 1.x runtime, so clients should continue to support it. When working on major new features, it might though make sense to only support 2.0, since this is anyhow more powerful and you can also still influence the server side in case you have special requirements (like e.g. the special events mentioned above).
When on a screen that displays, say, the state of a dimmer, when I manipulate the dimmer through some other openHAB ui, the value on the watch app should update as well.
Unclear exactly how to do this in javascript, tho. The openHAB server supports pushing updates (see here), but it sounds like websockets support got dropped from openHAB2 (see here), and so we're back to some sort of long polling like solution.