[RELEASE] Echo Speaks V4

Its not bad using docker for windows, pretty much the same commands as linux, just have to run from command prompt. Only catch is on Windows a bridged connection is not supported so you have to set the host IP with the environment variable to get it to work right. I documented the commands to get it going somewhere in one of these multiple threads about it.

2 Likes

i'm trying to get the docker container running on my raspberry pi through Portainer, but having some trouble and not totally sure which of the many guides in these forums i should be using.

when i setup a container from the docker hub tonesto7/echo-speaks-server and run it, i get this error: "exec /usr/local/bin/docker-entrypoint.sh: exec format error". is that because the architecture for that image is amd64 and my pi is armv7?

I have a Realtek RTD1296 AMR Cortex-A53 processor in my QNAP NAS and cannot get Echo Speaks to run on that as I also get the exec format error message.
Very new to docker so I am guessing the same as you that this is not compatible with our specific processors. Hopefully someone here will tell us otherwise and help withour installations???

I’ve been somewhat learning docker through a few other services, but I do think the architecture is the issue. That image is only good for one platform (amd64 for linux x86-64) which is not ARM like we both have.

I think we have to build our own docker images, which we can do using the provided docker file from the GitHub repo.

I did that, using the 2.8.0 tonesto7 version, and deployed the container successfully in a portainer stack using the docker-compose script from TonyF (but it didn’t like the volume path so I commented that out.) my config page did show as working, but it also showed a second IP of 10.6.0.1 which is what I see in the logs even though I specified 192.168.1.x in the config, and I think that’s why i still can’t get the app to work yet.

@dJOS do you create a portainer volume for this container?

No need, portainer takes care of the minimum requiremtns for you, just click add container:

Then put in the full name of the docker image tonesto7/echo-speaks-server
and then click deploy.

After that you might need to do some config if this is a new install eg:

1 Like

Thanks, that did it. I wasn’t sure how to add a volume as an environment variable but your screenshot was very helpful.

1 Like

No worries, Im glad it helped.

1 Like

unfortunately the tonesto7 image is the wrong architecture for my pi and that container won't run.

i used docker build to create my own image, which does run, but i'm seeing this in the logs when it starts:

IP Address:  192.168.1.99
IP Address:  10.6.0.1
1-20-2023 - 3:58:59am error: 	Config Check Did Not Pass
1-20-2023 - 3:58:59am info: 	** Echo Speaks Config Service (v2.8.0) is Running at (IP: 10.6.0.1 | Port: 8091) | ProcessId: 1 **
1-20-2023 - 3:58:59am info: 	** On Heroku: (false) **
1-20-2023 - 3:58:59am info: 	Checking for Server Version Updates...

the first IP is the host, and the second IP i think is related to my VPN which also runs on my host. i'm guessing this has something to do with me using network_mode: host ? should i try to use a bridge network for this container instead?

Set the ENV Variable 'ipAddress' to the correct IP.
You can just prepend ipAddress=192.168.1.99 on the same line before whatever command you use to start the container. May also want to toss a --restart=always in there also at the end.

1 Like

i'm actually using portainer stacks which i find make it much easier to make quick adjustments and redeploy

version: "3"

services: 
  echo-speaks-server-arm: 
    
    # local arm image I built
    image: echo-speaks-server:latest
    container_name: echo-speaks-server-arm
    restart: unless-stopped 
    network_mode: host 
    environment: 
      - ipAddress=192.168.1.99
    ports: 
      - "8091:8091"
      
    # I keep getting stack errors if this is uncommented  
    # volumes:
    #   - './data:mnt/es-data'

however I was using "IPADDRESS" instead of "ipAddress". In changing that, the logs no longer show the incorrect 10.x.x.x address anymore.

also, i was able to get my cookie, but the app still doesnt seem to show me as logged in properly. is this where people were saying they need to reboot?

