Koenkk / zigbee2mqtt

Zigbee 🐝 to MQTT bridge 🌉, get rid of your proprietary Zigbee bridges 🔨
https://www.zigbee2mqtt.io
GNU General Public License v3.0
11.84k stars 1.65k forks source link

HTTPS not working #23883

Open ZTHawk opened 3 weeks ago

ZTHawk commented 3 weeks ago

What happened?

I have Zigbee2MQTT as a HomeAssistant addon.

I get is this error "SSL_ERROR_RX_RECORD_TOO_LONG" when I try to access "https://:8099". The SSL certificate is correctly configured.

I tried for "ssl_cert" to use a full chain certificate as well.

PS: Using an invalid path (eg: /ssl/zigbee2mqtt.crt.invalid) does not show any errors in log.

What did you expect to happen?

Accessing website "https://192.168.0.102:8099" (192.168.0.102 = HA IP) shows the Zigbee2MQTT frontend.

How to reproduce it (minimal and precise)

No response

Zigbee2MQTT version

1.40.0

Adapter firmware version

EmberZNet 7.4.2 [GA]

Adapter

SONOFF Dongle Plus V2

Setup

HA Addon and HA in proxmox

Debug log

No response

MiguelCosta commented 3 weeks ago

If your Home Assistant is using https and if you are using Zigbee2MQTT as a HomeAssistant addon, I think you should use the follow URL to access to the Z2M:

https://YourDns.com/45df7312_zigbee2mqtt

(note: you should replace https://YourDns.com/ by the correct value)

ZTHawk commented 3 weeks ago

This is of course working, because this is using the HTTPS connection of HA. In fact you do not need to spedify any SSL cert/key in Zigbee2MQTT for that to be working. I want to have Zigbee2MQTT to use its own HTTPS connection.

What I mean exactly, is that for example Nodered can be accessed via https://myDNS/a0d7b954_nodered but also via https://192.168.0.102:1880 (192.168.0.102 = HA IP)

So I want Zigbee2MQTT to be accessible via https://192.168.0.102:8099 (192.168.0.102 = HA IP). This is what I understand from the documentation. Edit: Otherwise the SSL cert/key option is useless.