Control arduino via MQTT [message #1790682] |
Thu, 14 June 2018 11:51 |
Federico R Messages: 1 Registered: June 2018 |
Junior Member |
|
|
I working with several arduino board and now I need to control them via a web interface.
Via web interface I want to activate GPIO.
I have two ideas:
Each arduino acts as web server and I can control the GPIO via the Arduino web page. Basically one browser tab for each arduino.
Use the MQTT protocol to exchange message with the arduino boards. Furthermore I think to use an raspberry as web server and as MQTT broker. Each arduino board is subscribed to a specific topic and through a web page, hosted on the raspberry, I can control the Arduino GPIOs.
The first solution I very quicly and simple.
Regarding the second option, I don't know how to send MQTT message via a web page. I read that I need to use Websocket. Is it right? Need I to write code in Javascript or what?
My second question is: Can the MQTT broker manage both MQTT and MQTT over Websocket at the same time? Otherwise I need to use the Websocket also on Arduino.
Another option is to built a Python script with GUI that allow to send MQTT messages to Arduino.
Is there a best way?
Thanks for the help!
|
|
|
Powered by
FUDForum. Page generated in 0.01979 seconds