Can i use socket.io or something similar to build custom (externally running) ui?

Hi!
Is there ability and docs/examples of making custom page/ui not running on openhab (external hosting) and able to use sockets to read data and get updates in realtime form OH2?

Know im missing something, but …

Thanks.

Hey Ian,
You are free to build own user interface for openhab. There are many different ways to visualise data which is collected in smart home.

All data which you see in other UIs is fetched via REST api. If you are interested in Swagger documentation you have to install restdocs feature. Once you are done with that you will find complete description of all endpoints.

In terms of socket.io - server side of socket.io is currently specific to nodejs applications thus it is not possible to get it running with openhab unless you bring your own adapter. Only one way which is currently supported to push events is SSE (server sent events).

Cheers,
Lukasz

2 Likes