Eigene FhemNative Version erstellen

Begonnen von Syrex-o, 02 Dezember 2019, 08:49:43

Vorheriges Thema - Nächstes Thema

grossmaggul

Supi, freut mich für Dich.

Teste doch mal bitte, ob bei Dir externe Inhalte wie Kamera- oder Bilder-URLs funktionieren.
FHEM auf Debian Buster Server, 2 x nanoCUL868, 1xnanoCUL465; Homematic, MAX, MiLight, HUE,  2 x Gosund SP1

Porsti

Hi,

wollte mal fragen ob einer die fertige app zum Download zur verfügung stellen kann.
Habe ein iPhone aber leider keinen Mac und daher auch noch wenig Ahnung von xCode.

Gruß & Danke
Porsti
____________________________________
fhem 6.2  auf Raspberry 3b
Homematic HM-CC-RT-DN / HM-TC-IT-WM-W-EU / HM-SEC-SCo / HM-LC-SW1-PL2
SIGNALduino, KNX (Merten, MDT, Siemens, ABB)

Syrex-o

Zitat von: Porsti am 18 Februar 2020, 14:28:54
Hi,

wollte mal fragen ob einer die fertige app zum Download zur verfügung stellen kann.
Habe ein iPhone aber leider keinen Mac und daher auch noch wenig Ahnung von xCode.

Gruß & Danke
Porsti

Der Maintainer ist sehr gern gesehen  ;)
Geht das denn so einfach bei IPhone, externe Apps zu installieren?

Beste Grüße

Porsti

Würde es gerne mal testen.

Ich glaube schon das es einige fhem'ler gibt ihr Ihr System unterwegs mit dem iPhone bedienen würden.
Habe auch nur durch zufall diesen Beitrag gesehen da ja im Ersten Beitrag diese Version nicht erwähnt wird und auf github nur dieser Platzhalter zu finden ist.

Gruß
Porsti
____________________________________
fhem 6.2  auf Raspberry 3b
Homematic HM-CC-RT-DN / HM-TC-IT-WM-W-EU / HM-SEC-SCo / HM-LC-SW1-PL2
SIGNALduino, KNX (Merten, MDT, Siemens, ABB)

grossmaggul

ZitatGeht das denn so einfach bei IPhone, externe Apps zu installieren?
Ohne Jailbreak wird das wohl eher nicht funktionieren.
FHEM auf Debian Buster Server, 2 x nanoCUL868, 1xnanoCUL465; Homematic, MAX, MiLight, HUE,  2 x Gosund SP1

Aladin222

Hmmm, ich denke das Problem ist :
Wie möchtest du die App auf dem iPhone installieren ,wenn die App nicht vom AppStore kommt ?
Das übernimmt Xcode ja ...
[Edit] ...Grossmaul war schneller :-)

Jep, mit Jailbreak könnte natürlich funktionieren ...

Porsti

Alles gut  ;)

Hatte gehofft das es etwas einfacher geht. Hatte mir kurz die beschreibung von Xcode angeschaut und habe nur "Bahnhof" verstanden.
Finde es sehr schwer beschrieben wenn man null Ahnung von der Materie hat  :'(

Gruß
Porsti
____________________________________
fhem 6.2  auf Raspberry 3b
Homematic HM-CC-RT-DN / HM-TC-IT-WM-W-EU / HM-SEC-SCo / HM-LC-SW1-PL2
SIGNALduino, KNX (Merten, MDT, Siemens, ABB)

Syrex-o


Aladin222

Hallo @all ,

Die Vorgängerversion von FhemNative lief bei mir soooo gut und zuverlässig , das ich wohl komplett vergessen habe , wie ich das durch Xcode gejagt hatte :-(
Nun möchte ich die Version 2.5 natürlich auch gerne auf dem iPad testen aber ich scheitere schon beim clonen mit dem Terminal :

clone https://github.com/Syrex-o/FhemNative
-bash: clone: command not found


hmmm, ich bin mir eigentlich ziemlich sicher das es genauso ging ? nun kennt der iMac den Klone Befehl nicht mehr ?
Habt ihr das hinbekommen ?

Esjay


Aladin222

#40
ja ! Ich depp :-(

hänge nun aber direkt wieder :

nach npm run ios:prod

bekomme ich :
> FhemNative@2.5.0 ios:prod /Users/aladin212/FhemNative/Development/FhemNative
> ionic cordova build ios --prod && open -a Xcode platforms/ios/

sh: ionic: command not found
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! FhemNative@2.5.0 ios:prod: `ionic cordova build ios --prod && open -a Xcode platforms/ios/`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the FhemNative@2.5.0 ios:prod script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/aladin212/.npm/_logs/2020-04-22T07_55_14_948Z-debug.log
RenesiMac:FhemNative aladin212$


Im besagten Log :

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   '/usr/local/Cellar/node/13.7.0/bin/node',
1 verbose cli   '/usr/local/bin/npm',
1 verbose cli   'run',
1 verbose cli   'ios:prod'
1 verbose cli ]
2 info using npm@6.13.6
3 info using node@v13.7.0
4 verbose run-script [ 'preios:prod', 'ios:prod', 'postios:prod' ]
5 info lifecycle FhemNative@2.5.0~preios:prod: FhemNative@2.5.0
6 info lifecycle FhemNative@2.5.0~ios:prod: FhemNative@2.5.0
7 verbose lifecycle FhemNative@2.5.0~ios:prod: unsafe-perm in lifecycle true
8 verbose lifecycle FhemNative@2.5.0~ios:prod: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/aladin212/FhemNative/Development/FhemNative/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin
9 verbose lifecycle FhemNative@2.5.0~ios:prod: CWD: /Users/aladin212/FhemNative/Development/FhemNative
10 silly lifecycle FhemNative@2.5.0~ios:prod: Args: [
10 silly lifecycle   '-c',
10 silly lifecycle   'ionic cordova build ios --prod && open -a Xcode platforms/ios/'
10 silly lifecycle ]
11 info lifecycle FhemNative@2.5.0~ios:prod: Failed to exec ios:prod script
12 verbose stack Error: FhemNative@2.5.0 ios:prod: `ionic cordova build ios --prod && open -a Xcode platforms/ios/`
12 verbose stack spawn ENOENT
12 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:48:18)
12 verbose stack     at ChildProcess.emit (events.js:321:20)
12 verbose stack     at maybeClose (internal/child_process.js:1026:16)
12 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
13 verbose pkgid FhemNative@2.5.0
14 verbose cwd /Users/aladin212/FhemNative/Development/FhemNative
15 verbose Darwin 19.4.0
16 verbose argv "/usr/local/Cellar/node/13.7.0/bin/node" "/usr/local/bin/npm" "run" "ios:prod"
17 verbose node v13.7.0
18 verbose npm  v6.13.6
19 error code ELIFECYCLE
20 error syscall spawn
21 error file sh
22 error errno ENOENT
23 error FhemNative@2.5.0 ios:prod: `ionic cordova build ios --prod && open -a Xcode platforms/ios/`
23 error spawn ENOENT
24 error Failed at the FhemNative@2.5.0 ios:prod script.
24 error This is probably not a problem with npm. There is likely additional logging output above.
25 verbose exit [ 1, true ]


Die Projektdatei wird leider nicht erstellt :(

Syrex-o

Zitat von: Aladin222 am 22 April 2020, 09:36:23
ja ! Ich depp :-(

hänge nun aber direkt wieder :

nach npm run ios:prod

bekomme ich :
> FhemNative@2.5.0 ios:prod /Users/aladin212/FhemNative/Development/FhemNative
> ionic cordova build ios --prod && open -a Xcode platforms/ios/

sh: ionic: command not found
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! FhemNative@2.5.0 ios:prod: `ionic cordova build ios --prod && open -a Xcode platforms/ios/`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the FhemNative@2.5.0 ios:prod script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/aladin212/.npm/_logs/2020-04-22T07_55_14_948Z-debug.log
RenesiMac:FhemNative aladin212$


Im besagten Log :

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   '/usr/local/Cellar/node/13.7.0/bin/node',
1 verbose cli   '/usr/local/bin/npm',
1 verbose cli   'run',
1 verbose cli   'ios:prod'
1 verbose cli ]
2 info using npm@6.13.6
3 info using node@v13.7.0
4 verbose run-script [ 'preios:prod', 'ios:prod', 'postios:prod' ]
5 info lifecycle FhemNative@2.5.0~preios:prod: FhemNative@2.5.0
6 info lifecycle FhemNative@2.5.0~ios:prod: FhemNative@2.5.0
7 verbose lifecycle FhemNative@2.5.0~ios:prod: unsafe-perm in lifecycle true
8 verbose lifecycle FhemNative@2.5.0~ios:prod: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/aladin212/FhemNative/Development/FhemNative/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin
9 verbose lifecycle FhemNative@2.5.0~ios:prod: CWD: /Users/aladin212/FhemNative/Development/FhemNative
10 silly lifecycle FhemNative@2.5.0~ios:prod: Args: [
10 silly lifecycle   '-c',
10 silly lifecycle   'ionic cordova build ios --prod && open -a Xcode platforms/ios/'
10 silly lifecycle ]
11 info lifecycle FhemNative@2.5.0~ios:prod: Failed to exec ios:prod script
12 verbose stack Error: FhemNative@2.5.0 ios:prod: `ionic cordova build ios --prod && open -a Xcode platforms/ios/`
12 verbose stack spawn ENOENT
12 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:48:18)
12 verbose stack     at ChildProcess.emit (events.js:321:20)
12 verbose stack     at maybeClose (internal/child_process.js:1026:16)
12 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
13 verbose pkgid FhemNative@2.5.0
14 verbose cwd /Users/aladin212/FhemNative/Development/FhemNative
15 verbose Darwin 19.4.0
16 verbose argv "/usr/local/Cellar/node/13.7.0/bin/node" "/usr/local/bin/npm" "run" "ios:prod"
17 verbose node v13.7.0
18 verbose npm  v6.13.6
19 error code ELIFECYCLE
20 error syscall spawn
21 error file sh
22 error errno ENOENT
23 error FhemNative@2.5.0 ios:prod: `ionic cordova build ios --prod && open -a Xcode platforms/ios/`
23 error spawn ENOENT
24 error Failed at the FhemNative@2.5.0 ios:prod script.
24 error This is probably not a problem with npm. There is likely additional logging output above.
25 verbose exit [ 1, true ]


Die Projektdatei wird leider nicht erstellt :(

Hey,

Schein so als hättest du ionic nicht installiert.
sudo npm uninstall -g ionic && sudo npm install ionic

Beste Grüße

Aladin222

Hi ,

danke für deine Rückmeldung !
Verstehe zwar nicht warum es weg ist - aber habe ich nun nachinstalliert :-)

Nun wird die Projektdatei erstellt ! Leider motzt Xcode nun mit dem swiftCode Language, welche ich auf swift 4 gesetzt habe ....
Nun erstellt er brav das Build und ich kann es auch aufs iPad laden...allerdings bleibt auf dem iPad nur das FhemNative Startbild und nichts passiert mehr :-)
Im Live-Log von Xcode sehe ich das er die index.html nicht findet ....weiß aber nicht woran es wirklich liegt 

2020-04-22 22:04:08.122809+0200 FhemNative[22528:841309] DiskCookieStorage changing policy from 2 to 0, cookie file: file:///Users/aladin212/Library/Developer/CoreSimulator/Devices/7414FB1F-347D-4E26-B667-351D4B5E9C4C/data/Containers/Data/Application/70FA41CF-1FCD-4D4E-AABE-1F272D3919DA/Library/Cookies/FhemNative250.binarycookies
2020-04-22 22:04:08.139429+0200 FhemNative[22528:841309] Apache Cordova native platform version 4.5.5 is starting.
2020-04-22 22:04:08.139577+0200 FhemNative[22528:841309] Multi-tasking -> Device: YES, App: YES
2020-04-22 22:04:08.180415+0200 FhemNative[22528:841309] CDVWKWebViewEngine: trying to inject XHR polyfill
2020-04-22 22:04:08.737995+0200 FhemNative[22528:841309] WF: === Starting WebFilter logging for process FhemNative
2020-04-22 22:04:08.738110+0200 FhemNative[22528:841309] WF: _userSettingsForUser : (null)
2020-04-22 22:04:08.738192+0200 FhemNative[22528:841309] WF: _WebFilterIsActive returning: NO
2020-04-22 22:04:08.758619+0200 FhemNative[22528:841309] CDVWKWebViewEngine will reload WKWebView if required on resume
2020-04-22 22:04:08.758782+0200 FhemNative[22528:841309] Using Ionic WKWebView
2020-04-22 22:04:08.759111+0200 FhemNative[22528:841309] [CDVTimer][console] 0.051022ms
2020-04-22 22:04:08.759243+0200 FhemNative[22528:841309] [CDVTimer][handleopenurl] 0.056982ms
2020-04-22 22:04:08.760552+0200 FhemNative[22528:841309] [CDVTimer][intentandnavigationfilter] 1.217008ms
2020-04-22 22:04:08.760717+0200 FhemNative[22528:841309] [CDVTimer][gesturehandler] 0.033975ms
2020-04-22 22:04:08.762114+0200 FhemNative[22528:841309] [CDVTimer][file] 1.321077ms
2020-04-22 22:04:08.762294+0200 FhemNative[22528:841309] CDVIonicKeyboard: resize mode 1
2020-04-22 22:04:08.762743+0200 FhemNative[22528:841309] [CDVTimer][cdvionickeyboard] 0.531912ms
2020-04-22 22:04:08.765051+0200 FhemNative[22528:841309] [CDVTimer][splashscreen] 2.169967ms
2020-04-22 22:04:08.766815+0200 FhemNative[22528:841309] [CDVTimer][statusbar] 1.613021ms
2020-04-22 22:04:08.767021+0200 FhemNative[22528:841309] [CDVTimer][socialsharing] 0.064015ms
2020-04-22 22:04:08.767093+0200 FhemNative[22528:841309] [CDVTimer][TotalPluginStartup] 8.066058ms
2020-04-22 22:04:08.947152+0200 FhemNative[22528:841309] ERROR: Start Page at 'www/index.html' was not found.
2020-04-22 22:04:09.045527+0200 FhemNative[22528:841309] ERROR Internal navigation rejected - <allow-navigation> not set for url='about:blank'


Syrex-o

Zitat von: Aladin222 am 22 April 2020, 22:11:28
Hi ,

danke für deine Rückmeldung !
Verstehe zwar nicht warum es weg ist - aber habe ich nun nachinstalliert :-)

Nun wird die Projektdatei erstellt ! Leider motzt Xcode nun mit dem swiftCode Language, welche ich auf swift 4 gesetzt habe ....
Nun erstellt er brav das Build und ich kann es auch aufs iPad laden...allerdings bleibt auf dem iPad nur das FhemNative Startbild und nichts passiert mehr :-)
Im Live-Log von Xcode sehe ich das er die index.html nicht findet ....weiß aber nicht woran es wirklich liegt 

