Maybe you can get some ideas from this topic too: Rapsberry Pi MQTT monitor
I use it to get data from remote servers.