Hello @synesthesiam and @koan ,
Thank you for the nice work (including support of TLS )
I think there is a bug in type assignment for “version” when calling rhasspy-hermes
:
With 2.5.1 and that configuration,
“tls”: {
“ca_certs”: “/etc/ssl/local/ca.pem”,
“certfile”: “/etc/ssl/local/certs/cert.pem”,
“enabled”: true,
“keyfile”: “/etc/ssl/private/local/key.pem”,
“version”: 2
}
rhasspyserver_hermes is happy :
[DEBUG:2020-07-18 22:44:02,726] rhasspyserver_hermes: Loading MQTT TLS settings
[DEBUG:2020-07-18 22:44:02,726] rhasspyserver_hermes: MQTT TLS enabled: {'ca_certs': '/etc/ssl/local/certs.pem', 'certfile': '/etc/ssl/local/certs/cert.pem', 'keyfile': '/etc/ssl/private/local/key.pem', 'cert_reqs': <VerifyMode.CERT_REQUIRED: 2>, 'tls_version': 2, 'ciphers': None}
[DEBUG:2020-07-18 22:44:02,727] rhasspyserver_hermes: Starting core
[DEBUG:2020-07-18 22:44:02,727] rhasspyserver_hermes: Connecting to host (retries: 0/10)
[DEBUG:2020-07-18 22:44:02,740] rhasspyserver_hermes: Connected to MQTT broker
but rhasspy-hermes isn’t :
Traceback (most recent call last):
File “main.py”, line 4, in
File “rhasspy/main.py”, line 56, in main
File “rhasspy-asr-kaldi-hermes/rhasspyasr_kaldi_hermes/main.py”, line 26, in main
File “rhasspy-asr-kaldi-hermes/rhasspyasr_kaldi_hermes/main.py”, line 231, in run_mqtt
File “rhasspy-hermes/rhasspyhermes/cli.py”, line 82, in connect
File “paho/mqtt/client.py”, line 815, in tls_set
File “ssl.py”, line 399, in new
TypeError: an integer is required (got type str)
2020-07-18 22:44:04,992 INFO exited: speech_to_text (exit status 255; not expected)
because it is called with ‘2’ (note the quotes that are added here whereas they are not added in rhasspyserver_hermes nor in the profile) that is considered as a string, instead of 2 as an integer :
rhasspyasr_kaldi_hermes: (…) tls_keyfile=‘key.pem’, tls_version=‘2’,
Note that if I don’t specify “version” in the profile, it is rhasspy-server-hermes that cannot connect whereas rhasspy-hermes is happy .