home-assistant / addons

:heavy_plus_sign: Docker add-ons for Home Assistant
https://home-assistant.io/hassio/
Apache License 2.0
1.55k stars 1.5k forks source link

Almond / Genie issues with SSL enabled HA #2469

Closed jspanitz closed 2 years ago

jspanitz commented 2 years ago

Describe the issue you are experiencing

Ok running HA OS 7.6. Server is running SSL on 8123 and proxied externally through cloudflare on 8443. Added the Genie add-on via the Add-ons. Rebooted HA, Integrations detects Genie Add-On, proceed to accept integration. Go back to Add-Ons, select Genie, open the Web UI and try a test Hello. All is working so far.

This is where it all fails. Go to My Skills and Configure New Skill. Attempt to add on new skill such as Dad Jokes and get the following: image

Ok, I’ll try adding in Home Assistant anyhow. 1st screen is Oauth, image

click continue and then this image

which is the oauth redirect to /auth/authorize?response_type=code&redirect_uri=https%3A%2F%2Fgenie.stanford.edu%2Fdevices%2Foauth2%2Fcallback%2Fio.home-assistant&client_id=https%3A%2F%2Fthingengine.stanford.edu&state=7c50bd556c049f95b54cc3309105279f attempt to replace the host with xx.xxxxx.com:8443 and get this image

Makes sense, since my HA is using SSL, have to go secure. So I change from http to https and get this image

Which then times out in a few seconds and I get this image

What type of installation are you running?

Home Assistant OS

Which operating system are you running on?

Home Assistant Operating System

Which add-on are you reporting an issue with?

Almond

What is the version of the add-on?

3.0.0

Steps to reproduce the issue

Add Genie Add-On Add Almond Integration Add Genie skill for Home Assistant

Anything in the Supervisor logs that might be useful for us?

No response

Anything in the add-on logs that might be useful for us?

[services.d] starting services
[services.d] done.
2022/05/03 13:24:22 [notice] 204#204: using the "epoll" event method
2022/05/03 13:24:22 [notice] 204#204: nginx/1.14.2
2022/05/03 13:24:22 [notice] 204#204: OS: Linux 5.10.103-v8
2022/05/03 13:24:22 [notice] 204#204: getrlimit(RLIMIT_NOFILE): 1048576:1048576
2022/05/03 13:24:22 [notice] 204#204: start worker processes
2022/05/03 13:24:22 [notice] 204#204: start worker process 233
Frontend initialized in development mode
Failed to load translations: The expression evaluated to a falsy value:
  assert_1.default(fs.existsSync(modir))
