Git Product home page Git Product logo

hm-print's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hm-print's Issues

Programme drucken Button erscheint nicht

Hallo,

nach der Installation von hm-print 2.3 erscheint unter Startseite > Programme und Verknüpfungen > Programme keine Schaltfläche für Programme drucken. Auch unter den einzelnen Programmen befindet sich kein Button zum drucken.

Umgebung: RaspberryMatic 3.53.30.20201024
Addons: Email 1.7.1, Cuxd 2.4.4, Philips Hue 3.1.0
Browser: Chrome 87.0.4280.88 (Official Build) (x86_64), Safari 14.0.1 (15610.2.11.51.10, 15610)

Im Log sind keine Fehler enthalten.

NUC kompatibel ?

Hallo,

Kann es sein das das Addon unter Intel NUC RaspberryMatic nicht kompatibel ist. Kann es installieren aber es wir mir dann nichts zusätzlich angezeigt in den Programmen ?

Liebe Grüße,
Markus

HM-Print (2.3) CCU2 FW: 2.55.5 -Problem

Auf der CCU2 mit der Firmware 2.55.5 wurde HM-Print Version 2.3 installiert.
Im Gegensatz zu früher taucht die Option Programme drucken unter
Programme und Zentralverknüpfungen / Programm bearbeiten
nicht mehr auf.
Habe ich eine Möglichkeit dies zu ändern?
Vieln Dank schon mal für die Antwort.
Grüße - Reiner

Button disappeared in CCU3 firmware 3.53.26

The Button "Programme drucken" has disappeared in CCU3 firmware 3.53.26, even though the addon is still installed. Downgrading the firmware makes the button appear again, so it is clearly a firmware compatibility issue.

Print does not correspond to settings!

Drucken Version 1.2a, pivCCU 2.31.25

When I print the settings of my floor heating controller, the printout shows under "interval for decalcification run" not active but under settings it is set to 1 day! So there is a discrepancy between settings and printout. Where does the printout get its data then from?

Lizenz: welche Lizenz gilt?

Hallo
Unter welcher Lizenz wurde dieses Tool veröffentlicht?
Kann die Lizenz-Frage jemand beantworten?
Danke!

Adding user session check to exec.cgi/exec1.cgi

Just in case the HM Print AddOn is a popular installed software, it can be used by an unauthenticated attacker with access to the web interface for any Remote Code Execution on Homematic CCU.

You may add a login session validation to exec.cgi/exec1.cgi as shown in PR homematic-community/XML-API#31 for XML-API
Otherwise such calls are possible:

curl -X POST -i 'http://1.2.3.4/addons/print/exec.cgi' --data 'var x=system.Exec("sleep 4;");'
curl -X POST -i 'http://1.2.3.4/addons/print/exec.cgi' --data 'var x=system.Exec("/bin/touch /tmp/testfile;");'
curl -X POST -i 'http://1.2.3.4/addons/print/exec.cgi' --data 'var x=system.Exec("/etc/init.d/S50lighttpd stop;");'
curl -X POST -i 'http://1.2.3.4/addons/print/exec.cgi' --data 'var x=dom.GetObject("CUxD.CUX2801001:1.CMD_EXEC").State("/bin/touch /tmp/testfile");'
curl -X POST -i 'http://1.2.3.4/addons/print/exec.cgi' --data 'var x=dom.GetObject("CUxD.CUX2801001:1.CMD_EXEC").State("/etc/init.d/S50lighttpd stop");'

