ich hab mich mal dran gemacht Tom's 4.2" Display Script Helper für das 7.5" anzupassen.
Vielleicht hilft es dem einen oder anderen.
Ist mein erstes TCL Script, d.h. man kann am Code bestimmt ne Menge besser machen.
Immer her mit Verbesserungen.
Ihr findet das Script hier:
https://github.com/venice1200/SmartHome ... aper75.tcl
Wie auch bei Tom's original wird der Helper über ein Homematic Script mit Hilfe vom CUxD EXEC aufgerufen.
Code: Alles auswählen
# Put the Display Content in an Variable, here "displayCMD", and run the helper script with CUxD Exec to send the data to the Display
# dom.GetObject("CUxD.CUX2801001:2.CMD_EXEC").State("tclsh /usr/local/addons/epaper75.tcl " # displayCmd);
# See below for examples
#
# tclsh epaper75.tcl <serial> /<cell> <icon> <text1> <text2> <flags> /<next cell> <next icon> <next text1> <next text2> <next flags>/<next...
# serial: Display Device Serial, here "JPDISEP750"
# cell : 1..18 (Column 1: 1..6, Column 2: 7..12, Column 3: 13..18)
#
# /--------------------\
# | 1 | 7 | 13 |
# | 2 | 8 | 14 |
# | 3 | 9 | 15 |
# | 4 | 10 | 16 |
# | 5 | 11 | 17 |
# | 6 | 12 | 18 |
# \--------------------/
#
# icon : 1..30 as defined within Sketch
# !! Needs to be set at least with the 0 value
#
# text1 : Line 1 possible mix with fixtext
# !! Needs to be set at least with ' ' (one space)
# !! Text with spaces needs to be between '' like 'text space'
#
# text2 : Line 2 possible mix with fixtext
# !! Needs to be set at least with ' ' (one space)
# !! Text with spaces needs to be between '' like 'space text'
#
# Fixtexts
# Add @t01..@t32 for the fixtexts 1..32 defined at device settings
#
# Flags: Decimal value containing bits for bold & centererd text and right aligned icon
# !! Needs to be set at least with the 0 value
# Decimal Value which stands for
# Bit 4 3 2 1 0
# Value 16 8 4 2 1
# | | | | \-> if set to 1 Text Line 1 = bold, if set to 0 text is normal
# | | | \---> if set to 1 Text Line 2 = bold, if set to 0 text is normal
# | | \-----> if set to 1 Text Line 1 = centered, if set to 0 aligned like the icon
# | \-------> if set to 1 Text Line 2 = centered, if set to 0 aligned like the icon
# \---------> if set to 1 Icon & Text right aligned, if set to 0 left aligned
#
# Examples
# -Simple Text
# string displayCmd = "JPDISEP750 /10 15 Text1 Text2 0"
# Cell 10 with Icon No.15
# Text Line 1 = Text1
# Text Line 2 = Text2
# Flags = 0, Icon and both Texts left sided, nothing bold
#
# -Mix of fixtext and simple text, centered and bold text
# string displayCmd = "JPDISEP750 /8 30 @t31 'Text Feld 8' 30"
# Cell 8 with Icon No.30
# Text Line 1 = @t31 (FixText No. 31)
# Text Line 2 = 'Text Feld 8' (Text with spaces so use '')
# Flags = 30 = 16+8+4+2 = Icon on the right, both lines centered, second line bold
#
# -Show Time
# string displayCmd = "JPDISEP750 /7 23 'Update Zeit' " # "'" # system.Date("%H:%M") # "'" # " 14";
# Cell 7 with Icon No.23 (0x9c)
# Text Line 1 = 'Update Zeit'
# Text Line 2 = "'" # system.Date("%H:%M") # "'"
# Flags = 14 = 8+4+2 = both lines centered, second line bold
Den Debug-Ausgabe Teil am Ende des Scripts hab ich deaktiviert.