A fast MQTT dashboard application and rule engine framework written in C for Linux, Raspberry Pi and WINDOWS.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

202 lines
8.4 KiB

# Demo Dashboard (MQTT Hyperdash) for my Solar power station...
#
# Global settings and default values
#
BROKER: URL="tcp://sonnenschein:1883"
PANEL: TITLE="Solar Power Station" W=512 H=440 FGC=$ffffffff BGC=$000040ff
#
# Static drawing
#
TEXT: X=34 Y=20 H=50 FGC=$ffffFFFF TEXT="Solar Power" FONT="Arial" FONTSIZE=50
BITMAP: x=350 Y=20 BITMAP="Sun" FGC=$ffff88ff
TOPICNUMBER: X=400 Y=32 W=65 H=10 TOPIC=HOME/SOLAR/TEMPERATURE FORMAT="###.## C" FGC=$ffff00ff BGC=$40ff
# TOPICNUMBER: X=400 Y=42 W=65 H=10 TOPIC=HOME/HUMIDITY FORMAT="###.# %" FGC=$ffff00ff BGC=$40ff
TOPICSTRING: X=410 Y=72 W=100 H=10 TOPIC=HOME/DATE FGC=$88ffffff BGC=$40ff
TOPICSTRING: X=410 Y=52 W=100 H=10 TOPIC=HOME/TIME FGC=$88ffffff BGC=$40ff
# HBAR: x=200 y=100 w=100 h=10 MIN=-1 MAX=8 AGC=$ffffffff BGC=$000000ff FGC=$ff0000ff TOPIC=RADCON/CPM_AM
# VBAR: x=350 y=100 w=10 h=100 MIN=0 MAX=10 AGC=$ffffffff BGC=$000000ff FGC=$ff0000ff TOPIC=HOME/SOLAR/SUN
# VBAR: x=370 y=100 w=10 h=100 MIN=-10 MAX=10 AGC=$ffffffff BGC=$000000ff FGC=$ff0000ff TOPIC=HOME/SOLAR/BAT_TOTAL
# VBAR: x=390 y=100 w=10 h=100 MIN=0 MAX=10 AGC=$ffffffff BGC=$000000ff FGC=$ff0000ff TOPIC=HOME/SOLAR/USE
# VBAR: x=410 y=100 w=10 h=100 MIN=0 MAX=3 AGC=$ffffffff BGC=$000000ff FGC=$ff0000ff TOPIC=HOME/SOLAR/LIION_IN_CURRENT
# VBAR: x=430 y=100 w=10 h=100 MIN=-3 MAX=3 AGC=$ffffffff BGC=$000000ff FGC=$ff0000ff TOPIC=HOME/SOLAR/LIION_BAT_CURRENT
VBAR: x=490 y=300 w=10 h=50 MIN=0 MAX=2 AGC=$ffffffff BGC=$000000ff FGC=$ff0000ff TOPIC=HOME/SOLAR/LIION_OUT_CURRENT
VBAR: x=280 y=180 w=10 h=50 MIN=0 MAX=2 AGC=$ffffffff BGC=$ff FGC=$ff0000ff TOPIC=HOME/SOLAR/USE1
VBAR: x=30 y=300 w=10 h=50 MIN=0 MAX=6 AGC=$ffffffff BGC=$ff FGC=$aa2200ff TOPIC=HOME/SOLAR/NETZ
BITMAPLABEL: x=485 y=10 BGC=$000040ff TOPIC=HOME/SOLAR/ACTIVITY_DM \
BITMAP[0]="0|Disc1|$ffffffff" \
BITMAP[1]="1|Disc2|$ffffffff" \
BITMAP[2]="2|Disc3|$ffffffff" \
BITMAP[3]="3|Disc4|$ffffffff"
#
# Weiterfuehrende Buttons
#
PBOX: x=240 y=400 w=100 h=25 BGC=$444444ff
DASH: x=240 y=400 w=100 h=25 DASH="feinstaub"
TEXT: x=250 y=400 w=100 h=25 TEXT="Feinstaub" FGC=$ffffffff FONT="Arial" FONTSIZE=16
FRAMETOGGLE: x=240 y=400 w=100 h=25
PBOX: x=20 y=400 w=100 h=25 BGC=$444444ff
DASH: x=20 y=400 w=100 h=25 DASH="gaspower"
TEXT: x=25 y=400 w=100 h=25 TEXT="Home Power" FGC=$ffffffff FONT="Arial" FONTSIZE=16
FRAMETOGGLE: x=20 y=400 w=100 h=25
PBOX: x=130 y=400 w=100 h=25 BGC=$444444ff
DASH: x=130 y=400 w=100 h=25 DASH="podcast"
TEXT: x=140 y=400 w=100 h=25 TEXT="-> Podcast" FGC=$ffffffff FONT="Arial" FONTSIZE=16
FRAMETOGGLE: x=130 y=400 w=100 h=25
#
#
#
TOPICNUMBER: X=10 Y=242 W=100 H=10 TOPIC=HOME/SOLAR/SUN_COUNTER FORMAT="#####.# Ah" FGC=$ffff00ff BGC=$772222ff
FRAME: X=8 Y=240 W=103 H=13 REVERT=1
TOPICNUMBER: X=130 Y=372 W=90 H=10 TOPIC=HOME/SOLAR/BAT_COUNTER FORMAT="#####.# Ah" FGC=$ffff00ff BGC=$772222ff
FRAME: X=128 Y=370 W=93 H=13 REVERT=1
TOPICNUMBER: X=250 Y=372 W=90 H=10 TOPIC=HOME/SOLAR/USE_COUNTER FORMAT="#####.# Ah" FGC=$ffff00ff BGC=$772222ff
FRAME: X=248 Y=370 W=93 H=13 REVERT=1
TOPICNUMBER: X=30 Y=372 W=90 H=10 TOPIC=HOME/SOLAR/NETZ_COUNTER FORMAT="#####.# Ah" FGC=$ffff00ff BGC=$772222ff
FRAME: X=28 Y=370 W=93 H=13 REVERT=1
#TOPICNUMBER: X=10 Y=200 W=80 H=10 TOPIC=HOME/SOLAR/SUN FORMAT="###.## A" FGC=$ffff00ff BGC=$00ff
#TOPICSTRING: X=10 Y=210 W=80 H=10 TOPIC=HOME/SOLAR/BAT_TOTAL FGC=$ffff00ff BGC=$00ff
TOPICSTRING: X=190 Y=333 W=80 H=10 TOPIC=HOME/SOLAR/USE FGC=$ffff00ff BGC=$40ff
#FRAME: X=8 Y=198 W=84 H=34 REVERT=1
# this is how one ca realize a Radiobutton pair or group
# e.g. for ON/OFF Switches The Buttons also show the actual state.
#
PBOX: x=60 y=120 w=50 h=25 bgc=$444444ff
PBOX: x=120 y=120 w=50 h=25 bgc=$444444ff
PBOX: x=180 y=120 w=50 h=25 bgc=$444444ff
TEXT: x=70 y=120 w=30 h=25 TEXT="auto" fgc=$00ffffff FONT="Arial"
TEXT: x=130 y=120 w=30 h=25 TEXT="OFF" fgc=$ff0000ff FONT="Arial"
TEXT: x=190 y=120 w=30 h=25 TEXT="ON" fgc=$00ff00ff FONT="Arial"
TOPICINAREA: x=60 y=120 w=50 h=25 TOPIC=HOME/SOLAR/LADE/CMD_DS VALUE="AUTO"
TOPICINAREA: x=120 y=120 w=50 h=25 TOPIC=HOME/SOLAR/LADE/CMD_DS VALUE="OFF"
TOPICINAREA: x=180 y=120 w=50 h=25 TOPIC=HOME/SOLAR/LADE/CMD_DS VALUE="ON"
FRAMELABEL: x=60 y=120 w=50 h=25 TOPIC=HOME/SOLAR/LADE/CMD_DS MATCH="AUTO"
FRAMELABEL: x=120 y=120 w=50 h=25 TOPIC=HOME/SOLAR/LADE/CMD_DS MATCH="OFF"
FRAMELABEL: x=180 y=120 w=50 h=25 TOPIC=HOME/SOLAR/LADE/CMD_DS MATCH="ON"
TEXT: x=10 y=120 w=30 h=25 TEXT="Netz:" fgc=$ffffffff FONT="Arial_Bold"
#
#
#
BITMAP: X=100 y=270 BITMAP="RightArrow" FGC=$ffaaaaff
TOPICSTRING: X=85 Y=303 W=70 H=10 TOPIC=HOME/SOLAR/SUN FGC=$ffff00ff BGC=$40ff
BITMAP: X=100 y=310 BITMAP="RightArrow" FGC=$ffaaaaff
TOPICSTRING: X=85 Y=343 W=70 H=10 TOPIC=HOME/SOLAR/NETZ FGC=$ffff00ff BGC=$40ff
BITMAP: X=50 y=310 BITMAP="GridPlug" FGC=$ffffffff
BITMAP: X=50 y=260 BITMAP="PVModule" FGC=$ffffffff
BITMAP: X=27 y=260 BITMAP="PVModule" FGC=$ffffffff
# We force the background of the TOPICNUMBER to be transparent.
# This works, because at each update of the topic the METER is drawn first
# (because it is defined here first). Works only if the TOPIC is the same.
METER: X=10 Y=180 W=100 H=100 TOPIC=HOME/SOLAR/SUN MIN=0 MAX=2 AMIN=180 AMAX=0 fgc=$ffff44ff bgc=$40ff
TOPICNUMBER: X=30 Y=195 W=70 H=10 TOPIC=HOME/SOLAR/SUN FORMAT="##.### A" \
FGC=$ffff00ff BGC=$0 FONT="Courier_New" FONTSIZE=12
BITMAPLABEL: x=83 y=321 BGC=$000040ff TOPIC=HOME/SOLAR/LADE/STATUS \
BITMAP[0]="-1|SmallCircle|$ff00ff" \
BITMAP[1]="0|SmallCircle|$222222ff"
METER: X=150 Y=220 W=70 H=70 TOPIC=HOME/SOLAR/BAT_TOTAL MIN=-2 MAX=2 AMIN=180 AMAX=0
TOPICNUMBER: X=150 Y=260 W=100 H=16 TOPIC=HOME/SOLAR/AGM_VOLT FORMAT="##.## V" FGC=$ffff00ff BGC=$40ff FONT="Courier_New_Bold" FONTSIZE=16
TOPICSTRING: X=150 Y=280 W=80 H=10 TOPIC=HOME/SOLAR/BAT_TOTAL FGC=$ffff00ff BGC=$40ff
BITMAP: X=160 y=300 BITMAP="battery" FGC=$ffffffff
TEXT: X=165 y=333 FGC=$ffffffff TEXT="AGM" FONT="Arial" FONTSIZE=10
BITMAP: X=210 y=300 BITMAP="RightArrow" FGC=$ffaaaaff
BITMAP: X=245 y=260 BITMAP="UpArrow" FGC=$ffaaaaff
BITMAP: X=245 y=200 BITMAP="Bulb" FGC=$ffffffff
TOPICNumber: X=230 Y=243 W=65 H=10 TOPIC=HOME/SOLAR/USE1 format="###.## A" FGC=$ffff00ff BGC=$40ff
BITMAP: X=280 y=300 BITMAP="RightArrow" FGC=$ffaaaaff
TOPICNumber: X=255 Y=333 W=65 H=10 TOPIC=HOME/SOLAR/LIION_IN_CURRENT format="###.## A" FGC=$ffff00ff BGC=$40ff
METER: X=305 Y=220 W=70 H=70 TOPIC=HOME/SOLAR/LIION_BAT_CURRENT MIN=-2 MAX=2 AMIN=180 AMAX=0
TOPICNUMBER: X=280 Y=293 W=40 H=8 TOPIC=HOME/SOLAR/LIION_VOLT FORMAT="##.## V" FGC=$ffff00ff BGC=$40ff FONT="Courier_New_Bold" FONTSIZE=9
TOPICNUMBER: X=305 Y=260 W=90 H=16 TOPIC=HOME/SOLAR/LIION_BATVOLT FORMAT="##.## V" FGC=$ffff00ff BGC=$40ff FONT="Courier_New_Bold" FONTSIZE=16
TOPICSTRING: X=305 Y=280 W=80 H=10 TOPIC=HOME/SOLAR/LIION_BAT_CURRENT FGC=$ffff00ff BGC=$40ff
BITMAPLABEL: x=320 y=300 BGC=$000040ff TOPIC=HOME/SOLAR/LIION_FILLBAT \
BITMAP[0]="0|Battery0|$ffaaaaff" \
BITMAP[1]="1|Battery1|$aaaaaaff" \
BITMAP[2]="2|Battery2|$aaaaaaff" \
BITMAP[3]="3|Battery3|$aaaaaaff" \
BITMAP[4]="4|Battery4|$aaffaaff"
BITMAP: X=320 y=300 BITMAP="Battery3" FGC=$ffffffff
TEXT: X=323 y=333 FGC=$ffffffff TEXT="LiIon" FONT="Arial" FONTSIZE=10
TOPICNUMBER: X=340 y=290 W=18 H=10 TOPIC=HOME/SOLAR/LIION_FILL FORMAT="###" \
FGC=$ffffffff BGC=$40ff FONT="Arial" FONTSIZE=10
TEXT: X=359 y=290 H=10 TEXT="%" \
FGC=$ffffffff FONT="Arial" FONTSIZE=10
BITMAP: X=400 y=300 BITMAP="RightArrow" FGC=$ffaaaaff
TOPICSTRING: X=375 Y=333 W=80 H=10 TOPIC=HOME/SOLAR/LIION_OUT_CURRENT FGC=$ffff00ff BGC=$40ff
BITMAP: X=450 y=300 BITMAP="Bulb" FGC=$ffffffff
# Experimental:
#PCIRCLE: X=220 Y=175 W=120 H=80 FGC=$ffffffff BGC=$ffffffff
#PBOX: X=220 Y=215 W=120 H=40 FGC=$40ff BGC=$40ff
#METER: X=230 Y=185 W=100 H=60 TOPIC=HOME/SOLAR/SUN MIN=0 MAX=2 AMIN=180 AMAX=0
TOPICNUMBER: X=400 Y=242 W=80 H=10 TOPIC=HOME/SOLAR/CELL1 FORMAT="##.### V" FGC=$ffff00ff BGC=$7722ffff
FRAME: X=398 Y=240 W=83 H=13 REVERT=1
TOPICNUMBER: X=400 Y=262 W=80 H=10 TOPIC=HOME/SOLAR/CELL2 FORMAT="##.### V" FGC=$ffff00ff BGC=$7722ffff
FRAME: X=398 Y=260 W=83 H=13 REVERT=1
TOPICNUMBER: X=400 Y=282 W=80 H=10 TOPIC=HOME/SOLAR/CELL3 FORMAT="##.### V" FGC=$ffff00ff BGC=$7722ffff
FRAME: X=398 Y=280 W=83 H=13 REVERT=1