SEPIA-Framework / sepia-docs

Documentation and Wiki for SEPIA. Please post your questions and bug-reports here in the issues section! Thank you :-)
https://sepia-framework.github.io/
237 stars 16 forks source link

Sepia in Docker with openhab integration #14

Closed jogi4github closed 4 years ago

jogi4github commented 4 years ago

Hello,

I wanted to get an offline voice assistant that's how I got in touch with SEPIA. As far as I saw - amazing work and a great framework :-) My current installation is a docker one, based on your Dockerfile. So far so good. My current problem is that I'm not able to connect to my openhab2 installation. After adding the smarthome_hub_name and smarthome_hub_host address the get devices function does not succeed. If I do the same in a normal installation everything works fine. My docker-compose.yml file looks like this and forwards all ports between 20721 - 20726.

version: "3"

services:
  sepia:
    container_name: sepia
    image: jogi/sepia:latest
    hostname: sepia
    domainname: local
    ports:
        - 20721:20721
        - 20722:20722
        - 20723:20723
        - 20724:20724
        - 20725:20725
        - 20726:20726
    volumes:
      - './sepia-share/SEPIA:/home/admin/SEPIA'
    restart: always

Do I miss something here? Do I have to add a callback address somewhere as the SEPIA source IP will not work due to the docker container setup?

Cheers Jörg

sepia-assistant commented 4 years ago

Hi Jörg,

sorry for the late reply, I seem to have missed the notifications about new issues somehow :-/ As far as I understand you've used the Dockerfile to build the latest version of SEPIA (v2.4.0)?

Your docker-compose.yml looks good, actually since the Docker version is using the proxy by default port 20726 should even be enough.

Do you see any error messages when loading the devices either in the SEPIA Control HUB (on screen or console F12) or in the server log at: [SEPIA]/sepia-assist-server/log.out ?

Everything else is working fine so far? (communication with the assistant etc.)

Regards, Florian

jogi4github commented 4 years ago

Hi Florian,

thanks for your feedback. Actually there are no errors in the assist server log.out file. Yes the Sepia Version is 2.4.0

sepia    | Running SEPIA Assist (sepia-assist-v2.4.0.jar)
sepia    | Running SEPIA WebSocket Chat (sepia-chat-v1.2.2.jar)
sepia    | Running SEPIA Teach (sepia-teach-v2.1.0.jar)

The clients acts normally. I can ask questions in English or German and get answers accodingly. Regarding the proxy configuration. If I run http://[IP]:20726/tools/index.html I get an HTTP ERROR 404. However calling http://[IP]:20726 returns a reverse proxy answer SEPIA reverse-proxy powered by Undertow

Regards Jörg

sepia-assistant commented 4 years ago

Hi Jörg,

the URL for the SEPIA Control HUB should be http://[IP]:20726/sepia/assist/tools/index.html since the proxy path is defined as /sepia/assist -> localhost:20721 (here and here is a little more info).

After adding the smarthome_hub_name and smarthome_hub_host address the get devices function does not succeed

Can you ping your Openhab server (smarthome_hub_host address) from inside the Docker container somehow to test if the SEPIA server can actually access it?

I'm working on v2.4.1 right now and as soon as there is a new release I'll build a new Docker container as well to test the connections.

jogi4github commented 4 years ago

Hi Florian,

thanks for the additional information. Actually I got it sorted out and it was my mistake. I missed the http:// infront of the smarthome_hub_host address. After adding it, the connection immediately started to work. I also struggeled with the changed hostname in the client interface after setting up a nginx reverse proxy. But after a while I saw that when leaving the hostname in the client blank a hint is displayed pointing to the correct hostname syntax [domainname]/sepia. So now I'm finally able to logon via NGinX reverse proxy and also get the connection to openHAB working. There is only one thing I'm currently struggeling with. I want to setup a raspberry pi client with a voice matrix microphone. I followed your description , but fail getting tts setup. As you wrote you got it working, what did you install be able to select the voice setting in your client. I already installed espeak but chromium seems to not use it automatically and calling chromium with the flag chromium-browser --enable-speech-dispatcher as suggested in some forums did also not work.

Cheers Jörg

fquirin commented 4 years ago

Hi Jörg,

I've missed your last question again :see_no_evil: I'm very sorry :-( About your question: TTS is a tricky beast and I had so many problems in the latest Raspbian + Chromium version (conflicts between Pulseaudio and Alsa + very buggy speech dispatcher in Chrome) that I decided to move it completely to the SEPIA server and stream the results to the RPi client. The new version with "official" RPi client should be available soon. Instructions and scripts are available here in preview ^^: https://github.com/SEPIA-Framework/sepia-installation-and-setup/tree/dev/sepia-client-installation/rpi