HI
can we configure MQTT and HTTP server in 1 esp8266 module??
I mean in one ESP can we configure two different server like HTTP and MQTT??
HI
can we configure MQTT and HTTP server in 1 esp8266 module??
I mean in one ESP can we configure two different server like HTTP and MQTT??
Do you mean uploading data to other computer(s) using both HTTP and MQTT? IE the ESP8266 is the client. Thats almost certainly possible.
If, on the other hand, you want your ESP8266 to be both a HTTP server and an MQTT broker (meaning other computers uploading data to the ESP8266) that will be much harder. While there are plenty of examples of HTTP servers I dont recall seeing an MQTT broker anywhere. I suspect the ESP8266 wont have the memory or CPU resources to run both.
If you give a bit more detail about what you are trying to achieve you will likely get more specific answers.
Having the ESP be the MQTT server AND a WEB server? (Not sure to be honest)..
I have set up a Raspberry Pi 3 to be an MQTT server/broker and also installed Apache, MySQL & PHP along side of it..
(so I can also log data and do other database tasks).. my ESP's are just simple 'clients' subscribed to their 'topic' of choice.. (some also sending data/info back to the 'server' (such as temps and states of things)
There is also a simple PHP class out there to communicate to your MQTT broker as well..
*I really like this as I can then use the ESP to 'call/load/execute' a PHP script, that does whatever I write it to do/needs to do.... can communicate (insert/query/delete records) with my database, and then send/update the MQTT broker with whatever status/value it needs to do. (all in one script)..
No, you can't.