-
Notifications
You must be signed in to change notification settings - Fork 289
HA & MQTT with certificate? #250
Comments
You have to store the certificate in SPIFFs. See this gist: https://gist.github.com/eLement87/133cddc5bd0472daf5cb35a20bfd811e . Just a starting point, if someone figures it out let us know. I wanted to do this to connect to GCP and failed miserably. |
Just a quick update and a question from me. I used the sample you posted and I was able to get all certificates onto the ESP and read all of them fine. But I can't think of anything that's missing... |
What is your TLS version for Mosquitto? 1.1? |
Alright. In the process I found this code: It uses just the fingerprint of the certificate to connect. which saves space on the controller so you don't have to update the files every time your certificates update. Which letsencrypt does every 90 days... For this you have to set After testing it and finally getting it to work I will try to implement that into my local mclighting and see if I can get this to work. And I'm forcing TLS v1 in mosquitto. |
Thank you for the information. |
Will have a look at that later. maybe it's a nicer implementation. As soon as I had a working mqtt set up I made a backup of the full SD card from my pi. |
Quick update from my side. Tried to implement the code I mentioned earlier into an existing MCLighting code. Could you point me to the part of the code where I would need to be? At the moment I worked around the certificate by opening the unsecured MQTT port (1883) inside my home network. This works so far but it's not the final solution I'm opting for :/ |
Are you using async MQTT or PubSubClient? |
Was trying to use the PubSubClient. |
Define Wificlientsecure in Line 39 in McLighting.ino and necessary certificate check lines in 918-974 request_handlers.h |
Closing this and following the same issue @ #255 |
Hello,
I have just finished setting up my homeassistant by using the hassbian image.
I used the mosquitto MQTT broker but I installed it so it uses a letsencrypt certificate for connecting.
Is there any way to implement that into McLighting so it can be used with the certificates or is there some workaround to use this without the certificates?
I would rather not change the usage of the certificates because I have MQTT traffic from outside my network which I prefer to be certified.
Does anybody have an idea here?
The text was updated successfully, but these errors were encountered: