We are trying to develop a separate software to control FarmBot. I found that I can send the control message through MQTT. However, I did not find detailed information on how to use MQTT to control FarmBot. Is there any tutorial on how to do it?
We have recently published developer documentation describing the process. Does that answer your question, or did you have a more specific question in mind?
Yeah. I want to create software with a UI using C++. The UI has buttons to move the FarmBot arm around. Do I first communicate with the Web API? Then the Web API talks with the Raspberry PI through MQTT? And then the Raspberry PI control the FarmBot? Or could I directly communicate with the Raspberry PI through MQTT from my software?
Is there a library I can use to accomplish this? What is the best way to communicate with the FarmBot either directly or indirectly? I found information here and there, such as CeleryScript, and Farmbot JS, However, I could not put everything into one piece solution yet.
Do I first communicate with the Web API? Then the Web API talks with the Raspberry PI through MQTT? And then the Raspberry PI control the FarmBot? Or could I directly communicate with the Raspberry PI through MQTT from my software?
There is currently no C++ library available, so you will need to handle MQTT connections manually. As you have mentioned, there is FarmbotJS and also Farmware Tools (Python).
I found information here and there, such as CeleryScript, and Farmbot JS, However, I could not put everything into one piece solution yet.
The docs serve as a guide (rather than an API reference or reference manual). The best way to read it is to start from the begining and read the topics in order. They are still very much a work in progress though- if you are still having issues understanding the material, let me know. I am happy to help with whatever questions you have.
Yes, you can use MQTT to control FarmBot, but in order to obtain MQTT credentials, you must first authenticate via the FarmBot API. After that, you can control actions like movement and pin operations by publishing JSON commands to the MQTT topic on your device. Before incorporating this into your program, you can test it using MQTT clients like Mosquitto or MQTT Explorer.