ynot123 / LMS_Controls

Control your Logitech / Squeezeserver players from Home Assistant and Google Home
63 stars 16 forks source link

DialogFlow API questions #6

Closed chelliwell closed 5 years ago

chelliwell commented 5 years ago

Hi, can you confirm which API version should be used in the DF settings? DialogFlow/README says V1, but troubleshooting says V2! I have the LMS controls working through the HA GUI, but I'm getting errors trying to send commands from the DF Console. "LMS controls help" works, but I can't get things like playing, setting volume to work e.g. "LMS controls play artist rush in the living room" Do you know what could be causing this?

2018-12-27 17:01:07 ERROR (MainThread) [homeassistant.core] Error doing job: SSL handshake failed
Traceback (most recent call last):
  File "uvloop/handles/stream.pyx", line 609, in uvloop.loop.UVStream._on_eof
  File "uvloop/sslproto.pyx", line 171, in uvloop.loop._SSLPipe.feed_ssldata
  File "/usr/local/lib/python3.6/ssl.py", line 689, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: SSLV3_ALERT_CERTIFICATE_UNKNOWN] sslv3 alert certificate unknown (_ssl.c:847)
2018-12-27 17:01:07 ERROR (MainThread) [homeassistant.core] Error doing job: SSL error errno:1 reason: SSLV3_ALERT_CERTIFICATE_UNKNOWN
Traceback (most recent call last):
  File "uvloop/sslproto.pyx", line 504, in uvloop.loop.SSLProtocol.data_received
  File "uvloop/sslproto.pyx", line 204, in uvloop.loop._SSLPipe.feed_ssldata
  File "uvloop/sslproto.pyx", line 171, in uvloop.loop._SSLPipe.feed_ssldata
  File "/usr/local/lib/python3.6/ssl.py", line 689, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: SSLV3_ALERT_CERTIFICATE_UNKNOWN] sslv3 alert certificate unknown (_ssl.c:847)
ynot123 commented 5 years ago

Hi, definitely needs to be version 1 of Dialogflow. I was using version 2 when I brute forced it a while back but proper implementation of webhooks has forced me to return to version 1.

As for the message included in your email. not too sure but looks like autohentication issues. Let me ask a few questions.

Is your installation of HA accessible over the internet using SSL secure link https://

Let me know if you need anything further. Ynot.

chelliwell commented 5 years ago

Hi there - didn't spot your reply (not been checking work email!) I've just sorted out the auth problem: I was using my QNAP NAS to generate LetsEncrypt cert - but it creates a main cert and an intermediate. Eventually got certbot to run on a different system, and now with a 'fullchain' cert it's now working :) Another question, while I'm at it - the replies say "here's the test version of LMS" - is 'test' normal? i.e. built into the current code, or is it something that comes from the DF setup?

ynot123 commented 5 years ago

You can remove the "test version" phrase by publishing the DF project as alpha. The procedure is time consuming and a bit convoluted but it does work :). Generally you develop your DF project in a separate account, then publish as alpha in google assistant and invite your real account to participate, The publishing process can take up to 24 hours to complete but when done, the "test version" is removed. Also, once published, any further changes that are published are reflected very quickly.