2020-04-22 22:04:08.122809+0200 FhemNative[22528:841309] DiskCookieStorage changing policy from 2 to 0, cookie file: file:///Users/aladin212/Library/Developer/CoreSimulator/Devices/7414FB1F-347D-4E26-B667-351D4B5E9C4C/data/Containers/Data/Application/70FA41CF-1FCD-4D4E-AABE-1F272D3919DA/Library/Cookies/FhemNative250.binarycookies
2020-04-22 22:04:08.139429+0200 FhemNative[22528:841309] Apache Cordova native platform version 4.5.5 is starting.
2020-04-22 22:04:08.139577+0200 FhemNative[22528:841309] Multi-tasking -> Device: YES, App: YES
2020-04-22 22:04:08.180415+0200 FhemNative[22528:841309] CDVWKWebViewEngine: trying to inject XHR polyfill
2020-04-22 22:04:08.737995+0200 FhemNative[22528:841309] WF: === Starting WebFilter logging for process FhemNative
2020-04-22 22:04:08.738110+0200 FhemNative[22528:841309] WF: _userSettingsForUser : (null)
2020-04-22 22:04:08.738192+0200 FhemNative[22528:841309] WF: _WebFilterIsActive returning: NO
2020-04-22 22:04:08.758619+0200 FhemNative[22528:841309] CDVWKWebViewEngine will reload WKWebView if required on resume
2020-04-22 22:04:08.758782+0200 FhemNative[22528:841309] Using Ionic WKWebView
2020-04-22 22:04:08.759111+0200 FhemNative[22528:841309] [CDVTimer][console] 0.051022ms
2020-04-22 22:04:08.759243+0200 FhemNative[22528:841309] [CDVTimer][handleopenurl] 0.056982ms
2020-04-22 22:04:08.760552+0200 FhemNative[22528:841309] [CDVTimer][intentandnavigationfilter] 1.217008ms
2020-04-22 22:04:08.760717+0200 FhemNative[22528:841309] [CDVTimer][gesturehandler] 0.033975ms
2020-04-22 22:04:08.762114+0200 FhemNative[22528:841309] [CDVTimer][file] 1.321077ms
2020-04-22 22:04:08.762294+0200 FhemNative[22528:841309] CDVIonicKeyboard: resize mode 1
2020-04-22 22:04:08.762743+0200 FhemNative[22528:841309] [CDVTimer][cdvionickeyboard] 0.531912ms
2020-04-22 22:04:08.765051+0200 FhemNative[22528:841309] [CDVTimer][splashscreen] 2.169967ms
2020-04-22 22:04:08.766815+0200 FhemNative[22528:841309] [CDVTimer][statusbar] 1.613021ms
2020-04-22 22:04:08.767021+0200 FhemNative[22528:841309] [CDVTimer][socialsharing] 0.064015ms
2020-04-22 22:04:08.767093+0200 FhemNative[22528:841309] [CDVTimer][TotalPluginStartup] 8.066058ms
2020-04-22 22:04:08.947152+0200 FhemNative[22528:841309] ERROR: Start Page at 'www/index.html' was not found.
2020-04-22 22:04:09.045527+0200 FhemNative[22528:841309] ERROR Internal navigation rejected - <allow-navigation> not set for url='about:blank'



Hey,

Ich würde dir folgendes empfehlen:
Da FhemNative jede Menge neue dependencies hat und alte raus sind. Wenn du per git alles abgeholt hast, lösche den node_modules Ordner in Development/FhemNative.
per Terminal anschließend auch zu Development/FhemNative navigieren und einmal npm install
Das sollte dir alle aktuellen Pakete geben.
Dann versuch mal ob du per ionic --version eine Antwort von Ionic über die version bekommst.
Nun kannst du es noch einmal mit dem build versuchen.

Beste Grüße

Aladin222

hi @Syrex-o,

danke für deine Hilfestellung !
Leider brachte der Weg keinen Erfolg :-(

mit
sudo npm install -g cordova ionic

konnte ich das ionic installieren und das build lief auch durch ,wenn es auch ziemlich lange gedauert hat :-)
Auch hab ich das FhemNative nun auch aufs iPad bekommen *freu
Leider funktioniert der WetterChart von Proplanta auf dem iPad nicht ! ( Auf dem iMac funktioniert er ...)

Jetzt stellt sich mich natürlich die Frage ,ob es bei jedem Update so ein Krampf wird , nur um es auf dem iPad am laufen zu bekommen ?
Hältst du es für sinnvoll, lieber ein Android-Tablet zu nehmen ?
Wenn ja und nicht allzu teuer würde ich auch wechseln ,da mich deine Arbeit mit dem FhemNative wirklich überzeugt hat !!!
Wenn ja , welches Tablet würdest du empfehlen ?

Ganz lieben Dank