curl -X POST -i 'http://1.2.3.4/addons/print/exec1.cgi' --data 'var x=system.Exec("sleep 4;");'
curl -X POST -i 'http://1.2.3.4/addons/print/exec1.cgi' --data 'var x=system.Exec("/bin/touch /tmp/testfile;");'
curl -X POST -i 'http://1.2.3.4/addons/print/exec1.cgi' --data 'var x=system.Exec("/etc/init.d/S50lighttpd stop;");'
curl -X POST -i 'http://1.2.3.4/addons/print/exec1.cgi' --data 'var x=dom.GetObject("CUxD.CUX2801001:1.CMD_EXEC").State("/bin/touch /tmp/testfile");'
curl -X POST -i 'http://1.2.3.4/addons/print/exec1.cgi' --data 'var x=dom.GetObject("CUxD.CUX2801001:1.CMD_EXEC").State("/etc/init.d/S50lighttpd stop");'

missing Drucken-Button in Geräteeinstellungen

Behaviour: missing Drucken-Button in Geräteeinstellungen site
expected: there should be a Drucken Button

Issue:
due to the design change from "Abbrechen" to "Zurück" the code of the hm-print-Addon could not identify the page correctly.

In line https://github.com/homematic-community/hm-print/blob/master/rc.d/programmedrucken#L40-L41
searching for "footerBtnCancel" fails. It needs to search for "footerBtnPageBack" at firmware later than 3.59.6

see also dicsussion https://homematic-forum.de/forum/viewtopic.php?f=19&t=73989#p717038

Scripts with "|" (vertical bar in the description section) don't show up correctly

Whenever all scripts from a CCU are generated with hm-print, those carrying the "|" = "vertical bar" in the description don't show up.
This one character as the causing factor that took me a while to discover ...

As I did not find this as a limitation, maybe it's added somewhere or this character could be parsed properly in one of the future releases.

btw a great add-on, which I would not like to miss :-)
Thanks for this great add-on
Heinz

How to install a ZIP file?

Dear all,

is it possible to install the downloaded zip-file into a CCU3?

I can't find in the repository a tar.gz installation file.

Do i need new glasses?

Kind regards.

Druck gefilterter Programme

Um ggf. auch eine Teildokumentation erstellen zu können, wäre es m.E. sinnvoll, den Druck auf die in der WebUI gefilterten Programme einzugrenzen.

  • Klick auf den Button "Drucken", ohne dass in der WebUI Programme gefiltert wurden: druckt (wie bisher) alle erstellten Programme
  • Klick auf den Button "Drucken", wenn in der WebUI Programme gefiltert wurden: druckt nur den Inhalt der Programme, die in der gefilterten Ansicht dargestellt werden

Ansonsten: Vielen Dank für dieses hilfreiche Tool :-)

VG, Jörg

${...}

Hi,

on my CCU2 as well as on my new CCU3 some WebUI scripts are translated somewhat strange.

2018-09-02_11h49_21

Some rows are surrounded by ${...}.

The majority of scripts is translated correctly.

Best regards,

Thorsten

Klick auf den Link zum AddOn (im Fenster Zusatzsoftware) sollte standardmäßig einen neuen Tab öffnen statt die WebUI zu verlassen

Klicke ich im Fenster "Einstellungen > Systemsteuerung > Zusatzsoftware" auf den Link zum Add-On (um bspw. eine neue Version zu downloaden) lädt der Browser die Github Seite im aktuellen Browser-Tab und ich "verlasse" damit meine WebUI.

Besser wäre es beim Klick auf den Link diesen in einem neuen Browser-Tab zu öffnen.

Anmerkung:
Das "Problem" besteht bei vielen Add-On's. Eine mir bekannte Ausnahme ist Redmatic von hobbyquaker. Dort wird der Link immer in einem neuen Tab geöffnet.

Restore Konzept für programs.htm

In Kombination mit anderen AddOn ist das Restore Konzept ungünstig, bei uninstall die alten Backup-Copies einfach wieder zu restoren ohne Rücksicht auf Änderungen die andere AddOn in der Zwischenzeit gemacht haben.
Da bin ich neulich wieder drauf reingefallen (kein Drucken Button).

Das betraf vor allem die Datei /www/rega/pages/tabs/admin/views/programs.htm, welche auch von Jeromes JP-HB-Devices-addon gepatched wird (und auch mein abgeleitetetes -Reduced AddOn)

