-->
Page 7 of 17

Re: MQTT for NodeMCU Lua working NOW

PostPosted: Mon Jan 19, 2015 6:45 pm
by gwizz
Yes, I was wondering about that - there is this line in the wiki example:
-- for secure: m:connect("192.168.11.118", 1880, 1)


Has anyone got any experience with this mode they can share please?

I read that there is a separate port, 8883 for using mqqt over ssl - I assume that is what this refers to?

Re: MQTT for NodeMCU Lua working NOW

PostPosted: Mon Jan 19, 2015 8:52 pm
by tuanpm
gwizz wrote:Yes, I was wondering about that - there is this line in the wiki example:
-- for secure: m:connect("192.168.11.118", 1880, 1)


Has anyone got any experience with this mode they can share please?

I read that there is a separate port, 8883 for using mqqt over ssl - I assume that is what this refers to?


Yes, it already supported SSL
This this repository have information about create SSL Cert & KEY 1024 bit for Mosca and how to run borker with SSL:
https://github.com/tuanpmt/esp_mqtt
Code: Select allopenssl req -x509 -newkey rsa:1024 -keyout key.pem -out cert.pem -days 3650

and you should add NTP module for real-time

Re: MQTT for NodeMCU Lua working NOW

PostPosted: Mon Jan 19, 2015 9:02 pm
by gwizz
Coolio - I'll check it out!

Good work, I wished it was already in place, but it seemed too much to hope for :D

Re: MQTT for NodeMCU Lua working NOW

PostPosted: Tue Jan 20, 2015 4:02 am
by Suxsem
tuanpm wrote:
gwizz wrote:Yes, I was wondering about that - there is this line in the wiki example:
-- for secure: m:connect("192.168.11.118", 1880, 1)


Has anyone got any experience with this mode they can share please?

I read that there is a separate port, 8883 for using mqqt over ssl - I assume that is what this refers to?


Yes, it already supported SSL
This this repository have information about create SSL Cert & KEY 1024 bit for Mosca and how to run borker with SSL:
https://github.com/tuanpmt/esp_mqtt
Code: Select allopenssl req -x509 -newkey rsa:1024 -keyout key.pem -out cert.pem -days 3650

and you should add NTP module for real-time

Great!
But I read that for maximum security I should copy the certificato into the client (esp8266) and not only into the broker...
From: http://test.mosquitto.org/ "Port 8884 requires clients to provide their own certificate to authenticate their connection."
How can I do that with nodemcu?

And...why I need a NTP module? It's time required for encryption?