edit: i rebooted, but the cookie disappeared, presumably because my container doesnt have persistent storage setup. not quite sure why that part isnt working. if i can figure that out, then i''ll publish my image on dockerhub for other arm users.
anyway, after logging in again, it works and i can now see my devices!

edit2: the error i get when deploying tonesto's 2.8.0 image is:

failed to deploy a stack: 
Network echo-speaks-server-arm_default 
Creating Network echo-speaks-server-arm_default 
Created Container echo-speaks-server-arm 
Creating Error response from daemon: 
invalid volume specification: '/data/compose/30/data:mnt/es-data:rw': 
invalid mount config for type "bind": 
invalid mount path: 'mnt/es-data' mount path must be absolute

but i dont get that error with TonyFleischer's 2.7.2 image. i know there are some differences between the repos, so maybe Tony added something to his to make that volume work? i dont understand enough about these volumes and how they should be configured

1 Like

What if you define a full path to the volume mountpoint on your docker host?

e.g. /home/steinauf/es-data:mnt/es-data

@tonesto7 the process.exit code in the update mentioned is the cause of the issue with the container stopping after several days of running. Commenting out that code has kept the container running after a cookie refresh. I can manage the restart if the container in NodeRed for now but curious your thoughts here with adding code to restart vs stop the container after cookie refresh.

i was able to get the stack to start by removing "mnt" altogether which i guess makes that an absolute path within the container and does what the error message was asking for. didn't need to adjust the local volume path, but seems like that could be useful to move it to somewhere more intuitive to find.

i have no idea yet if these changes will bork something else or if these paths are completely arbitrary.

that said, i uploaded my armv7 images to docker hub last night for both TonyFleischer's 2.7.2 and tonesto7's 2.8.0. i was able to get both of these to work.

the easiest way for me to spin these up is with portainer stacks using docker compose. this simplicity works as long as the image matches the host's architecture (i'm using a Pi4 with raspi os buster). otherwise you'll have to build the images yourself

version: "3"

services: 
  echo-speaks-server: 
    # uncomment one image line for your desired architecture. steinauf:armv7; tonesto7:amd64
    image: steinauf/echo-speaks-server:2.8.0
    # image: tonesto7/echo-speaks-server:latest
    container_name: echo-speaks-server
    restart: unless-stopped 
    environment: 
      # replace X.X.X.X with your host IP
      - hubPlatform=Hubitat
      - IPAddressOverride=X.X.X.X
      - HOME=/es-data
      - ipAddress=X.X.X.X
    ports: 
      - "8091:8091"
    volumes:
      # Data persistency
      - './data:/es-data'

I'm open to suggestions on the general workflow, as well as any efficiency improvements/corrections i could make.

I had to reinstall the app since I had stopped using it since it stopped working with alexa. then discovered I can do a local server, got it setup and running and working, This app found my devices, howver it will not create them, cookie is current and shows im online with amazon.

How do I get it to create the devices it found

App & Device version 4.2.2.0 seems to have disabled TTS for the SONOS Move device, although this has worked in previous releases.

Is it possible to get TTS re-enabled for this device?

Im trying to install server with the directions

but doing it on a Windows Desktop docker

I got to the command docker-compose build

but it gets the following error...i cant tell what file it cant find...any suggestions?

