espressif / esp-rainmaker-android

ESP RainMaker Android app sources
https://rainmaker.espressif.com/
Apache License 2.0
95 stars 55 forks source link

MQTT Publish on custom topic #29

Open Fahadk7 opened 1 year ago

Fahadk7 commented 1 year ago

Hi I want to send some custom data to my esp32 via the phone app. I have subscribed to a custom MQTT topic on the firmware and have published a message from the firmware and successfully received it on the monitor logs I wish to send data from the mobile app, on that custom topic. Is it possible to edit the android code and achieve this

Any help would be appreciated. This is my first time building on Rainmaker.

shahpiyushv commented 1 year ago

@Fahadk7 , the REST APIs that we expose for phone apps and other clients like CLI/web dashboard can't send messages directly via MQTT. Only the nodes communicate over MQTT. GET and PUT /user/nodes/params APIs can be used to talk to the node via node params. If you can give more details about your use case, we can help suggest how you can achieve it. This blog post can also help understand how some custom operations can be achieved using RainMaker "Services".