Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Visualisierung Map
- sudo apt-get install graphviz imagemagick
- File ~/map
- ==================
- #!/bin/bash
- # additional dependencies: graphviz imagemagick
- # put temporal files in ram filesystem
- file="/home/pi/zigbee/networkmap"
- fechahora=$(date '+%F-%H:%M')
- #~ echo $fechahora
- mosquitto_sub -u xxxxxx -P xxxxx -t /home/zigbee/bridge/networkmap/graphviz -C 1 >${file}.dot &
- mosquitto_pub -u xxxxxx -P xxxxx -t /home/zigbee/bridge/networkmap -m graphviz
- # wait until mosquitto_sub ends
- wait
- # generate graphic with graphviz (change to short texts with sed)
- cat ${file}.dot| circo -Tsvg > ${file}${fechahora}.svg
- ===============
- chmod +x map
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement