HABSpeaker is a project designed to facilitate the use of the openHAB dialog processing capabilities.
It registers an AudioSink, an AudioSource and a DialogProcessor instance that are bound to the WebSocket connection establish between the server and the web UI.
Be aware that for capturing the microphone audio in a browser it requires an initial user event and using the page over https, , here you can find the related documentation about setting up https on your instance. Personally I use the docker image for running openHAB and I use this open source project also installed as docker container to manage my domains and certificates: Nginx Proxy Manager. If you want to give it a quick try without setting up https, in Chrome you can disable the security for a local domain.
This project does not work with the myOpenHAB Cloud Service for now.
You can install HABSpeaker as a desktop or mobile app (Electron and Capacitor were used to bring the web UI to those platforms). Those apps work over http and do not require the initial user interaction to launch the connection, other than that is the same than using the UI installed as a WebApp.
Here you can find the web UI packaged as an ElectronJS app.
Here you can find the web UI packaged as a mobile app. (only the android apk is available at the moment, IOS app is also working but I don’t have a viable way of distribution it, as I don’t have an paid apple developer account).
Here you can find the project readme which summarize its installation and functionalities.
- Change addon type and package uri to fix navigation problems in the MainUI to the addon menus.
- Fix navigation to add as new thing.
- Fix secondary color option name.
- Fix electron/capacitor integrations.
- Implement suspend on hide option, recommended for mobile to suspend the speaker when in background.
- Minor fixes.
- Remove mp3 support from sink.
You can find other releases here: https://github.com/GiviMAD/openhab-addons/releases
I think the current one is the last beta version, as I have retested all the platforms and I think it’s working correctly.
I have two minor TODOs:
- I would like to change the library that is used for resampling on the browser because it’s included in the WebWorker bundle and makes the file too big.
- Review css, at least some media queries are needed for the widget on the electron version. But if anyone likes styling any improvement will be welcome.
Also there are two more things I would like to accomplish:
- Make it work with the cloud connector.
- Allow integration with the MainUI, I would like to mimic the way HABot is integrated as a widget.
Actually I have tested it on:
- Web: Chrome, Firefox, Safari.
- Desktop: Windows, MacOS.
- Mobile: iOS, Android.