homebridge/homekit

Begonnen von justme1968, 01 Februar 2016, 16:16:37

Vorheriges Thema - Nächstes Thema

DeeSPe

Zitat von: Chris8888 am 13 Januar 2017, 23:15:08
das dachte ich auch...aber die nutzt er nicht...
Ich starte übrigens die Bridge als root...ist das da anders?

Auch als root sollte der relative  Pfad "~/.homebridge/config.json" sein.
Der absolute Pfad dann wohl "/root/.homebridge/config.json".

Gruß
Dan
MAINTAINER: 22_HOMEMODE, 98_Hyperion, 98_FileLogConvert, 98_serviced

Als kleine Unterstützung für meine Programmierungen könnt ihr mir gerne einen Kaffee spendieren: https://buymeacoff.ee/DeeSPe

olisba

Hallo zusammen,

Hat jemand einen Luft-Feuchte Sensor HM-WDS10-TH-O erfolgreich eingebunden?

Ich habe 2 Stück integriert... dazu mußte ich keine genericDeviceType oder homebridgemapping setzen, der Sensor inkl. Temperatur und Feuchte-% wird in Home und Eve App angezeigt.

Das Problem ist, daß bei Änderungen der Werte in den Home Apps und Eve kein Update angezeigt wird (in fhem ist alles korrekt angezeigt).
Nur wenn ich Homebridge neu starte, ist wieder der aktuelle Wert in den Apps.

Hat jemand eine Idee woran das liegen könnte?

Danke,
Oli



Gesendet von iPad mit Tapatalk Pro

RaspiLED

#1922
Ja, also es kommt darauf an wie genau Du die homebridge startest und ob Du beim Start einen Parameter und Pfad übergibst.

"-P, --plugin-path [path]        look for plugins installed at [path] as well as the default locations ([path] can also point to a single plugin)
    -U, --user-storage-path [path]  look for homebridge user files at [path] instead of the default location (~/.homebridge)"

Ich starte per systemd und User homebridge und da liegt meine config unter /var/homebridge/config.json

Aber suche doch mal per:

sudo find / | grep config.json
oder
sudo find / | grep homebridge

Gruß Arnd


Gesendet von iPhone mit Tapatalk
Raspberry Pi mit FHEM, CUL, Signalduino, MySensors, HomeBridge, Presence, WifiLight2, Bravia, ...

chris1284