Added device thingengine-own-server:1babce3aa723e16f
Added device org.thingpedia.builtin.thingengine.server
Added device org.thingpedia.builtin.test
Added device org.thingpedia.builtin.thingengine.builtin
Activity monitor started
Activity monitor started idle timer 600000 ms
Engine started
Express server listening on port 3000
Ready
[09:24:27.733540] exec (../src/app.cpp:112): start main loop
genie::Config-Message: 09:24:27.734: Config key [general] assets_dir missing, using default '/usr/local/lib/genie-client/assets'
genie::Config-Message: 09:24:27.734: Config key [general] retry_interval missing, using default '3000'
genie::Config-Message: 09:24:27.734: Config key [general] connect_timeout missing, using default '5000'
genie::Config-Message: 09:24:27.734: Config key [audio] backend missing, using default 'pulseaudio'
genie::Config-Message: 09:24:27.734: Config key [audio] output missing, using default 'echosink'
genie::Config-Message: 09:24:27.734: Config key [audio] voice missing, using default 'male'
genie::Config-Message: 09:24:27.735: Config key [hacks] wake_word_verification missing, using default 'true'
genie::Config-Message: 09:24:27.735: Config key [hacks] surpress_repeated_notifs missing, using default 'false'
genie::Config-Message: 09:24:27.735: Config key [hacks] dns_server missing, using default '8.8.8.8'
genie::Config-Message: 09:24:27.735: Config key [picovoice] model missing, using default 'porcupine_params.pv'
genie::Config-Message: 09:24:27.735: Config key [picovoice] keyword missing, using default 'hey-genie/keyword_raspberry-pi.ppn'
genie::Config-Message: 09:24:27.735: Config key [picovoice] sensitivity missing, using default '0.7'
genie::Config-Message: 09:24:27.735: Config key [picovoice] wake_word_pattern missing, using default '^([A-Za-z]+[ .,]? (gene|genie|jeannie|jenny|jennie|dean)|beijing|pg and e|ragini|pagini|paging)[.,]?'
genie::Config-Message: 09:24:27.735: Config key [sound] wake missing, using default 'match.oga'
genie::Config-Message: 09:24:27.735: Config key [sound] no_input missing, using default 'no-match.oga'
genie::Config-Message: 09:24:27.735: Config key [sound] too_much_input missing, using default 'no-match.oga'
genie::Config-Message: 09:24:27.735: Config key [sound] news_intro missing, using default 'news-intro.oga'
genie::Config-Message: 09:24:27.735: Config key [sound] alarm_clock_elapsed missing, using default 'alarm-clock-elapsed.oga'
genie::Config-Message: 09:24:27.735: Config key [sound] working missing, using default 'match.oga'
genie::Config-Message: 09:24:27.735: Config key [sound] stt_error missing, using default 'no-match.oga'
genie::Config-Message: 09:24:27.735: Config key [buttons] evinput_dev missing, using default '/dev/input/event0'
failed to create cache_dir /root/.cache/genie, errno = 2
genie::Config-Message: 09:24:27.736: Config key [vad] start_speaking_ms missing, using default '3000'
genie::Config-Message: 09:24:27.736: Config key [vad] done_speaking_ms missing, using default '500'
genie::Config-Message: 09:24:27.736: Config key [vad] input_detected_noise_ms missing, using default '600'
genie::Config-Message: 09:24:27.736: Config key [vad] listen_timeout_ms missing, using default '10000'
genie::Config-Message: 09:24:27.736: Config key [webui] port missing, using default '8000'
[09:24:28] INFO: Successfully send discovery information to Home Assistant.
** Message: 09:24:28.203: Loading picovoice model from /usr/local/lib/genie-client/assets/porcupine_params.pv
** Message: 09:24:28.203: Loading wakeword from /usr/local/lib/genie-client/assets/hey-genie/keyword_raspberry-pi.ppn
Initialized wakeword engine, frame length 512, sample rate 16000
** (genie-client:292): ERROR **: 09:24:28.212: pa_simple_new() failed: No such entity
genie-client exited with signal SIGTRAP
Loaded class definition for io.home-assistant, loader type: org.thingpedia.v2, version: 23
Error: Cannot find module 'thingpedia'
Require stack:
- /data/almond-server/cache/device-classes/io.home-assistant/index.js
- /opt/genie-server/node_modules/thingpedia/dist/loaders/base_ondisk_js.js
- /opt/genie-server/node_modules/thingpedia/dist/loaders/v2.js
- /opt/genie-server/node_modules/thingpedia/dist/loaders/index.js
- /opt/genie-server/node_modules/thingpedia/dist/downloader.js
- /opt/genie-server/node_modules/thingpedia/dist/factory.js
- /opt/genie-server/node_modules/thingpedia/dist/index.js
- /opt/genie-server/node_modules/genie-toolkit/dist/lib/dataset-tools/augmentation/replace_parameters.js
- /opt/genie-server/node_modules/genie-toolkit/dist/lib/dataset-tools/augmentation/index.js
- /opt/genie-server/node_modules/genie-toolkit/dist/lib/index.js
- /opt/genie-server/dist/main.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15)
    at Function.Module._load (internal/modules/cjs/loader.js:667:27)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/data/almond-server/cache/device-classes/io.home-assistant/index.js:10:12)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/data/almond-server/cache/device-classes/io.home-assistant/index.js',
    '/opt/genie-server/node_modules/thingpedia/dist/loaders/base_ondisk_js.js',
    '/opt/genie-server/node_modules/thingpedia/dist/loaders/v2.js',
    '/opt/genie-server/node_modules/thingpedia/dist/loaders/index.js',
    '/opt/genie-server/node_modules/thingpedia/dist/downloader.js',
    '/opt/genie-server/node_modules/thingpedia/dist/factory.js',
    '/opt/genie-server/node_modules/thingpedia/dist/index.js',
    '/opt/genie-server/node_modules/genie-toolkit/dist/lib/dataset-tools/augmentation/replace_parameters.js',
    '/opt/genie-server/node_modules/genie-toolkit/dist/lib/dataset-tools/augmentation/index.js',
    '/opt/genie-server/node_modules/genie-toolkit/dist/lib/index.js',
    '/opt/genie-server/dist/main.js'
  ]
}
POST /api/devices/create 500 1013.803 ms - 59
[09:24:29] ERROR: Almond registration of local Home Assistant failed!
[09:26:05.416482] exec (../src/app.cpp:112): start main loop
genie::Config-Message: 09:26:05.417: Config key [general] assets_dir missing, using default '/usr/local/lib/genie-client/assets'
genie::Config-Message: 09:26:05.418: Config key [general] retry_interval missing, using default '3000'
genie::Config-Message: 09:26:05.418: Config key [general] connect_timeout missing, using default '5000'
genie::Config-Message: 09:26:05.418: Config key [audio] backend missing, using default 'pulseaudio'
genie::Config-Message: 09:26:05.418: Config key [audio] output missing, using default 'echosink'
genie::Config-Message: 09:26:05.419: Config key [audio] voice missing, using default 'male'
genie::Config-Message: 09:26:05.419: Config key [hacks] wake_word_verification missing, using default 'true'
genie::Config-Message: 09:26:05.419: Config key [hacks] surpress_repeated_notifs missing, using default 'false'
genie::Config-Message: 09:26:05.419: Config key [hacks] dns_server missing, using default '8.8.8.8'
genie::Config-Message: 09:26:05.420: Config key [picovoice] model missing, using default 'porcupine_params.pv'
genie::Config-Message: 09:26:05.420: Config key [picovoice] keyword missing, using default 'hey-genie/keyword_raspberry-pi.ppn'
genie::Config-Message: 09:26:05.420: Config key [picovoice] sensitivity missing, using default '0.7'
genie::Config-Message: 09:26:05.420: Config key [picovoice] wake_word_pattern missing, using default '^([A-Za-z]+[ .,]? (gene|genie|jeannie|jenny|jennie|dean)|beijing|pg and e|ragini|pagini|paging)[.,]?'
genie::Config-Message: 09:26:05.420: Config key [sound] wake missing, using default 'match.oga'
genie::Config-Message: 09:26:05.421: Config key [sound] no_input missing, using default 'no-match.oga'
genie::Config-Message: 09:26:05.421: Config key [sound] too_much_input missing, using default 'no-match.oga'
genie::Config-Message: 09:26:05.421: Config key [sound] news_intro missing, using default 'news-intro.oga'
genie::Config-Message: 09:26:05.421: Config key [sound] alarm_clock_elapsed missing, using default 'alarm-clock-elapsed.oga'
genie::Config-Message: 09:26:05.421: Config key [sound] working missing, using default 'match.oga'
genie::Config-Message: 09:26:05.422: Config key [sound] stt_error missing, using default 'no-match.oga'
genie::Config-Message: 09:26:05.422: Config key [buttons] evinput_dev missing, using default '/dev/input/event0'
genie::Config-Message: 09:26:05.422: Config key [vad] start_speaking_ms missing, using default '3000'
genie::Config-Message: 09:26:05.422: Config key [vad] done_speaking_ms missing, using default '500'
genie::Config-Message: 09:26:05.422: Config key [vad] input_detected_noise_ms missing, using default '600'
genie::Config-Message: 09:26:05.423: Config key [vad] listen_timeout_ms missing, using default '10000'
genie::Config-Message: 09:26:05.423: Config key [webui] port missing, using default '8000'
** Message: 09:26:05.458: Loading picovoice model from /usr/local/lib/genie-client/assets/porcupine_params.pv
** Message: 09:26:05.458: Loading wakeword from /usr/local/lib/genie-client/assets/hey-genie/keyword_raspberry-pi.ppn
Initialized wakeword engine, frame length 512, sample rate 16000
** (genie-client:316): ERROR **: 09:26:05.466: pa_simple_new() failed: No such entity
genie-client exited with signal SIGTRAP

Additional information

No response

pvizeli commented 2 years ago

You have to reinstall the add-on, then it should work again. But not sure how it falls into that mode

jspanitz commented 2 years ago

I did a complete uninstall of the integration and add-on, rebooted and installed. But I will try again and report back shortly.

pvizeli commented 2 years ago

You can not add Home Assistant skill over the Genie UI. They have to be setup from add-on, otherwise it is not working. Your log show it [09:24:29] ERROR: Almond registration of local Home Assistant failed!

jspanitz commented 2 years ago

Hot damn, that worked. I see all the skills listed now as well, which were not showing up before. No idea what I did differently this time but much thanks.