Mein Vorschlag wäre, für programs.htm den uninstall genau so mit sed wie den install vorzunehmen, nur reverse.
Meine Tests dazu waren ok, konnte aber nur auf RM testen:

patch

#!/bin/sh

# String to include the functions.js for Programm/s
SSTRINGZWO="setFooter(s);"
RSTRINGZWO="setFooter(s); var scriptpp = document.createElement(\"script\"); scriptpp.type = \"text/javascript\"; scriptpp.src = \"/addons/print/functions.js\"; \$(\"body\").appendChild(scriptpp);"

# String to include the print button in single "Programm"
SSTRING="<td style='text-align:center; vertical-align:middle;'><div class='FooterButton CLASS04801' onclick='new HMScriptExecutor();'>\${footerBtnTestScript}</div></td>"
RSTRING="<td style='text-align:center; vertical-align:middle;'><div class='FooterButton CLASS04801' onclick='new HMScriptExecutor();'>\${footerBtnTestScript}</div></td><td style='text-align:center; vertical-align:middle;'><div class='FooterButton' onclick='PrintPage();'>Drucken</div></td>"

FNAME=/tmp/test/programs.htm
FNAMESAVE=${FNAME%.htm}.save

cp $FNAME $FNAMESAVE
sed -i "s|$SSTRING|$RSTRING|g" $FNAME
sed -i "s|$SSTRINGZWO|$RSTRINGZWO|g" $FNAME

restore

#!/bin/sh

# String to include the functions.js for Programm/s
SSTRINGZWO="setFooter(s);"
RSTRINGZWO="setFooter(s); var scriptpp = document.createElement(\"script\"); scriptpp.type = \"text/javascript\"; scriptpp.src = \"/addons/print/functions.js\"; \$(\"body\").appendChild(scriptpp);"

# String to include the print button in single "Programm"
SSTRING="<td style='text-align:center; vertical-align:middle;'><div class='FooterButton CLASS04801' onclick='new HMScriptExecutor();'>\${footerBtnTestScript}</div></td>"
RSTRING="<td style='text-align:center; vertical-align:middle;'><div class='FooterButton CLASS04801' onclick='new HMScriptExecutor();'>\${footerBtnTestScript}</div></td><td style='text-align:center; vertical-align:middle;'><div class='FooterButton' onclick='PrintPage();'>Drucken</div></td>"

FNAME=/tmp/test/programs.htm
FNAMESAVE=${FNAME%.htm}.save

sed -i "s|$RSTRING|$SSTRING|g" $FNAME
sed -i "s|$RSTRINGZWO|$SSTRINGZWO|g" $FNAME

ich mache erst mal bewusst keinen PR sondern eine issue da noch ein PR offen ist und ich nicht weiß wie der Status der Weiterentwicklung von hm-print ist.

Weitere Beobachtungen:

  1. Alle if Abfragen werden bei jedem Start des Systems ausgeführt, ein besserer Stil imho wäre ein Flag zu haben ob das AddOn installiert ist oder nicht a la
    https://github.com/jp112sdl/JP-HB-Devices-addon/blob/master/src/rc.d/jp-hb-devices-addon#L69
    und dann nur einmalig ausführen

  2. Jede if Bedingung hat innerhalb ein extra mount RW/RO. Effizienter wäre ein einziges RW/RO "außen" beim install. Hängt natürlich auch mit 1. zusammen.

  3. programs.org sieht wie ein ungenutzter Rest von früher aus da sonst immer nur mit programs.org1 gearbeitet wird:
    https://github.com/homematic-community/hm-print/blob/master/rc.d/programmedrucken#L162

  4. Nach meinen Beobachtungen braucht hm-print ein restart auf RM wenn es nicht installiert war, das belegen auch Beiträge von usern im HM Forum thread zu diesem AddOn. Insofern sollte man imho zumindest für RM den Neustart erwzingen.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.