Domoticz, Homebridge et Homekit

Forum dédié aux questions concernant la configuration de votre serveur sous Linux
totof60
Messages : 373
Inscription : 29 avr. 2016, 09:31

Re: Domoticz, Homebridge et Homekit

Message par totof60 »

Chez moi il fonctionne toujours.
Domoticz V2022.2
sous Buster, Homebridge,RfLink
Raspberry pi3, Google home mini
plein de truc wifi !! de l'esp-01 jusque le nodemcu en passant par le wemos et même du DIY
Lagachette
Messages : 149
Inscription : 29 nov. 2016, 22:15

Re: Domoticz, Homebridge et Homekit

Message par Lagachette »

Pour information j'ai supprimé mon domicile dans l'application Maison et j'ai pu rajouter ma passerelle homebridge et refaire fonctionner siri.
Sopalin
Messages : 97
Inscription : 04 juil. 2016, 10:07

Re: Domoticz, Homebridge et Homekit

Message par Sopalin »

J'ai installé Homebridge hier soir sans soucis. Tout fonctionne et j'ai pas de conflit avec MyDomoAtHome.
Par contre impossible de lancer homebridge en service ou en tache de fond.

J'ai essayer nohup homebridge &
J'ai également essayer de suivre de tuto pour créer un service sans succès.

Pour info j'ai suivi le tuto suivant pour l'install : http://www.projetsdiy.fr/piloter-objets ... JTai1PhCHs

Des idées ?
Lagachette
Messages : 149
Inscription : 29 nov. 2016, 22:15

Re: Domoticz, Homebridge et Homekit

Message par Lagachette »

freerider90
Messages : 15
Inscription : 15 févr. 2017, 18:46

Re: Domoticz, Homebridge et Homekit

Message par freerider90 »

Bonjour a tous,

je suis nouveau, (je passerai me présenter juste apres ce poste dans la section adéquate)

alors perso j'ai besoin d'un coup de pouce car je n'arrive a rien avec l'appui maison de iOS 10, et je ne suis pas sur de comprendre exactement comment ça marche…

niveau matériel: raspberry pi 3 + carte 8 relay, pour le moment que 5 sont connecté

alors déjà niveau installe j'ai suivi le tuto :http://www.domoticz.com/wiki/Homekit_Siri

l'installe me semble correcte; mon application iOS reconnait le pont homebridge, mais je n'ai pas mes accessoires,

sur domoticz: j'ai crée une pièce "homebridge" dans laquelle j'ai mis mes 5 switch on/off qui sont relié a des relay….

mon fichier config.json se trouve a cette emplacement : /homebridge/config.json je le colle juste dessous:

Code : Tout sélectionner

