Advertisement
NittyGritty

Generate SVG Zigbee Mesh

Dec 4th, 2021
1,094
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.65 KB | None | 0 0
  1. # Visualisierung Map
  2.  
  3. sudo apt-get install graphviz imagemagick
  4.  
  5. File ~/map
  6. ==================
  7. #!/bin/bash
  8. # additional dependencies: graphviz imagemagick
  9.  
  10. # put temporal files in ram filesystem
  11. file="/home/pi/zigbee/networkmap"
  12. fechahora=$(date '+%F-%H:%M')
  13. #~ echo $fechahora
  14.  
  15. mosquitto_sub -u xxxxxx -P xxxxx -t /home/zigbee/bridge/networkmap/graphviz -C 1 >${file}.dot &
  16. mosquitto_pub -u xxxxxx -P xxxxx  -t /home/zigbee/bridge/networkmap -m graphviz
  17.  
  18. # wait until mosquitto_sub ends
  19. wait
  20.  
  21. # generate graphic with graphviz (change to short texts with sed)
  22. cat ${file}.dot| circo -Tsvg > ${file}${fechahora}.svg
  23. ===============
  24.  
  25. chmod +x map
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement