Apple Homekit: die Hoffnung stirbt zuletzt

Begonnen von eldrik, 23 Januar 2015, 13:57:07

Vorheriges Thema - Nächstes Thema

Breaked

#540
Hi,

bin auch gerade dabei, es in Betrieb zu nehmen.

Hab leider auch schon die ersten Probleme.
Zuerst https://github.com/nfarina/homebridge installiert, danach geschaut wie man Node.js installiert. Auch geschafft, Version 0.12.6 hab ich nun drauf.
Allerdings bekomm ichs ums verrecken nicht ans laufen.

Bin mir ehrlich gesagt auch nicht zu 100% sicher, wie man die "Bridge" startet.

Evtl. kann mir jemand ne kurze Schritt-für-Schritt Anleitung geben, in welcher Reihenfolge er es zum laufen bekommen hat.
Wäre nett!


UPDATE:
Derweil läuft es mit dem Befehl "node app.js" an.
Ich sehe per "eve"-App die Homebridge und kann mich auch mit dem Code anmelden.
Danach passiert allerdings nichts mehr. Eve sucht weiter nach Geräten, findet aber nicht, obwohl ich eins definiert hab.
Siehe:
root@raspberrypi:~/homebridge# node app.js
*** WARNING *** The program 'node' uses the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=node>
*** WARNING *** The program 'node' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=node&f=DNSServiceRegister>
Starting HomeBridge server...
_____________________________________________________________________
IMPORTANT: Homebridge is in the middle of some big changes.
           Read more about it here:
           https://github.com/nfarina/homebridge/wiki/Migration-Guide
_____________________________________________________________________

Loading 1 platforms...
[FHEM] Initializing FHEM platform...
starting longpoll: http://10.0.0.30:8083/fhem.pl?XHR=1&inform=type=status;filter=.*;since=null;fmt=JSON&timestamp=1441815377585
[FHEM] Fetching FHEM switchable devices...
[FHEM] fetching: http://10.0.0.30:8083/fhem?cmd=jsonlist2%20genericDeviceType=..*&XHR=1
Loading 0 accessories...
Server listening on: http://<ip>:8080
[FHEM] got: 1 results
[FHEM] Licht.Spiegelschrank is light
[FHEM] Initializing platform accessory 'Licht.Spiegelschrank'...
[FHEM] Loaded services for Licht.Spiegelschrank



Hoffe auf kurze Hilfe.. scheint ja nicht mehr viel zu sein.
Bereit für dein eigenes Smart Home?
http://ownsmarthome.de

P.A.Trick

Mal ne blöde Frage: woher bekomme ich den Code?
Cubietruck,RPI,QNAP Ts-419p+, FS20, FRITZ!DECT200, 7 MAX! Thermostate, 3 MAX! Fensterkontakte, Kodi, CUL V3.3, EM1000S, LW12, LD382, HUE, HM-CFG-USB-2, 1x HM-LC-SW1-FM, 2x HM-LC-SW2-FM, 2x HM-LC-Sw1PBU-FM, 3xHM-LC-Bl1PBU-FM,HM-SEC-RHS, 2xHM-SEC-SD,HM-WDS30-T-O, 3x HM-LC-Dim1TPBU-FM, RPI+AddOn

flurin

@Breaked

Als Alternative könntest du mit einem einfachen Accessory probieren. Hier findest du einige Beispiele:

https://github.com/cflurin/homebridge-shims

Diese "Accessory-Shims" funktionieren mit der neusten homebridge Version und sind bei mir im Einsatz.

Z.B. FhemOutlet.js

Configuration: siehe Kommentar im File oder config-fhem-sample.json.

Breaked

#543
Zitat von: flurin am 10 September 2015, 10:04:57
@Breaked

Als Alternative könntest du mit einem einfachen Accessory probieren. Hier findest du einige Beispiele:

https://github.com/cflurin/homebridge-shims

Diese "Accessory-Shims" funktionieren mit der neusten homebridge Version und sind bei mir im Einsatz.

Z.B. FhemOutlet.js

Configuration: siehe Kommentar im File oder config-fhem-sample.json.

Danke für die Antwort, flurin.

Diese Shims hab ich auch schon gefunden, aber ich glaube ich habe doch noch irgend ein anderes Problem..
Ich meine wenn ich die Bridge starte, wird diese ja zwar von Eve gefunden, aber ich kann keine Geräte anlegen.

Wenn es nur etwas gäbe um wieder von Null anzufangen :D (Ohne den Pi neu aufzusetzen und FHEM neu zu installieren/konfigurieren)

root@raspberrypi:/home/pi/HAP-NodeJS# npm install node-persist && npm install srp && npm install mdns
node-persist@0.0.3 node_modules/node-persist
├── mkdirp@0.3.5
└── q@1.1.2
|
> bignum@0.10.2 install /home/pi/HAP-NodeJS/node_modules/srp/node_modules/bignum
> node-gyp configure build

gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/0.12.6"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/home/pi/HAP-NodeJS/node_modules/srp/node_modules/bignum/.node-gyp"
gyp WARN install got an error, rolling back install
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: incorrect header check
gyp ERR! stack     at Zlib._handle.onerror (zlib.js:366:17)
gyp ERR! System Linux 4.1.6+
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build"
gyp ERR! cwd /home/pi/HAP-NodeJS/node_modules/srp/node_modules/bignum
gyp ERR! node -v v0.12.6
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
npm ERR! Linux 4.1.6+
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "srp"
npm ERR! node v0.12.6
npm ERR! npm  v2.11.2
npm ERR! code ELIFECYCLE

npm ERR! bignum@0.10.2 install: `node-gyp configure build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bignum@0.10.2 install script 'node-gyp configure build'.
npm ERR! This is most likely a problem with the bignum package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp configure build
npm ERR! You can get their info via:
npm ERR!     npm owner ls bignum
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/pi/HAP-NodeJS/npm-debug.log


Bin gerade nochmal alle Installationsschritte durch gegangen und stoße dabei auf diese Fehler.
Werde nochmal etwas rumbasteln :-)


Eventuell hat kann ja jemand aus der debug Datei etwas erkennen?!
Bereit für dein eigenes Smart Home?
http://ownsmarthome.de

flurin

Ich würde homebridge löschen (oder umbenennen auf z.B. homebridge-1) und gemäss dieser Anleitung installieren:

https://github.com/nfarina/homebridge/wiki/Running-HomeBridge-on-a-Raspberry-Pi

Breaked

#545
Mh, also langsam bin ich komplett verwirrt (oder lasse mich verwirren).
Gut, also im Prinzip einfach den homebridge Ordner (via FTP) löschen?!

Aber nochmal zum Verständnis:
Ich muss nach der Anleitung vorgehen, die du gerade geschickt hast, bis zum Punk "Procceed as usual".
Danach quasi diesen Schritten folgen: https://github.com/nfarina/homebridge#getting-started

Habe ich das soweit korrekt verstanden?
Bereit für dein eigenes Smart Home?
http://ownsmarthome.de

flurin

Ja, korrekt. Ich weiss nicht, was du schon alles verändert hast, darum ist eine neue Installation sinnvoll.

Breaked

Das denke ich auch. Bin gerade am "resett" dran.
Evtl. kannst du mir noch kurz sagen, was es mit den "Shims" auf sich hat? Das will mir noch nicht ganz einleuchten, da ich ja eigentlich via FHEM meine Devices in Homekit katapultieren will..
Bereit für dein eigenes Smart Home?
http://ownsmarthome.de

HolyMoly

Wann kommt eigentlich Andre aus dem (wohlverdienten) Urlaub zurück? Es wäre so viel einfacher wenn der Platform Shim für die neue Hombridge version angepasst werden würde  8)
FHEM auf Raspi2 & Radxa Rock

flurin

Zitat von: Breaked am 10 September 2015, 10:26:24
Das denke ich auch. Bin gerade am "resett" dran.
Evtl. kannst du mir noch kurz sagen, was es mit den "Shims" auf sich hat? Das will mir noch nicht ganz einleuchten, da ich ja eigentlich via FHEM meine Devices in Homekit katapultieren will..

siehe Homebridge README: das ist ein Software-Begriff, eine Bezeichnung für die device-spezifische Dateien.

justme1968

bin (mehr oder weniger :) ) zurück.

das umbauen des platform shim steht als nächstes auf der fhem liste. kommt also hoffentlich bald.

gruss
  andre
hue, tradfri, alexa-fhem, homebridge-fhem, LightScene, readingsGroup, ...

https://github.com/sponsors/justme-1968

Breaked

Irgendwas scheint da groß im Argen zu liegen..
Siehe Anhang
Bereit für dein eigenes Smart Home?
http://ownsmarthome.de

Breaked

Hab es nun nach der hier beschriebenen Anleitung gemacht (paar Posts oben), sowie nach dieser hier: http://www.tatsch-it.de/control-fhem-with-siri/

Ich scheitere allerdings an den Command "npm install". Bekomme da die wildesten Fehler..
Als Anhang nochmal ein Bild der Konsole.
Nachdem ich alles deinstalliert und wieder installiert habe, will es immer noch nicht - komisch.

Weiß jemand noch einen Rat, oder muss ich das Projekt an die Wand klatschen?
Bereit für dein eigenes Smart Home?
http://ownsmarthome.de

Wuppi68

Zitat von: Breaked am 10 September 2015, 13:22:58
Weiß jemand noch einen Rat, oder muss ich das Projekt an die Wand klatschen?

Das kenn ich auch :-(

ist aktuell bei mir on hold gesetzt bis IOS9 und WatchOS2 raus ist ...

der Pi läuft gerade dafür einen Burnin Test :-) Und er läuft und läuft und läuft ohne Reboot und anderen Mucken
FHEM unter Proxmox als VM

Breaked

Für meine Zwecke hoffe ich darauf, dass die Schnittstelle weiter ausgebaut wird, und bestenfalls später in FHEM integriert wird..
Das wäre ein Traum! 8)

root@raspberrypi:/home/pi/homebridge# npm run start

> homebridge@0.1.1 start /home/pi/homebridge
> DEBUG=* node app.js || true

module.js:338
    throw err;
          ^
Error: Cannot find module '../build/Release/dns_sd_bindings'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:278:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/home/pi/homebridge/node_modules/mdns/lib/dns_sd.js:32:22)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)


Wie bekomm ich das Modul nachinstalliert?
npm install dns_sd_bindings funktioniert nicht, da es so wohl nicht existiert?
Bereit für dein eigenes Smart Home?
http://ownsmarthome.de