Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » mosquitto_sub in bash script(mosquitto_sub, bash)
mosquitto_sub in bash script [message #1797160] Fri, 26 October 2018 13:16
J Z is currently offline J ZFriend
Messages: 3
Registered: October 2018
Junior Member
I'm looking for a way to call mosquitto_sub as a one-shot-application in a bash script. Everytime I call mosquitto_sub within a bash script, mosquitto_sub is running and blocks the rest. So I want to get only one special information from mosquitto for example:
mosquitto_sub -h my.broker.ip -t stat/device/power/#
and write the result (ON or OFF) to a variable. With other words I only want to fetch the information and then let the rest of the script work. Is there a way to get particular topic values without running mosquitto_sub as a monitor?
Joerg
Previous Topic:turn off information box
Next Topic:Why?
Goto Forum:
  


Current Time: Mon Sep 23 07:58:29 GMT 2024

Powered by FUDForum. Page generated in 0.08473 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top