Publish timestamp and temperature data on the topic sensors/temperature to a remote host on a non-standard port

mosquitto_pub

  • A simple MQTT version 3.1.1 client that will publish a single message on a topic and exit.
    More information: <https://mosquitto.org/man/mosquitto_pub-1.html>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

mosquitto_pub -h {{192.168.1.1}} -p {{1885}} -t {{sensors/temperature}} -m "{{1266193804 32}}"

click the source code to copy install mosquitto_pub on any operating system with command-not-found.com