moin,
ich  habe homebridge nach anleitung im wiki installiert. ich kann es auch per shell starten (root@SRV00:~#homebridge).
ich habe nun versucht homebridge als service laufen zu lassen (anleitung aus dem wiki, wobei es da ja komischerweise 2 gibt)
https://wiki.fhem.de/wiki/Homebridge_Start_und_Status_in_FHEM#Start_Script_bef.C3.BCllen
https://wiki.fhem.de/wiki/Homebridge_einrichten#Homebridge_automatisch_starten
versuche ich den service zu staten:
Zitatroot@SRV00:~# service homebridge start
Job for homebridge.service failed. See 'systemctl status homebridge.service' and 'journalctl -xn' for details.
Zitat
root@SRV00:~# systemctl status homebridge.service
● homebridge.service - LSB: Start daemon at boot time for homebridge
   Loaded: loaded (/etc/init.d/homebridge)
   Active: failed (Result: exit-code) since Sat 2017-01-14 09:55:58 CET; 5s ago
  Process: 60262 ExecStart=/etc/init.d/homebridge start (code=exited, status=203/EXEC)

Jan 14 09:55:58 SRV00 systemd[1]: homebridge.service: control process exited, code=exited status=203
Jan 14 09:55:58 SRV00 systemd[1]: Failed to start LSB: Start daemon at boot time for homebridge.
Jan 14 09:55:58 SRV00 systemd[1]: Unit homebridge.service entered failed state.

per
Zitatroot@SRV00:~# /etc/init.d/homebridge start
-bash: /etc/init.d/homebridge: /bin/sh^M: bad interpreter: No such file or directory

Morpheus_1977

Hallo zusammen,

seit ein paar Tagen versuch ich homebridge zum laufen zu bekommen. Jedoch scheint es ein Problen beim einlesenb der accessories zugeben!?

*** 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=libd  ns_sd&e=node>
*** WARNING *** The program 'node' called 'DNSServiceRegister()' which is not su  pported (or only supported partially) in the Apple Bonjour compatibility layer o  f Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libd  ns_sd&e=node&f=DNSServiceRegister>
[1/14/2017, 12:03:10 PM] Loaded plugin: homebridge-fhem
homebridge API version: 2.1
this homebridge-fhem 0.2.68
[1/14/2017, 12:03:10 PM] Registering platform 'homebridge-fhem.FHEM'
[1/14/2017, 12:03:10 PM] ---
[1/14/2017, 12:03:10 PM] Loaded config.json with 1 accessories and 1 platforms.
[1/14/2017, 12:03:10 PM] ---
[1/14/2017, 12:03:10 PM] Loading 1 platforms...
[1/14/2017, 12:03:10 PM] [FHEM] Initializing FHEM platform...
[1/14/2017, 12:03:12 PM] [FHEM] Checking devices and attributes...
[1/14/2017, 12:03:12 PM] [FHEM]   executing: http://127.0.0.1:8083/fhem?cmd=%7BA  ttrVal(%22global%22,%22userattr%22,%22%22)%7D&XHR=1
[1/14/2017, 12:03:12 PM] [FHEM]   executing: http://127.0.0.1:8083/fhem?cmd=json  list2%20TYPE=siri&XHR=1
starting longpoll: http://127.0.0.1:8083/fhem.pl?XHR=1&inform=type=status;addglo  bal=1;filter=.*;since=null;fmt=JSON&timestamp=1484391792370
[1/14/2017, 12:03:12 PM] [FHEM] Fetching FHEM devices...
[1/14/2017, 12:03:12 PM] [FHEM] fetching: http://127.0.0.1:8083/fhem?cmd=jsonlis  t2%20room=Homekit&XHR=1
[1/14/2017, 12:03:12 PM] Loading 1 accessories...
/usr/local/lib/node_modules/homebridge/lib/api.js:46
  if (name.indexOf('.') == -1) {
          ^

TypeError: Cannot read property 'indexOf' of undefined
    at API.accessory (/usr/local/lib/node_modules/homebridge/lib/api.js:46:11)
    at Server._loadAccessories (/usr/local/lib/node_modules/homebridge/lib/serve  r.js:254:42)
    at Server.run (/usr/local/lib/node_modules/homebridge/lib/server.js:81:38)
    at module.exports (/usr/local/lib/node_modules/homebridge/lib/cli.js:40:10)
    at Object.<anonymous> (/usr/local/lib/node_modules/homebridge/bin/homebridge  :17:22)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Function.Module.runMain (module.js:441:10)

Weiß jemand Rat? Dank im voraus!

Chris8888

Zitat von: RaspiLED am 14 Januar 2017, 07:48:39
Aber suche doch mal per:

sudo find / | grep config.json
oder
sudo find / | grep homebridge

Gruß Arnd

Hallo Arnd,

das hat geholfen! BESTEN Dank von einen Linux-Dau.
Die Bridge läuft wieder...

Viele Grüße
Christian
FHEM 6.0 auf einem PI4 mit div. Homematic-Komponenten, Alexa, Tablet-UI und Homebridge...und läuft einfach. Erweitert mit CCU3 und Homematic-IP...und läuft immer noch.

Markus M.

Hallo Andre,
bekomme ich für die Winmatic irgendwie ein commandSuffix für die Geschwindigkeit (level XX ignore 100) hin?
Wenn nein, kannst du sowas noch einbauen?
Ansonsten gehen meine Fenster leider nur in Zeitlupe auf und zu...
FHEM dev + HomeBridge + Lenovo Flex15 + HM-CFG-USB + RFXtrx433 + Fritz!Box 7590/7580/546E

HM Aktor/Sensor/Winmatic/Keymatic/Thermostat, HUE, Netatmo Weather/Security/Heating, Xiaomi AirPurifier/Vacuum, Withings Aura/BPM/Cardio/Go/Pulse/Thermo, VSX828, Harmony, Siro ERB15LE
https://paypal.me/mm0

justme1968

@chris1284: du hast dein /etc/init.d/homebridge unter windows bearbeitet und dos zeilenenden im file. dos2unix sollte helfen und deinen editor umstellen.

@Morpheus_1977: dein config.json file hat vermutlich bei den accessories einen fehler. du kannst es z.b. hier: http://jsonlint.com überprüfen.

@Markus M.: ich überlege mir etwas. bis dahin sollte cmdAlias helfen.

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

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

justme1968

@Markus M.: ich hab eben eine version mit valueSuffix eingecheckt. schau mal ob das so geht.
hue, tradfri, alexa-fhem, homebridge-fhem, LightScene, readingsGroup, ...

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

chris1284

#1929
@Andre: ja, winscp scheint das falsche format bei files zu nehmen, habs mit nano erstellt, geht

versuche ich es zu starten kommt nun folgendes:

ZitatNo passwd entry for user 'User hier'
Homebridge starting
Homebridge is not running

starte ich homebridge per "homebridge" befehl läufts, abe rzeigt folgendes noch an

ZitatServer listening on: http://<ip>:8282
[1/14/2017, 4:32:59 PM] [FHEM] no siri device found. please define it.

EDIT: ok dieser kleine satz ohne beispiel und die mangelhafte doku des siri device in der cmdref können dazu führen die lösung dafür zu übersehen...

Morpheus_1977

#1930
@ Andre

Valid JSON wurde mir beim überprüfen der config.json ausgespuckt.

{
   "bridge": {
      "name": "Homebridge",
      "username": "CC:22:3D:E3:CE:35",
      "port": 51826,
      "pin": "031-45-154"
   },

   "platforms": [{
      "platform": "FHEM",
      "name": "FHEM",
      "server": "127.0.0.1",
      "port": "8083",
      "auth": {
         "user": "xxxx",
         "pass": "xxxx"
      },
      "filter": "room=Homekit"
   }],

   "accessories": [{
         "name": "Homekit_AVR",
         "service": "switch"
      }

   ]
}

Wo kann der Fehler den sonst noch stecken?

RaspiLED

#1931
Hi,
erstmal Danke für Dein Passwort! Bitte schnellstens bei Dir in allen Accounts ändern und oben im Beitrag rauswerfen ;-)

Der Fehler liegt in Deiner accessories Section! Die sollte einfach leer sein und stattdessen sollte ein ganzer Raum (z.B. Homekit) in fhem für homebridge verwendet werden.

Hier mal eine funktionierende config.json:

{
    "bridge": {
        "name": "FHEM",
        "username": "AA:22:CC:44:EE:55",
        "port": 51826,
        "pin": "456-78-123"
    },

    "platforms": [
        {
            "platform": "FHEM",
            "name": "FHEM",
            "server": "127.0.0.1",
            "port": "8083",
            "auth": {"user": "Geheim", "pass": "Vergessen"},
            "filter": "room=Homekit"
        }
     ],

    "accessories": []
}

Gruß Arnd


Gesendet von iPhone mit Tapatalk
Raspberry Pi mit FHEM, CUL, Signalduino, MySensors, HomeBridge, Presence, WifiLight2, Bravia, ...

Morpheus_1977

Hallo Arnd,

vielen Dank für den Hinweis mit dem Passwort!

Wenn ich die accessoiers Section leer lasse bekomme ich beim starten von Homebridge: Loading 0 accessoiers desweiteren einen ReferenceError:

*** 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>
[1/14/2017, 6:09:43 PM] Loaded plugin: homebridge-fhem
homebridge API version: 2.1
this homebridge-fhem 0.2.68
[1/14/2017, 6:09:43 PM] Registering platform 'homebridge-fhem.FHEM'
[1/14/2017, 6:09:43 PM] ---
[1/14/2017, 6:09:43 PM] Loaded config.json with 0 accessories and 1 platforms.
[1/14/2017, 6:09:43 PM] ---
[1/14/2017, 6:09:43 PM] Loading 1 platforms...
[1/14/2017, 6:09:43 PM] [FHEM] Initializing FHEM platform...
[1/14/2017, 6:09:45 PM] [FHEM] Checking devices and attributes...
[1/14/2017, 6:09:45 PM] [FHEM]   executing: http://127.0.0.1:8083/fhem?cmd=%7BAttrVal(%22global%22,%22userattr%22,%22%22)%7D&XHR=1
[1/14/2017, 6:09:45 PM] [FHEM]   executing: http://127.0.0.1:8083/fhem?cmd=jsonlist2%20TYPE=siri&XHR=1
starting longpoll: http://127.0.0.1:8083/fhem.pl?XHR=1&inform=type=status;addglobal=1;filter=.*;since=null;fmt=JSON&timestamp=1484413785273
[1/14/2017, 6:09:45 PM] [FHEM] Fetching FHEM devices...
[1/14/2017, 6:09:45 PM] [FHEM] fetching: http://127.0.0.1:8083/fhem?cmd=jsonlist2%20room=Homekit&XHR=1
[1/14/2017, 6:09:45 PM] Loading 0 accessories...
Server listening on: http://<ip>:8282
[1/14/2017, 6:09:45 PM] [FHEM] got: 4 results
/usr/local/lib/node_modules/homebridge-fhem/index.js:1406
    this.mappings[CustomUUDs.Volume] = { reading: 'volume', cmd: 'volume', delay: true,
                  ^

ReferenceError: CustomUUDs is not defined
    at Object.FHEMAccessory (/usr/local/lib/node_modules/homebridge-fhem/index.js:1406:19)
    at Object.<anonymous> (/usr/local/lib/node_modules/homebridge-fhem/index.js:1040:42)
    at Array.map (native)
    at Object.<anonymous> (/usr/local/lib/node_modules/homebridge-fhem/index.js:1037:31)
    at Request.self.callback (/usr/local/lib/node_modules/homebridge-fhem/node_modules/request/request.js:186:22)
    at emitTwo (events.js:87:13)
    at Request.emit (events.js:172:7)
    at Request.<anonymous> (/usr/local/lib/node_modules/homebridge-fhem/node_modules/request/request.js:1081:10)
    at emitOne (events.js:77:13)
    at Request.emit (events.js:169:7)

Irgendwie steh ich auf dem schlauch

Gruß

chris1284

der homebridge service will einfach nicht starten.
kann man irgendwo sehen warum (gibts logs zur homebridge)?
Zitat● homebridge.service - LSB: Start daemon at boot time for homebridge
   Loaded: loaded (/etc/init.d/homebridge)
   Active: active (exited) since Sat 2017-01-14 19:43:36 CET; 23s ago
  Process: 14462 ExecStop=/etc/init.d/homebridge stop (code=exited, status=0/SUCCESS)
  Process: 14469 ExecStart=/etc/init.d/homebridge start (code=exited, status=0/SUCCESS)

Jan 14 19:43:34 SRV00 systemd[1]: Starting LSB: Start daemon at boot time for homebridge...
Jan 14 19:43:34 SRV00 homebridge[14469]: Homebridge starting
Jan 14 19:43:36 SRV00 homebridge[14469]: Homebridge is not running
Jan 14 19:43:36 SRV00 systemd[1]: Started LSB: Start daemon at boot time for homebridge.

RaspiLED

Hi, So jetzt ist auf homebridge seite alles richtig!
Du hast aktuell vier Geräte im Raum HomeKit. Eins davon hat offensichtlich was mit Lautsprechern zu tun und damit Volume Mappings. Da ist in fhem was im Mapping falsch!

Starte also erstmal mit einem Gerät mit on/off im Raum Homekit und arbeite Dich langsam weiter ;-)

Das wird schon.

Gruß Arnd


Gesendet von iPhone mit Tapatalk
Raspberry Pi mit FHEM, CUL, Signalduino, MySensors, HomeBridge, Presence, WifiLight2, Bravia, ...