smartVISU - Entwicklungsumgebung

Begonnen von dancatt, 10 Februar 2015, 20:48:44

Vorheriges Thema - Nächstes Thema

dancatt

Hallo zusammen,

ich dachte ich mache nun auch mal noch einen eigenen Thread auf, in welchem man das Thema smartVISU und Entwicklungsumgebung diskutieren kann.

Bis jetzt habe ich alles in einem Editor (z.B. Sublime Text 2) gemacht, auf den Fhem-Server geschoben und smartVISU aufgerufen und geschaut ob das funzt. Ist natürlich nicht das Optimalste.

Bin nun dabei mir eine SEU aufzubauen:
- Dazu habe ich mir "xampp" und "eclipse-php-luna-SR1a-win32-x86_64" inkl. Twig-Plugin installiert
- In den Eclipse-Workspace habe ich mir ein PHP-Projekt angelegt und anschließend die Sourcen von Jörg (smartvisu-cleaninstall-master) reinkopiert. Eclipse musste noch auf UTF-8 gestellt werden.
- Apache konfiguriert, so dass dieser mit dem Eclipse-Workspace verheiratet wird
- Xampp gestartet und versucht smartVISU aufzurufen. Dabei kommt im Browser ein Encoding-Problem. Laut Google handelt es sich dabei um ein "Enable gzip compression" Problem. Habe im Apache entsprechend das deflate_module angeschaltet und konfiguriert. Leider kein Erfolg. Erst das auskommentieren der Zeilen 114 - 118 in der smartVISU/index.php brachten erste Erfolge.

Nun weiß ich leider nicht wie ich weiter machen soll.
1. Nett wäre es nun wenn smartVISU (auf dem Notebook) mit dem Fhem (auf einem Cubietruck) verbunden werden könnte. Klappt aber irgendwie nicht
2. In der smartVISU-Konfig werden keine Einstellungen übernommen wenn dort was geändert wird
3. Bekomme php-Fehler. Man sieht diese nur kurz bevor die nächste Seite aufgebaut wird.

