FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14455 questions

17168 answers

28195 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
121 views 0 comments
by anonymous
Hi,

I grab the data from a MODBUS device and send them to my MQTT broker via Data to server (flespi.io). Now i want to grab the recived data via API request from the broker.

The problem is, I need to set a retain flag... otherwise the broker doesn't give me output in the API.

Is it possible to activate a retain flag option in data to server? I mean, I am working with the MQTT protocol so there should be the function...

Now i have to do it really cumbersome... I grab the data from the broker via NodeRed and send them back with the retain flag...

1 Answer

0 votes
by anonymous
Would be more elegant, to have your own mqtt-connection to broker, using custom lua-program, or only a simple shell-script with mosquitto, depending upon the amount of messages, you have. Running official openwrt on a large fleet of RUT955s, this way I connect AWS-IoT to ModBus/RTU devices, and vice versa. Retain_flag no problem, then, of course.