0:/echo-speaks-server-docker-enablement/docker# docker-compose build
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 699, in urlopen
    httplib_response = self._make_request(
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 394, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/lib/python3.10/http/client.py", line 1282, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.10/http/client.py", line 1328, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.10/http/client.py", line 1277, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.10/http/client.py", line 1037, in _send_output
    self.send(msg)
  File "/usr/lib/python3.10/http/client.py", line 975, in send
    self.connect()
  File "/usr/lib/python3/dist-packages/docker/transport/unixconn.py", line 30, in connect
    sock.connect(self.unix_socket)
FileNotFoundError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/requests/adapters.py", line 439, in send
    resp = conn.urlopen(
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 755, in urlopen
    retries = retries.increment(
  File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 532, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "/usr/lib/python3/dist-packages/six.py", line 718, in reraise
    raise value.with_traceback(tb)
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 699, in urlopen
    httplib_response = self._make_request(
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 394, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/lib/python3.10/http/client.py", line 1282, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.10/http/client.py", line 1328, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.10/http/client.py", line 1277, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.10/http/client.py", line 1037, in _send_output
    self.send(msg)
  File "/usr/lib/python3.10/http/client.py", line 975, in send
    self.connect()
  File "/usr/lib/python3/dist-packages/docker/transport/unixconn.py", line 30, in connect
    sock.connect(self.unix_socket)
urllib3.exceptions.ProtocolError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/docker/api/client.py", line 214, in _retrieve_server_version
    return self.version(api_version=False)["ApiVersion"]
  File "/usr/lib/python3/dist-packages/docker/api/daemon.py", line 181, in version
    return self._result(self._get(url), json=True)
  File "/usr/lib/python3/dist-packages/docker/utils/decorators.py", line 46, in inner
    return f(self, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/docker/api/client.py", line 237, in _get
    return self.get(url, **self._set_request_timeout(kwargs))
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 555, in get
    return self.request('GET', url, **kwargs)
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 542, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 655, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python3/dist-packages/requests/adapters.py", line 498, in send
    raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/docker-compose", line 33, in <module>
    sys.exit(load_entry_point('docker-compose==1.29.2', 'console_scripts', 'docker-compose')())
  File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 81, in main
    command_func()
  File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 200, in perform_command
    project = project_from_options('.', options)
  File "/usr/lib/python3/dist-packages/compose/cli/command.py", line 60, in project_from_options
    return get_project(
  File "/usr/lib/python3/dist-packages/compose/cli/command.py", line 152, in get_project
    client = get_client(
  File "/usr/lib/python3/dist-packages/compose/cli/docker_client.py", line 41, in get_client
    client = docker_client(
  File "/usr/lib/python3/dist-packages/compose/cli/docker_client.py", line 170, in docker_client
    client = APIClient(use_ssh_client=not use_paramiko_ssh, **kwargs)
  File "/usr/lib/python3/dist-packages/docker/api/client.py", line 197, in __init__
    self._version = self._retrieve_server_version()
  File "/usr/lib/python3/dist-packages/docker/api/client.py", line 221, in _retrieve_server_version
    raise DockerException(
docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))
root@e39b349655c0:/echo-speaks-server-docker-enablement/docker#

Thank you, @jtp10181 !!

The cookie refreshed 55 minutes ago, and the Container restarted 55 minutes ago!

Success!

1 Like

Need to make some instructions in Markdown for the author to post on github since the info is scattered all over the place at this point...

4 Likes

Please correct me if I am mistaken but I was under the impression when the Heroku subscription was announced that @tonesto7 stated that he would be working on a solution that could be hosted on the Hubitat (and would not require additional hardware to host). Originally, everyone was understandably told to be patient as the necessity of this solution was still months away (end of Nov 2022).

While I totally understand that containers that can host the Heroku “replacement” on non-HE hardware are currently available and the image for these have been developed by @tonesto, I am curious as to whether @tonesto or anyone else is still working on a solution that can be hosted totally on the Hubitat hardware.

Being respectful of @tonesto7 ’s time, I held off in asking this question for a while, but would appreciate some response as to whether work is continuing on this (total Hubitat hosting) or if this is no longer in the works. Either way, some response would be greatly appreciated. I seem to remember a statement from @tonesto7 when the Nov Heroku deadline had passed that he was finding it more difficult to host everything on HE than he had anticipated. I had respectfully asked this question about three weeks ago but did not get any response. Again, I really appreciate all the work that @tonesto7 did to develop ES V4. Just want to know if a totally HE solution is still in the works? Thank you for everything you and others in the community do.

2 Likes