[Tue Feb 10 20:29:47.282991 2015] [:error] [pid 7760:tid 1700] [client ::1:51646] PHP Notice:  Undefined index: ::1 in D:\\FHEM\\workspace\\smartvisu\\lib\\functions_config.php on line 89, referer: http://localhost/smartvisu/index.php?page=config
[Tue Feb 10 20:29:47.283991 2015] [:error] [pid 7760:tid 1700] [client ::1:51646] PHP Notice:  Constant config_version already defined in D:\\FHEM\\workspace\\smartvisu\\lib\\functions_config.php on line 128, referer: http://localhost/smartvisu/index.php?page=config
[Tue Feb 10 20:29:47.285991 2015] [:error] [pid 7760:tid 1700] [client ::1:51646] PHP Notice:  Undefined index: page in D:\\FHEM\\workspace\\smartvisu\\index.php on line 24, referer: http://localhost/smartvisu/index.php?page=config
[Tue Feb 10 20:29:47.336994 2015] [:error] [pid 7760:tid 1700] [client ::1:51646] PHP Notice:  Undefined index: l in D:\\FHEM\\workspace\\smartvisu\\lib\\functions.php on line 126, referer: http://localhost/smartvisu/index.php?page=config
[Tue Feb 10 20:29:47.544006 2015] [:error] [pid 7760:tid 1704] [client ::1:51648] PHP Notice:  Undefined index: ::1 in D:\\FHEM\\workspace\\smartvisu\\lib\\functions_config.php on line 89, referer: http://localhost/smartvisu/index.php
[Tue Feb 10 20:29:47.727017 2015] [:error] [pid 7760:tid 1688] [client ::1:51650] PHP Notice:  Undefined index: ::1 in D:\\FHEM\\workspace\\smartvisu\\lib\\functions_config.php on line 89, referer: http://localhost/smartvisu/index.php
[Tue Feb 10 20:29:47.733017 2015] [:error] [pid 7760:tid 1708] [client ::1:51647] PHP Notice:  Undefined index: ::1 in D:\\FHEM\\workspace\\smartvisu\\lib\\functions_config.php on line 89, referer: http://localhost/smartvisu/index.php
[Tue Feb 10 20:29:47.735017 2015] [:error] [pid 7760:tid 1708] [client ::1:51647] PHP Notice:  Undefined index: debug in D:\\FHEM\\workspace\\smartvisu\\lib\\service.php on line 41, referer: http://localhost/smartvisu/index.php
[Tue Feb 10 20:29:47.735017 2015] [:error] [pid 7760:tid 1708] [client ::1:51647] PHP Notice:  Undefined index: server in D:\\FHEM\\workspace\\smartvisu\\lib\\service.php on line 43, referer: http://localhost/smartvisu/index.php
[Tue Feb 10 20:29:47.736017 2015] [:error] [pid 7760:tid 1708] [client ::1:51647] PHP Notice:  Undefined index: port in D:\\FHEM\\workspace\\smartvisu\\lib\\service.php on line 44, referer: http://localhost/smartvisu/index.php
[Tue Feb 10 20:29:47.736017 2015] [:error] [pid 7760:tid 1708] [client ::1:51647] PHP Notice:  Undefined index: user in D:\\FHEM\\workspace\\smartvisu\\lib\\service.php on line 46, referer: http://localhost/smartvisu/index.php
[Tue Feb 10 20:29:47.736017 2015] [:error] [pid 7760:tid 1708] [client ::1:51647] PHP Notice:  Undefined index: pass in D:\\FHEM\\workspace\\smartvisu\\lib\\service.php on line 47, referer: http://localhost/smartvisu/index.php
[Tue Feb 10 20:29:47.737017 2015] [:error] [pid 7760:tid 1708] [client ::1:51647] PHP Notice:  Undefined variable: tag in D:\\FHEM\\workspace\\smartvisu\\lib\\calendar\\service\\offline.php on line 29, referer: http://localhost/smartvisu/index.php
[Tue Feb 10 20:29:47.738017 2015] [:error] [pid 7760:tid 1708] [client ::1:51647] PHP Notice:  Undefined index: l in D:\\FHEM\\workspace\\smartvisu\\lib\\functions.php on line 126, referer: http://localhost/smartvisu/index.php
[Tue Feb 10 20:29:47.739017 2015] [:error] [pid 7760:tid 1708] [client ::1:51647] PHP Notice:  Undefined index: content in D:\\FHEM\\workspace\\smartvisu\\lib\\calendar\\calendar.php on line 58, referer: http://localhost/smartvisu/index.php
[Tue Feb 10 20:29:47.740017 2015] [:error] [pid 7760:tid 1708] [client ::1:51647] PHP Notice:  Undefined index: l in D:\\FHEM\\workspace\\smartvisu\\lib\\functions.php on line 126, referer: http://localhost/smartvisu/index.php
[Tue Feb 10 20:29:47.740017 2015] [:error] [pid 7760:tid 1708] [client ::1:51647] PHP Notice:  Undefined index: content in D:\\FHEM\\workspace\\smartvisu\\lib\\calendar\\calendar.php on line 58, referer: http://localhost/smartvisu/index.php
[Tue Feb 10 20:29:47.741017 2015] [:error] [pid 7760:tid 1708] [client ::1:51647] PHP Notice:  Undefined index: l in D:\\FHEM\\workspace\\smartvisu\\lib\\functions.php on line 126, referer: http://localhost/smartvisu/index.php
[Tue Feb 10 20:29:47.741017 2015] [:error] [pid 7760:tid 1708] [client ::1:51647] PHP Notice:  Undefined index: content in D:\\FHEM\\workspace\\smartvisu\\lib\\calendar\\calendar.php on line 58, referer: http://localhost/smartvisu/index.php
[Tue Feb 10 20:29:47.742017 2015] [:error] [pid 7760:tid 1708] [client ::1:51647] PHP Notice:  Undefined index: l in D:\\FHEM\\workspace\\smartvisu\\lib\\functions.php on line 126, referer: http://localhost/smartvisu/index.php
[Tue Feb 10 20:29:47.742017 2015] [:error] [pid 7760:tid 1708] [client ::1:51647] PHP Notice:  Undefined index: content in D:\\FHEM\\workspace\\smartvisu\\lib\\calendar\\calendar.php on line 58, referer: http://localhost/smartvisu/index.php
[Tue Feb 10 20:29:47.743017 2015] [:error] [pid 7760:tid 1708] [client ::1:51647] PHP Notice:  Undefined index: l in D:\\FHEM\\workspace\\smartvisu\\lib\\functions.php on line 126, referer: http://localhost/smartvisu/index.php
[Tue Feb 10 20:29:47.743017 2015] [:error] [pid 7760:tid 1708] [client ::1:51647] PHP Notice:  Undefined index: content in D:\\FHEM\\workspace\\smartvisu\\lib\\calendar\\calendar.php on line 58, referer: http://localhost/smartvisu/index.php
Der Befehl "cat" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
[Tue Feb 10 20:29:47.796020 2015] [:error] [pid 7760:tid 1708] [client ::1:51647] PHP Notice:  Undefined index: ::1 in D:\\FHEM\\workspace\\smartvisu\\lib\\functions_config.php on line 89, referer: http://localhost/smartvisu/index.php
[Tue Feb 10 20:29:47.800021 2015] [:error] [pid 7760:tid 1708] [client ::1:51647] PHP Notice:  Undefined index: debug in D:\\FHEM\\workspace\\smartvisu\\lib\\service.php on line 41, referer: http://localhost/smartvisu/index.php
[Tue Feb 10 20:29:47.801021 2015] [:error] [pid 7760:tid 1708] [client ::1:51647] PHP Notice:  Undefined index: server in D:\\FHEM\\workspace\\smartvisu\\lib\\service.php on line 43, referer: http://localhost/smartvisu/index.php
[Tue Feb 10 20:29:47.801021 2015] [:error] [pid 7760:tid 1708] [client ::1:51647] PHP Notice:  Undefined index: port in D:\\FHEM\\workspace\\smartvisu\\lib\\service.php on line 44, referer: http://localhost/smartvisu/index.php
[Tue Feb 10 20:29:47.801021 2015] [:error] [pid 7760:tid 1708] [client ::1:51647] PHP Notice:  Undefined index: url in D:\\FHEM\\workspace\\smartvisu\\lib\\service.php on line 45, referer: http://localhost/smartvisu/index.php
[Tue Feb 10 20:29:47.802021 2015] [:error] [pid 7760:tid 1708] [client ::1:51647] PHP Notice:  Undefined index: user in D:\\FHEM\\workspace\\smartvisu\\lib\\service.php on line 46, referer: http://localhost/smartvisu/index.php
[Tue Feb 10 20:29:47.802021 2015] [:error] [pid 7760:tid 1708] [client ::1:51647] PHP Notice:  Undefined index: pass in D:\\FHEM\\workspace\\smartvisu\\lib\\service.php on line 47, referer: http://localhost/smartvisu/index.php
[Tue Feb 10 20:29:47.805021 2015] [:error] [pid 7760:tid 1692] [client ::1:51651] PHP Notice:  Undefined index: ::1 in D:\\FHEM\\workspace\\smartvisu\\lib\\functions_config.php on line 89, referer: http://localhost/smartvisu/index.php
[Tue Feb 10 20:29:47.810021 2015] [:error] [pid 7760:tid 1692] [client ::1:51651] PHP Notice:  Undefined index: debug in D:\\FHEM\\workspace\\smartvisu\\lib\\service.php on line 41, referer: http://localhost/smartvisu/index.php
[Tue Feb 10 20:29:47.810021 2015] [:error] [pid 7760:tid 1692] [client ::1:51651] PHP Notice:  Undefined index: server in D:\\FHEM\\workspace\\smartvisu\\lib\\service.php on line 43, referer: http://localhost/smartvisu/index.php
[Tue Feb 10 20:29:47.810021 2015] [:error] [pid 7760:tid 1692] [client ::1:51651] PHP Notice:  Undefined index: port in D:\\FHEM\\workspace\\smartvisu\\lib\\service.php on line 44, referer: http://localhost/smartvisu/index.php
[Tue Feb 10 20:29:47.811021 2015] [:error] [pid 7760:tid 1708] [client ::1:51647] PHP Notice:  Undefined index: D in D:\\FHEM\\workspace\\smartvisu\\lib\\functions.php on line 126, referer: http://localhost/smartvisu/index.php
[Tue Feb 10 20:29:47.811021 2015] [:error] [pid 7760:tid 1692] [client ::1:51651] PHP Notice:  Undefined index: url in D:\\FHEM\\workspace\\smartvisu\\lib\\service.php on line 45, referer: http://localhost/smartvisu/index.php
[Tue Feb 10 20:29:47.811021 2015] [:error] [pid 7760:tid 1692] [client ::1:51651] PHP Notice:  Undefined index: user in D:\\FHEM\\workspace\\smartvisu\\lib\\service.php on line 46, referer: http://localhost/smartvisu/index.php
[Tue Feb 10 20:29:47.811021 2015] [:error] [pid 7760:tid 1692] [client ::1:51651] PHP Notice:  Undefined index: pass in D:\\FHEM\\workspace\\smartvisu\\lib\\service.php on line 47, referer: http://localhost/smartvisu/index.php
[Tue Feb 10 20:29:47.813021 2015] [:error] [pid 7760:tid 1708] [client ::1:51647] PHP Notice:  Undefined index: D in D:\\FHEM\\workspace\\smartvisu\\lib\\functions.php on line 126, referer: http://localhost/smartvisu/index.php
[Tue Feb 10 20:29:47.814022 2015] [:error] [pid 7760:tid 1708] [client ::1:51647] PHP Notice:  Undefined index: D in D:\\FHEM\\workspace\\smartvisu\\lib\\functions.php on line 126, referer: http://localhost/smartvisu/index.php
[Tue Feb 10 20:29:47.814022 2015] [:error] [pid 7760:tid 1708] [client ::1:51647] PHP Notice:  Undefined index: D in D:\\FHEM\\workspace\\smartvisu\\lib\\functions.php on line 126, referer: http://localhost/smartvisu/index.php
[Tue Feb 10 20:29:47.830022 2015] [:error] [pid 7760:tid 1692] [client ::1:51651] PHP Notice:  Undefined index: D in D:\\FHEM\\workspace\\smartvisu\\lib\\functions.php on line 126, referer: http://localhost/smartvisu/index.php
[Tue Feb 10 20:29:47.832023 2015] [:error] [pid 7760:tid 1692] [client ::1:51651] PHP Notice:  Undefined index: D in D:\\FHEM\\workspace\\smartvisu\\lib\\functions.php on line 126, referer: http://localhost/smartvisu/index.php
[Tue Feb 10 20:29:47.832023 2015] [:error] [pid 7760:tid 1692] [client ::1:51651] PHP Notice:  Undefined index: D in D:\\FHEM\\workspace\\smartvisu\\lib\\functions.php on line 126, referer: http://localhost/smartvisu/index.php
[Tue Feb 10 20:29:47.833023 2015] [:error] [pid 7760:tid 1692] [client ::1:51651] PHP Notice:  Undefined index: D in D:\\FHEM\\workspace\\smartvisu\\lib\\functions.php on line 126, referer: http://localhost/smartvisu/index.php
[Tue Feb 10 20:30:25.046151 2015] [:error] [pid 7760:tid 1688] [client ::1:51662] PHP Notice:  Undefined index: ::1 in D:\\FHEM\\workspace\\smartvisu\\lib\\functions_config.php on line 89, referer: http://localhost/smartvisu/index.php
[Tue Feb 10 20:30:25.046151 2015] [:error] [pid 7760:tid 1688] [client ::1:51662] PHP Notice:  Constant config_version already defined in D:\\FHEM\\workspace\\smartvisu\\lib\\functions_config.php on line 128, referer: http://localhost/smartvisu/index.php
[Tue Feb 10 20:30:27.037265 2015] [:error] [pid 7760:tid 1688] [client ::1:51662] PHP Notice:  Undefined index: ::1 in D:\\FHEM\\workspace\\smartvisu\\lib\\functions_config.php on line 89, referer: http://localhost/smartvisu/index.php?page=category
[Tue Feb 10 20:30:27.038265 2015] [:error] [pid 7760:tid 1688] [client ::1:51662] PHP Notice:  Constant config_version already defined in D:\\FHEM\\workspace\\smartvisu\\lib\\functions_config.php on line 128, referer: http://localhost/smartvisu/index.php?page=category
[Tue Feb 10 20:30:27.443288 2015] [:error] [pid 7760:tid 1688] [client ::1:51662] PHP Notice:  Undefined index: ::1 in D:\\FHEM\\workspace\\smartvisu\\lib\\functions_config.php on line 89, referer: http://localhost/smartvisu/index.php?page=apps
[Tue Feb 10 20:30:29.377399 2015] [:error] [pid 7760:tid 1688] [client ::1:51662] PHP Notice:  Undefined index: ::1 in D:\\FHEM\\workspace\\smartvisu\\lib\\functions_config.php on line 89, referer: http://localhost/smartvisu/index.php?page=apps
[Tue Feb 10 20:30:29.377399 2015] [:error] [pid 7760:tid 1688] [client ::1:51662] PHP Notice:  Constant config_version already defined in D:\\FHEM\\workspace\\smartvisu\\lib\\functions_config.php on line 128, referer: http://localhost/smartvisu/index.php?page=apps
[Tue Feb 10 20:30:29.687417 2015] [:error] [pid 7760:tid 1688] [client ::1:51662] PHP Notice:  Undefined index: ::1 in D:\\FHEM\\workspace\\smartvisu\\lib\\functions_config.php on line 89, referer: http://localhost/smartvisu/index.php?page=config


