Advertisement
CoolKitchen

rehau mqtt

Apr 28th, 2018
2,269
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.56 KB | None | 0 0
  1. #!/bin/bash
  2. # Get VOC from sensor
  3. VOC=`/root/airsensor/airsensor -v -o |tr -d '\040\010\012\015'`
  4.  
  5. #!/usr/bin/env bish-bosh
  6. bishbosh_server='192.168.178.67'  #mqtt server
  7. bishbosh_clientId='12'  #irgend ne zahl
  8.  
  9. bishbosh_connection_handler_CONNACK()
  10. {
  11.     # Set up some subscriptions... another implementation could read from a standard file
  12.     bishbosh_subscribe \
  13.         '/topic/qos/0' 0 \
  14.  
  15.     # Publish a QoS 0 message
  16.     # On topic a/b
  17.     # Unretained
  18.     # With value 'X'
  19.     bishbosh_publishText 0 '/airquality/buero/voc' yes $VOC
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement