NittyGritty icon

Generate SVG Zigbee Mesh

NittyGritty | PRO | 12/04/21 02:55:11 PM UTC | 0 ⭐ | 1367 👁️ | Never ⏰ | []
Bash |

650 B

|

None

|

0 👍

/

0 👎

# 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

Comments