Neues Modul: ESPEInk für e-Paper Displays (Name geändert, war ESP8266EInk)

Begonnen von eki, 02 Oktober 2019, 10:24:53

Vorheriges Thema - Nächstes Thema

eki

versuche mal statt "rectangle-filled" "rectangle-filled-xx" (ist zwar eine Krücke, sollte aber die Warning beseitigen).

Borkk

Zitat von: eki am 22 August 2024, 10:11:38versuche mal statt "rectangle-filled" "rectangle-filled-xx" (ist zwar eine Krücke, sollte aber die Warning beseitigen).

ok, das hat die Fehler teilweise beseitigt.

2024.08.22 10:37:49 4: check1: addsymbol#rectangle-filled-xx#0#0#0#0#FF0000#879#47#0 - 53
2024.08.22 10:37:49 4: check1: addsymbol#rectangle-filled-xx#0#511#0#0#FF0000#879#16#0 - 55
2024.08.22 10:37:49 4: check1: addsymbol#rectangle-xx#700#282#4#0#FF0000#177#228#0 - 51
2024.08.22 10:37:49 1: PERL WARNING: Use of uninitialized value $s2 in string eq at ./FHEM/89_ESPEInk.pm line 1456.
2024.08.22 10:37:49 1: PERL WARNING: Use of uninitialized value $s2 in string eq at ./FHEM/89_ESPEInk.pm line 1457.
2024.08.22 10:37:49 1: PERL WARNING: Use of uninitialized value $s2 in string eq at ./FHEM/89_ESPEInk.pm line 1458.
2024.08.22 10:37:49 4: check1: addsymbol#rectangle-xx#510#50#4#0#FF0000#367#50#0 - 49
2024.08.22 10:37:49 4: check1: addsymbol#rectangle-xx#2#50#4#0#FF0000#260#460#0 - 48
2024.08.22 10:37:49 4: check1: addsymbol#rectangle-xx#700#101#4#0#FF0000#177#180#0 - 51
2024.08.22 10:37:49 4: check1: addsymbol#rectangle-xx#261#50#4#0#FF0000#249#50#0 - 49
2024.08.22 10:37:49 4: check1: addsymbol#rectangle-xx#261#101#4#0#FF0000#249#98#0 - 50
2024.08.22 10:37:49 4: check1: addsymbol#rectangle-xx#261#200#4#0#FF0000#249#309#0 - 51
2024.08.22 10:37:49 4: check1: addsymbol#line-xx#510#480#4#0#FF0000#879#0#0 - 44
2024.08.22 10:37:49 1: PERL WARNING: Use of uninitialized value $s2 in string eq at ./FHEM/89_ESPEInk.pm line 1448.
2024.08.22 10:37:49 1: PERL WARNING: Use of uninitialized value $s2 in string eq at ./FHEM/89_ESPEInk.pm line 1449.
2024.08.22 10:37:49 4: check1: addsymbol#line-xx#700#395#4#0#FF0000#879#0#0 - 44

Proxmox & Docker:  FHEM, Raspberrymatic, ConBee3, Nginx ReverseProxy, ConfigDB, MQTT, NodeRed, InfluxDB, Grafana, HmIP Akt- /Sensoren, Shelly´s, Alexa, ASC, Gardena, E-Paper, FritzBox; (Tado° x), iBeacon, OLED ; ESP32/8266, SwitchBot ... (Netatmo & Homekit über HomeAssistant)

hajo23

Zitat von: Borkk am 01 Januar 2022, 12:55:03
Zitat von: hajo23 am 31 Dezember 2021, 17:35:20Das sollte laut commandref bei addsymbol grundsätzlich funktionieren.

Hallo Hajo,

nachdem ich die zwei "--" bei allen "addsymbol" aufrufen eingefügt habe sind viele Fehlermeldungen aus dem LOG verschwunden, prima.

Im Augenblick bekomme ich bei einem ganz normalen Durchlauf, also ein Reading ändert sich und es wir dein Convert -> Upload angestoßen folgende Meldung im LOG:

2022.01.01 12:42:49 1: PERL WARNING: Use of uninitialized value $value in pattern match (m//) at ./FHEM/89_ESPEInk.pm line 402.
2022.01.01 12:43:08 3: ep_flur: sending HTTP request to http://192.168.23.76/EPD with data: ib
2022.01.01 12:43:34 1: ep_flur: problems with communication to device, max retries (0) reached

Der Refresh des Displays läuft aber korrekt durch.

Beim ersten Logeintrag wird es was ähnliches sein wie bei "addsymbol", der zweite Eintrag ist ok und beim Dritten, vermute ich auch einen Fehler im Modul. Ich habe "maxretries" auf 0 stehen.

Stelle ich "maxretries" auf 1 sieht es wie folgt aus:

2022.01.01 12:51:43 1: PERL WARNING: Use of uninitialized value $value in pattern match (m//) at ./FHEM/89_ESPEInk.pm line 402.
2022.01.01 12:52:02 3: ep_flur: sending HTTP request to http://192.168.23.76/EPD with data: ib
2022.01.01 12:52:27 3: ep_flur: problems with communication to device, trying once more (1 of 1 done)
2022.01.01 12:52:37 1: ep_flur: problems with communication to device, max retries (1) reached

Irgendwie bekommt das Modul nicht mit, das der Upload erfolgreich war.

Du hattest damals mit den zwei "--" Erfolg, oder?

Borkk

Zitat von: hajo23 am 22 August 2024, 13:40:28Du hattest damals mit den zwei "--" Erfolg, oder?

Du hast echt ein gutes Gedächtnis :). Ja, das stimmt in der Tat. Hatte ich auch vergessen. Mein Problem war ja, das aufgrund der Docker Problematik ESPEink nicht mehr geladen wurde und somit die ganze E-Paper Konfiguration aus FHEM verschwunden ist. Leider habe ich es nicht gleich bemerkt, da ja ein E-Paper immer brav den letzen Stand anzeigt und ich auch nicht immer drauf schaue. Und es hat ja auch eine Weile gedauert, bis der Fehler im Docker Image behoben wurde. Ich habe dann die Konfig aus einen SQLDump rausgezogen und dabei leider die "--" unterschlagen.

Aber schlussendlich läuft es jetzt wieder und auch ohne Fehlermeldungen. "--" hat gereicht, "-xx" habe ich nicht verwendet.

Nochmal Danke für eure Unterstützung :)     
Proxmox & Docker:  FHEM, Raspberrymatic, ConBee3, Nginx ReverseProxy, ConfigDB, MQTT, NodeRed, InfluxDB, Grafana, HmIP Akt- /Sensoren, Shelly´s, Alexa, ASC, Gardena, E-Paper, FritzBox; (Tado° x), iBeacon, OLED ; ESP32/8266, SwitchBot ... (Netatmo & Homekit über HomeAssistant)

KyleK

Hallo,

bekomm ich das Modul irgendwie dazu, ein Grayscale PNG mit 2 Farben zu erzeugen?
ImageMagick's `identify` Command sagt:
result.png PNG 800x480 800x480+0+0 8-bit sRGB 256c 5915B 0.000u 0:00.000Ich hätte aber gern:
result.png PNG 800x480 800x480+0+0 8-bit Grayscale Gray 2c 2373B 0.000u 0:00.000
Das Listing:
define trmnl ESPEInk /opt/fhem/contrib/fhem_template.png
attr trmnl colormode monochrome
attr trmnl convertmode level
attr trmnl definition addtext#Eiszapfen#|400#40#40#0#000000#/usr/share/fonts/truetype/dejavu/DejaVuSansMono-Bold.ttf\
textreading#py.eiszapfen:message_short#|350#200#25#0#000000#/usr/share/fonts/truetype/dejavu/DejaVuSansMono-Bold.ttf#10#600\
addsymbol#line-filled#0#450#2#0#000000#800#0\
textreading#di.system_time:date_time_s#|400#458#15#0#000000#/usr/share/fonts/truetype/dejavu/DejaVuSansMono-Bold.ttf
attr trmnl devicetype 7.5inch_e-Paper_HAT
attr trmnl disable 1
attr trmnl height 480
attr trmnl interval 0
attr trmnl width 800
#  BOARDTYPE  ESP8266
#  COLORMODE  monochrome
#  CONVERTMODE level
#  DEF        /opt/fhem/contrib/fhem_template.png
#  DEVICETYPE 7.5inch_e-Paper_HAT
#  FUUID      6867bc66-f33f-9ecb-69b6-eeafa5e8abd67aa0
#  INTERVAL  0
#  NAME      trmnl
#  NOTIFYDEV  global,trmnl,di.system_time,py.eiszapfen
#  NR        584
#  NTFY_ORDER 50-trmnl
#  PICTUREFILE /opt/fhem/contrib/fhem_template.png
#  STATE      Finished conversion in background
#  SUBFOLDER  images
#  TYPE      ESPEInk
#  URL       
#  eventCount 3
#  READINGS:
#    2025-07-08 17:28:12  deftexts        0
#    2025-07-08 17:53:40  result_picture  <html><img src=/fhem/images/trmnl/result.png?dummy=931534.82642284></img><div>/fhem/images/trmnl/result.png</div></html>
#    2025-07-08 17:28:08  source_picture  <html><img src=/fhem/images/trmnl/fhem_template.png?dummy=415440.386841176></img><div>/fhem/images/trmnl/fhem_template.png</div></html>
#    2025-07-07 19:29:35  updatestart    1751909375.99501
#  helper:
#
setstate trmnl Finished conversion in background
setstate trmnl 2025-07-08 17:28:12 deftexts 0
setstate trmnl 2025-07-08 17:53:40 result_picture <html><img src=/fhem/images/trmnl/result.png?dummy=931534.82642284></img><div>/fhem/images/trmnl/result.png</div></html>
setstate trmnl 2025-07-08 17:28:08 source_picture <html><img src=/fhem/images/trmnl/fhem_template.png?dummy=415440.386841176></img><div>/fhem/images/trmnl/fhem_template.png</div></html>
setstate trmnl 2025-07-07 19:29:35 updatestart 1751909375.99501

FHEM on Futro S940
CUL868
7x MAX! Thermostat, 8x MAX! Fensterkontakte
Conbee II + deConz, TradFri Lampen, Osram Smart+ Steckdosen

eki

Dazu müsste ich das Modul anpassen, so geht das nicht. Ist das sehr dringend? Muss erst mal schauen, ob die Library, die ich verwende das überhaupt unterstützt.