MQTT Client on MIFI

For MQTT on MIFI, is it possible to pull data? I am trying to connect the MQTT to Adafruit’s IOT cloud. I want to trigger a GPIO pin on MIFI when a value reach 1. The document I saw on GL-INET is ubus call to push data. I don’t see a way to pull data? Is there a way to do 2-way communication on MIFI?

hello, you can read the doc:

we not adapt the Adafruit’s IOT cloud, you can use the GL GoodCloud

Thanks. Ah, I see how I could configure it to an MQTT broker. I see when you subscribe to a topic, the data received is dumped into syslog. Is there a way to trigger an action or send the message to a script instead of syslog?

configure to different MQTT broker have different config. now the gl_mqtt program configure to connect GL GoodCloud, recommand to use this MQTT broker.

when gl_mqtt received some message, we according the message type to call GL API. you can use C/C++ to develop the API. it maybe have some trouble.

the simple method is: use the openwrt logread, you can develop one program, catch the mqtt logread message, analysis the message, such as find message: “########===###act_goip=1” string, analysis the KEY “########===###act_goip” get the value “1” , then operate the GPIO

this method is: catch openwrt logread, find the message, analysis the message