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.
+2 votes
1,348 views 1 comments
by
It would be great if as well as reading the IO state and system state via MQTT, if you could also get the gps data returned as a json encoded string, right now we have to have a system that can take data in from the GPS part of the system and a system to take data in from the MQTT part of the system. If we could just publish a router/get/gps and get the data back as json it'd simplify management of these devices.

1 Answer

0 votes
by anonymous

Hi,

Try this:

Get GPS latitude and longitude using gpsctl command:

{ "jsonrpc": "2.0", "id": 1, "method": "call", "params": [ "456f77f6b686bf5972daa3a26bee60b0","file", "exec", { "command":"gpsctl", "params":["-ix"] }]}'

by
Can you explain a little on this?'

I have managed to get the router connected to a broker and I can request the standard status messages from it. Also the gpsctl -ix works from ssh to the router.

Now I would like to have the router deliver the coordinates to mqtt.