-
Notifications
You must be signed in to change notification settings - Fork 3
API documentation
To create a home automation screen, you will need to connect to Beoremote Halo and send a configuration to it.
Communication with Beoremote Halo is done using a WebSocket. Beoremote Halo creates a WebSocket server on: [Beoremote Halo IP]:8080
.
Use the beoremote-halo
CLI to scan and find the hostname of your Beoremote Halo.
When a WebSocket client connects to Beoremote Halo, it will send a sequence of information. Before sending the configuration wait for the event state active
to arrive first to ensure the Beoremote Halo is ready to process it. Beoremote Halo will acknowledge with an "OK" if the configuration is accepted or an error message in case the configuration is not accepted. The configuration will persist until the client closes the WebSocket connection.
Once a valid configuration has been sent, Beoremote Halo will update its display to reflect the configured pages and buttons, including any icons and texts added. For details on the configuration refer to the API description.
Here is an example of sending the configuration and subsequently the user pressing the button. The client then changes the state of the button from inactive to active or the other way around depending on the condition of the application the button activates.
Note! Beoremote Halo will remove the home automation screens if the WebSocket closes for any reason (rebooting, losing network etc.). It is the responsibility of the client to monitor the Beoremote Halo, reestablish connection and resend the configuration again if the WebSocket connection is lost. It is advised to use WebSocket's ping/pong feature to ensure the connection is alive.