{
    "bridge": {
        "name": "Homebridge",
        "username": "B8:27:EB:08:42:D0",
        "port": 51826,
        "pin": "031-45-154"
    },
    "description": "Configuration file for (e)xtended Domoticz platform.",
    "platforms": [
        {
            "platform": "eDomoticz",
            "name": "eDomoticz",
            "server": "127.0.0.1",
            "port": "8080",
            "ssl": 0,
            "roomid": <3>,
            "mqtt": 1
        }
    ],
j'ai pris soin de remplacer mon adresse mac, mais je ne suis pas sur de la syntaxe de la ligne roomid

j'espère n'avoir rien oublié.

merci
Lagachette
Messages : 149
Inscription : 29 nov. 2016, 22:15

Re: Domoticz, Homebridge et Homekit

Message par Lagachette »

Enlève les <> autour de ta roomid.
As tu installé un plugin du genre edomoticz ?
https://www.domoticz.com/forum/viewtopic.php?t=10272

As tu installé mqtt ?
freerider90
Messages : 15
Inscription : 15 févr. 2017, 18:46

Re: Domoticz, Homebridge et Homekit

Message par freerider90 »

Bonjour, Lagachette,

Alors j'ai corrigé la ligne roomid

pour le plugin edomoticz c'est fait, lors de l'installe en suivant le tuto dont j'avais mis le lien, vérifier depuis la procédure https://www.npmjs.com/package/homebridge-edomoticz.

pour mqtt je ne sais pas, comment je l'installe? sudo npm -g install mqtt?

suite à tout cela l'apps "maison" ne trouve plus le pont homebridge…

je precise que je ne suis pas partit d'une image SD de domoticz, mais bien d'une installe complete sur une image jessie pixel

je met une copie des messagers du démarrage d'homebridge:

Code : Tout sélectionner

*** WARNING *** The program 'nodejs' 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=nodejs>
*** WARNING *** The program 'nodejs' 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=nodejs&f=DNSServiceRegister>
[2017-02-16 15:27:30] Loaded plugin: homebridge-edomoticz
[2017-02-16 15:27:30] Registering accessory 'homebridge-edomoticz.eDomoticz'
[2017-02-16 15:27:30] Registering platform 'homebridge-edomoticz.eDomoticz'
[2017-02-16 15:27:30] ---
[2017-02-16 15:27:30] config.json (/home/pi/.homebridge/config.json) not found.
Scan this code with your HomeKit App on your iOS device to pair with Homebridge:
                       
    ┌────────────┐     
    │ 031-45-154 │     
    └────────────┘     
                       
/usr/lib/node_modules/homebridge/node_modules/mdns/lib/advertisement.js:56
  dns_sd.DNSServiceRegister(self.serviceRef, flags, ifaceIdx, name,
         ^

Error: dns service error: name conflict
    at new Advertisement (/usr/lib/node_modules/homebridge/node_modules/mdns/lib/advertisement.js:56:10)
    at Object.create [as createAdvertisement] (/usr/lib/node_modules/homebridge/node_modules/mdns/lib/advertisement.js:64:10)
    at Advertiser.startAdvertising (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Advertiser.js:43:30)
    at Bridge.Accessory._onListening (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:539:20)
    at emitOne (events.js:96:13)
    at HAPServer.emit (events.js:189:7)
    at HAPServer._onListening (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:190:8)
    at emitOne (events.js:96:13)
    at EventedHTTPServer.emit (events.js:189:7)
    at EventedHTTPServer.<anonymous> (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/eventedhttp.js:65:10)
semblerai que config.json sois introuvable…? pourtant bien a sa place : /homebridge/config.json
Lagachette
Messages : 149
Inscription : 29 nov. 2016, 22:15

Re: Domoticz, Homebridge et Homekit

Message par Lagachette »

essaye plutôt dans /home/pi/.homebridge/
freerider90
Messages : 15
Inscription : 15 févr. 2017, 18:46

Re: Domoticz, Homebridge et Homekit

Message par freerider90 »

ok suite au déplacement ( /home/pi/.homebridge/config.json ) voici le code au démarrage d'homebridge:

Code : Tout sélectionner

*** WARNING *** The program 'nodejs' 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=nodejs>
*** WARNING *** The program 'nodejs' 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=nodejs&f=DNSServiceRegister>
[2017-02-16 17:56:44] Loaded plugin: homebridge-edomoticz
[2017-02-16 17:56:44] Registering accessory 'homebridge-edomoticz.eDomoticz'
[2017-02-16 17:56:44] Registering platform 'homebridge-edomoticz.eDomoticz'
[2017-02-16 17:56:44] ---
[2017-02-16 17:56:44] Loaded config.json with 0 accessories and 1 platforms.
[2017-02-16 17:56:44] ---
[2017-02-16 17:56:44] Loading 1 platforms...
[2017-02-16 17:56:44] [eDomoticz] Initializing eDomoticz platform...
[2017-02-16 17:56:44] Loading 0 accessories...
[2017-02-16 17:56:44] [eDomoticz] Initializing platform accessory 'Télévision'...
[2017-02-16 17:56:44] [eDomoticz] Initializing platform accessory 'bureau'...
[2017-02-16 17:56:44] [eDomoticz] Initializing platform accessory 'lampe'...
[2017-02-16 17:56:44] [eDomoticz] Initializing platform accessory 'prise 4'...
[2017-02-16 17:56:44] [eDomoticz] Initializing platform accessory 'prise 5'...
Scan this code with your HomeKit App on your iOS device to pair with Homebridge:
                       
    ┌────────────┐     
    │ 000-00-000 │     
    └────────────┘     
                       
/usr/lib/node_modules/homebridge/node_modules/mdns/lib/advertisement.js:56
  dns_sd.DNSServiceRegister(self.serviceRef, flags, ifaceIdx, name,
         ^

Error: dns service error: name conflict
    at new Advertisement (/usr/lib/node_modules/homebridge/node_modules/mdns/lib/advertisement.js:56:10)
    at Object.create [as createAdvertisement] (/usr/lib/node_modules/homebridge/node_modules/mdns/lib/advertisement.js:64:10)
    at Advertiser.startAdvertising (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Advertiser.js:43:30)
    at Bridge.Accessory._onListening (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:539:20)
    at emitOne (events.js:96:13)
    at HAPServer.emit (events.js:189:7)
    at HAPServer._onListening (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:190:8)
    at emitOne (events.js:96:13)
    at EventedHTTPServer.emit (events.js:189:7)
    at EventedHTTPServer.<anonymous> (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/eventedhttp.js:65:10)
toujours pas visible dans "maison"
freerider90
Messages : 15
Inscription : 15 févr. 2017, 18:46

Re: Domoticz, Homebridge et Homekit

Message par freerider90 »

bon j'ai pas trop compris pourquoi, mais suite a un reboot, le déplacement de config.json et une réinitiallisation de "maison" d'un coup d'un seul sa a fonctionné, puis je me suis barré de chez moi et en revenant, homebridge était indisponible, donc je ne comprend pas, aucun reboot n'y fait, j'ai fait comme Lagachette, a savoir reconfiguer "Maison" depuis zéro mais rien n'y fait,

et quand je lance homebridge manuellement on dirait qu'il y a un problème de port: Error: listen EADDRINUSE :::51826

Code : Tout sélectionner

*** WARNING *** The program 'nodejs' 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=nodejs>
*** WARNING *** The program 'nodejs' 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=nodejs&f=DNSServiceRegister>
[2017-02-16 20:41:08] Loaded plugin: homebridge-edomoticz
[2017-02-16 20:41:08] Registering accessory 'homebridge-edomoticz.eDomoticz'
[2017-02-16 20:41:08] Registering platform 'homebridge-edomoticz.eDomoticz'
[2017-02-16 20:41:08] ---
[2017-02-16 20:41:08] Loaded config.json with 0 accessories and 1 platforms.
[2017-02-16 20:41:08] ---
[2017-02-16 20:41:08] Loading 1 platforms...
[2017-02-16 20:41:08] [eDomoticz] Initializing eDomoticz platform...
[2017-02-16 20:41:08] Loading 0 accessories...
[2017-02-16 20:41:08] [eDomoticz] Initializing platform accessory 'Télé'...
[2017-02-16 20:41:08] [eDomoticz] Initializing platform accessory 'bureau'...
[2017-02-16 20:41:08] [eDomoticz] Initializing platform accessory 'lampe'...
[2017-02-16 20:41:08] [eDomoticz] Initializing platform accessory 'prise 4'...
[2017-02-16 20:41:08] [eDomoticz] Initializing platform accessory 'prise 5'...
Scan this code with your HomeKit App on your iOS device to pair with Homebridge:
                       
    ┌────────────┐     
    │ 000-00-000 │     
    └────────────┘     
                       
events.js:161
      throw er; // Unhandled 'error' event
      ^

Error: listen EADDRINUSE :::51826
    at Object.exports._errnoException (util.js:1023:11)
    at exports._exceptionWithHostPort (util.js:1046:20)
    at Server._listen2 (net.js:1261:14)
    at listen (net.js:1297:10)
    at Server.listen (net.js:1375:9)
    at EventedHTTPServer.listen (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/eventedhttp.js:60:19)
    at HAPServer.listen (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:158:20)
    at Bridge.Accessory.publish (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:496:16)
    at Server._publish (/usr/lib/node_modules/homebridge/lib/server.js:114:16)
    at Server.<anonymous> (/usr/lib/node_modules/homebridge/lib/server.js:372:14)
d'autre part:

le status de mes GPIO est inversé
quand sur domoticz l'inter et a l'état de "on" donc normalement "1" il est en faite a "0" donc mon relay est éteint

j'ai corrigé avec:

Code : Tout sélectionner

echo 1 > /sys/class/gpio/gpio1/active_low && echo 1 > /sys/class/gpio/gpio2/active_low && echo 1 > /sys/class/gpio/gpio3/active_low && echo 1 > /sys/class/gpio/gpio4/active_low && echo 1 > /sys/class/gpio/gpio5/active_low
mais je suis obliger de le faire a chaque reboot

connaissez vous la raison de cette inversion, ou sinon un moyen pour faire en sorte de ACTIVE_LOW soit pris en charge au démarrage de façon automatique

dsl je dévie un peu du sujet
Répondre