TLS Errors when Konnected firmware calls Home Assistant

I disabled all of SSL stuff while setting up a separate board at my gf house. HASS got updated to 0.72 now but I couldn't get the 2.2.1 firmware and file system to update real time when I open and close doors. I went back to the original firmware 2.2.0 and it works. I'm thinking maybe I didn't give it enough time for HAS to sync up with the 2.2.1..... not 100 percent sure why it wasn't working but I'll give it another try when I am back home trying to set up mine again.  

Ok let me know what you find out. Change log level to info or debug and capture some logs for me to look at if you can't figure it out.

How do it do that?

logger:
  default: info
  logs:
    homeassistant.components.konnected: debug

See: https://www.home-assistant.io/components/logger/

So, I got it up and running with the updated HASS, SSL enabled, and the 2.2.1 firmware/systemfile on the nodemcu. I tried to get it running with the NGINX addon for HASSIO but I must be doing something wrong since there still a 2-3 second delay with opening and closing the sensors on the board. Any suggestions?

@MDinh could you post a screenshot of your device status page? I'd like to see what API endpoint the device has stored. It's just http://<your-device-ip>:<device-port> which can be found in the logs when Hass boots up.

Are you referring to the overview? 

@NateClark If it makes it easier I could message you my duckdns and password so you can look at what ever you need to. Nothing is hooked into my alarm system yet. 

No, the Konnected device itself serves up a little status page if you visit its IP address in your browser. The only tricky part is that you have to find out the port number (it's randomized ... for security by obscurity) via discovery. Hass will discover it when it boots up and the address should show in the discovery logs. Looks like this:

What I would like to see to debug your problem is the API Endpoint that Konnected has stored. This should be pointing to your Hass local IP if configured correctly.

Still looking for my discovery log in my HASSIO setup. I did find this error in my home-assistant.log


ssl.SSLError: [SSL: HTTP_REQUEST] http request (_ssl.c:777)

2018-06-25 20:42:35 ERROR (MainThread) [homeassistant.core] Error doing job: <uvloop.loop.SSLProtocol object at 0x738d1530>: SSL error errno:1 reason: HTTP_REQUEST

Traceback (most recent call last):

  File "uvloop/sslproto.pyx", line 496, 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/lib/python3.6/ssl.py", line 689, in do_handshake


but I don't know if that has anything to do with it. 

Another easy way to find the port is by running netdisco:

Let me see if I can add netdisco because I got this when i tried to type that command

pip install netdisco

https://github.com/home-assistant/netdisco

pip3 install netdisco came back with this error


Command "/usr/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pi p-build-nbueczhz/netifaces/setup.py';f=getattr(tokenize, 'open', open)(__file__) ;code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exe c'))" install --record /tmp/pip-7ln6xd4v-record/install-record.txt --single-vers ion-externally-managed --compile" failed with error code 1 in /tmp/pip-build-nbu eczhz/netifaces/


Today I got Caddy added on and been following this guide I found which has got me pretty far with the reverse proxy but I'm stuck with my Caddyfile part the example he gives doesn't work I've edited it with all my info I believe but still get an error trying to start up Caddy. However when I emptied it does start up but of course not attached to things. 


https://dew-itwebservices.com.au/setting-home-assistant-up-for-secure-access-over-the-internet/


I guess what I am asking is if anyone has an example of their redacted caddyfile I could use?

 Hi... It's my caddy file you are having a problem with. It works fine for me. It does not go in /config/ it needs to go in /share/caddy/ and the file name is Caddyfile - I think it's all case sensitive...

 I am glad to read this article.