Momentan versuche ich in Eclipse "Remote System Explorer" zum laufen zu kriegen um damit auf das smartVISU auf meinem Cubietruck zuzugreifen. Dort scheint alles zu laufen.


Nun würde mich mal interessieren wie das andere hier machen um vernünftig Seiten / Widgets in smartVISU zu entwicklen.

Vielen Dank.

Gruß Daniel
Cubietruck: FHEM-Server 6.0

Homematic: HM-USB-CFG2, HM-CFG-LAN, HM-LC-SW1-FM, HM-LC-Sw1-Pl-DN-R1, HM-CC-RT-DN, HM-TC-IT-WM-W-EU, HM-SEC-SC-2, HM-SEC-SD, HM-PB-6-WM55

bgewehr

Ich nehme ein php-luna-eclipse - das reicht mir.
FritzBox 7590, Synology DS216+II mit Docker
Docker: FHEM mit hmlan, Homebridge, node-red, mosquitto, ems-collector für Buderus EMS mit AVR Net-IO
Gartenwasser über MQTT auf R/Pi A+
Volkszaehler.org auf R/Pi 2B mit Pi_Erweiterung
Raspberrymatic auf R/Pi 4B mit RPI-RF-MOD u. CUL868

dancatt

Zitat von: bgewehr am 10 Februar 2015, 21:53:27
Ich nehme ein php-luna-eclipse - das reicht mir.

