#!/bin/bash # Get VOC from sensor VOC=`/root/airsensor/airsensor -v -o |tr -d '\040\010\012\015'` #!/usr/bin/env bish-bosh bishbosh_server='192.168.178.67' #mqtt server bishbosh_clientId='12' #irgend ne zahl bishbosh_connection_handler_CONNACK() { # Set up some subscriptions... another implementation could read from a standard file bishbosh_subscribe \ '/topic/qos/0' 0 \ # Publish a QoS 0 message # On topic a/b # Unretained # With value 'X' bishbosh_publishText 0 '/airquality/buero/voc' yes $VOC }