Das heißt ohne Anbindung Fhem und somit auch ohne Test ob die Daten korrekt von Fhem nach smartVISU kommen?

Ich habe in Eclipse nun mit "Remote System Explorer" mein smartVISU auf meinem Cubietruck eingebunden. Dann kann ich das direkt auch mit Fhem testen.
Cubietruck: FHEM-Server 6.0

Homematic: HM-USB-CFG2, HM-CFG-LAN, HM-LC-SW1-FM, HM-LC-Sw1-Pl-DN-R1, HM-CC-RT-DN, HM-TC-IT-WM-W-EU, HM-SEC-SC-2, HM-SEC-SD, HM-PB-6-WM55

chris1284

Zitat von: dancatt am 10 Februar 2015, 20:48:44
Nun würde mich mal interessieren wie das andere hier machen um vernünftig Seiten / Widgets in smartVISU zu entwicklen.
Gruß Daniel
winscp um an die files auf dem cubie zu kommen und notepad++ ohne weitere plugins (gibt aber welche für twig https://github.com/Banane9/notepadplusplus-twig)

bgewehr

Wie macht man eigentlich php debugging?
FritzBox 7590, Synology DS216+II mit Docker
Docker: FHEM mit hmlan, Homebridge, node-red, mosquitto, ems-collector für Buderus EMS mit AVR Net-IO
Gartenwasser über MQTT auf R/Pi A+
Volkszaehler.org auf R/Pi 2B mit Pi_Erweiterung
Raspberrymatic auf R/Pi 4B mit RPI-RF-MOD u. CUL868

purple007

ich habe für mich mein perfektes setup gefunden:
notepad++ zum editieren
winscp für die dateien
wampp als lokalen server mit zwei pages
- einmal lokal für die doku und einmal zum anschauen und dann rüberschieben

oder direkt ändern und nen browserrefresh

HCS

Jeweils ein Cubietruck als Test- und Produktivserver mit lighttpd, FHEM und SV, beide mit nächtlichem Backup und einer Woche Historie
Für unterwegs und die "krassen Experimente" noch einen xampp
Zum "rumexperimentieren" ab und an mal noch jsfiddle

Mein komplettes page-Verzeichnis aus einem SVN-Repository lokal auf einigen Entwicklungsrechnern (Win 8.1, Macbook) ausgecheckt.

Als Entwicklungsumgebung WebStorm.
WebStorm lädt geänderte files direkt automatisch beim lokalen Speichern des files per SFTP auf den WebServer hoch.

Die Treiber liegen auch im page-Verzeichnis, im driver-Verzeichnis zeigen symlinks zu ihnen.
Das macht aber nur für "Treiber-Entwickler" Sinn, um die Treiber mit im repository zu haben

Damit kann die komplette Entwicklung sehr komfortabel (statische code analyse, refactoring, code completion, ein-auschecken, diff, ...) in WebStorm stattfinden.
Testen und debuggen: üblicherweise Chrom und manchmal FireFox mit FireBug, zum Testen noch ein altes Android Tablet und das Nexus 5

Produktiv ein "immer an" Android-Tablet an zentraler Stelle auf dem SV als Chrome-WebApp 24/7 läuft.

fhainz

Eclipse - Projekte liegen direkt am Server und werden übers Netzwerk geöffnet. So spar ich mir den umweg mit einem FTP Programm.