Thermostat Nest Homebridge sur Synology

Bonjour, je suis à la recherche de quelqu’un qui connait la procédure pour rendre compatible Homekit et le thermostat Nest sur un Synology. Cela fait 3 semaines que j’essaye mais sans succès. Quelqu’un pourrait m’aider? j’ai déjà fait pas mal de boulot mais impossible de lancer l’installation de Homebridge sur le Synology car je ne parviens pas à entrer en SSH en tant que root pour lancer la ligne de commande qui permettrais l’installation de Homebridge Nest. Merci d’avance car ce produit est parfait mais il manque cette compatibilité. J’ai réussi à le faire fonctionner mais qu’avec un. Impossible avec le synology.

Quel est la marche à suivre que tu suis ? (lien)

Sinon pour accéder au root en ssh sur Synology, depuis DSM 6 il faut se connecter avec un compte administrateur puis taper sudo su et le mot de passe du dit compte. Ni étoiles **** ni mot de passe ne s’affiche quand on le tape et c’est normal. Avec quelques images : https://www.noobunbox.net/synology/synology-se-connecter-en-ssh-sous-dsm-6

Merci beaucoup de ta réponse, Je suis cette méthode https://github.com/KraigM/homebridge-nest
et je procède a l’exécution du programme avec docker sur le syno. J’ai essayer en ssh comme tu m’as dit avec mon compte admin en tapant la ligne de commande: sudo su npm install -g homebridge et il répond par: su: group homebridge does not exist. et si je rentre la ligne de commande: sudo npm install -g homebridge sa donne sa:

npm WARN engine [email protected]: wanted: {“node”:">=4.3.2"} (current: {“node”:“0.10.48”,“npm”:“2.15.1”})
npm WARN engine [email protected]: wanted: {“node”:">=4.3.2"} (current: {“node”:“0.10.48”,“npm”:“2.15.1”})
/

[email protected] install /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/node_modules/curve25519-n2
node-gyp rebuild

gyp WARN EACCES user “root” does not have permission to access the dev dir "/root/.node-gyp/0.10.48"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/node_modules/curve25519-n2/.node-gyp"
gyp ERR! build error
gyp ERR! stack Error: not found: make
gyp ERR! stack at F (/usr/local/lib/node_modules/npm/node_modules/which/which.js:63:19)
gyp ERR! stack at E (/usr/local/lib/node_modules/npm/node_modules/which/which.js:72:29)
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/which/which.js:81:16
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/which/node_modules/isexe/index.js:44:5
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/which/node_modules/isexe/mode.js:8:5
gyp ERR! stack at Object.oncomplete (fs.js:108:15)
gyp ERR! System Linux 3.10.102
gyp ERR! command “node” “/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/node_modules/curve25519-n2
gyp ERR! node -v v0.10.48
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok

[email protected] install /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/node_modules/ed25519
node-gyp rebuild

gyp WARN EACCES user “root” does not have permission to access the dev dir "/root/.node-gyp/0.10.48"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/node_modules/ed25519/.node-gyp"
gyp ERR! build error
gyp ERR! stack Error: not found: make
gyp ERR! stack at F (/usr/local/lib/node_modules/npm/node_modules/which/which.js:63:19)
gyp ERR! stack at E (/usr/local/lib/node_modules/npm/node_modules/which/which.js:72:29)
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/which/which.js:81:16
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/which/node_modules/isexe/index.js:44:5
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/which/node_modules/isexe/mode.js:8:5
gyp ERR! stack at Object.oncomplete (fs.js:108:15)
gyp ERR! System Linux 3.10.102
gyp ERR! command “node” “/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/node_modules/ed25519
gyp ERR! node -v v0.10.48
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok

[email protected] install /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/node_modules/mdns
node-gyp rebuild

gyp WARN EACCES user “root” does not have permission to access the dev dir "/root/.node-gyp/0.10.48"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/node_modules/mdns/.node-gyp"
gyp ERR! build error
gyp ERR! stack Error: not found: make
gyp ERR! stack at F (/usr/local/lib/node_modules/npm/node_modules/which/which.js:63:19)
gyp ERR! stack at E (/usr/local/lib/node_modules/npm/node_modules/which/which.js:72:29)
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/which/which.js:81:16
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/which/node_modules/isexe/index.js:44:5
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/which/node_modules/isexe/mode.js:8:5
gyp ERR! stack at Object.oncomplete (fs.js:108:15)
gyp ERR! System Linux 3.10.102
gyp ERR! command “node” “/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/node_modules/mdns
gyp ERR! node -v v0.10.48
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
npm ERR! Linux 3.10.102
npm ERR! argv “/usr/local/bin/node” “/usr/local/bin/npm” “install” “-g” "homebridge"
npm ERR! node v0.10.48
npm ERR! npm v2.15.1
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script ‘node-gyp rebuild’.
npm ERR! This is most likely a problem with the curve25519-n2 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs curve25519-n2
npm ERR! Or if that isn’t available, you can get their info via:
npm ERR!
npm ERR! npm owner ls curve25519-n2
npm ERR! There is likely additional logging output above.

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

Je ne vois pas comment faire. Merci pour ton aide

1 « J'aime »

Tu as réussi a le faire fonctionné toi?

Merci de ta réponse très complète. N’hésite pas à formater tout ce qui est code ou message d’erreur en l’encadrant avec trois accents graves ``` pour une meilleur lisibilité :wink:

Il y a une 1ere erreur. Pour devenir root, il faut taper ceci :

sudo su <Touche Entrée>

Puis le mot de passe du compte admin (“en aveugle”, il n’y a pas d’étoile qui indique qu’on tape quelque chose).

Après tu peux taper des commandes en tant que root.
Il faut faire cette manipulation une seule fois en début de chaque connexion (je peux t’expliquer comment te connecter directement en root sur ton NAS si tu le souhaites pour ne plus avoir cette manipulation à chaque fois à faire).

Ensuite, comment as-tu installé node sur ton NAS et comment utilises-tu docker ? (commandes pour utiliser docker ?)

La ligne importante dans l’erreur affichée est la suivante :

gyp ERR! stack Error: not found: make

npm (l’utilitaire pour installer des programmes et bibliothèques de programmation en node) souahite appeler la commande make qui est absente de ton Synology. Il faut donc l’installer dans docker (je ne pourrais pas t’aider pour ça) ou en dehors directement sur l’OS du NAS (selon la réponse à ma question précédente). Si tu prends la deuxième option, je te conseille d’utiliser Entware-ng qui est un gestionnaire de paquets à partir duquel tu pourras installer make.

Non, je connais Synology et Unix en général mais pas du tout ce qui est domotique.

Olala tu m’affole, Je ne connais pas tous sa. Dans un premier temps oui, j’ai essayer avec ta première méthode pour rentrer en root, mais voici la réponse :
admin@Synology:/$ sudo su
Password:
ash-4.3# npm install -g homebridge
npm WARN engine [email protected]: wanted: {“node”:">=4.3.2"} (current: {“node”:“0.10.48”,“npm”:“2.15.1”})
npm WARN engine [email protected]: wanted: {“node”:">=4.3.2"} (current: {“node”:“0.10.48”,“npm”:“2.15.1”})
|

[email protected] install /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/node_modules/curve25519-n2
node-gyp rebuild

gyp WARN EACCES user “root” does not have permission to access the dev dir "/root/.node-gyp/0.10.48"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/node_modules/curve25519-n2/.node-gyp"
gyp ERR! build error
gyp ERR! stack Error: not found: make
gyp ERR! stack at F (/usr/local/lib/node_modules/npm/node_modules/which/which.js:63:19)
gyp ERR! stack at E (/usr/local/lib/node_modules/npm/node_modules/which/which.js:72:29)
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/which/which.js:81:16
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/which/node_modules/isexe/index.js:44:5
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/which/node_modules/isexe/mode.js:8:5
gyp ERR! stack at Object.oncomplete (fs.js:108:15)
gyp ERR! System Linux 3.10.102
gyp ERR! command “node” “/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/node_modules/curve25519-n2
gyp ERR! node -v v0.10.48
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok

[email protected] install /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/node_modules/ed25519
node-gyp rebuild

gyp WARN EACCES user “root” does not have permission to access the dev dir "/root/.node-gyp/0.10.48"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/node_modules/ed25519/.node-gyp"
gyp ERR! build error
gyp ERR! stack Error: not found: make
gyp ERR! stack at F (/usr/local/lib/node_modules/npm/node_modules/which/which.js:63:19)
gyp ERR! stack at E (/usr/local/lib/node_modules/npm/node_modules/which/which.js:72:29)
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/which/which.js:81:16
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/which/node_modules/isexe/index.js:44:5
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/which/node_modules/isexe/mode.js:8:5
gyp ERR! stack at Object.oncomplete (fs.js:108:15)
gyp ERR! System Linux 3.10.102
gyp ERR! command “node” “/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/node_modules/ed25519
gyp ERR! node -v v0.10.48
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok

[email protected] install /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/node_modules/mdns
node-gyp rebuild

gyp WARN EACCES user “root” does not have permission to access the dev dir "/root/.node-gyp/0.10.48"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/node_modules/mdns/.node-gyp"
gyp ERR! build error
gyp ERR! stack Error: not found: make
gyp ERR! stack at F (/usr/local/lib/node_modules/npm/node_modules/which/which.js:63:19)
gyp ERR! stack at E (/usr/local/lib/node_modules/npm/node_modules/which/which.js:72:29)
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/which/which.js:81:16
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/which/node_modules/isexe/index.js:44:5
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/which/node_modules/isexe/mode.js:8:5
gyp ERR! stack at Object.oncomplete (fs.js:108:15)
gyp ERR! System Linux 3.10.102
gyp ERR! command “node” “/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/node_modules/mdns
gyp ERR! node -v v0.10.48
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
npm ERR! Linux 3.10.102
npm ERR! argv “/usr/local/bin/node” “/usr/local/bin/npm” “install” “-g” "homebridge"
npm ERR! node v0.10.48
npm ERR! npm v2.15.1
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script ‘node-gyp rebuild’.
npm ERR! This is most likely a problem with the curve25519-n2 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs curve25519-n2
npm ERR! Or if that isn’t available, you can get their info via:
npm ERR!
npm ERR! npm owner ls curve25519-n2
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /npm-debug.log
ash-4.3#

Par rapport au message d’erreur qui en ressort, sa me paraît être ( dis moi si je me trompe ) un problème de permissions.
J’utilise docker avec l’interface de l’application, j’ai été cherche une image dans docker, l’ai installé, lancé et je souhaite qu’elle lise mon fichier jSon pour pouvoir rendre possible mon produit nest avec homekit.
J’espere que je m’explique bien, je suis désolé je n’ai pas trop connaissance la dessus.
Merci encore de m’aider, mais c’est vrai que de communiqué comme cela c’est difficile aussi pour se faire comprendre.

Tu parle d’installer node, dois-je le faire? et surtout comment? :wink:
Merci encore beaucoup pour ton aide.

J’ai installé Node js 4.0 avec l’appstore de Synology mais rien ne change. Je comprend pas non plus quand tu me dis le " make ".
je comprend pas que je n’y arrive pas, je pense avoir tous fait, je pense que j’ai un problème d’autorisations, puisque j’ai réussi avec le mac. Enfin j’attend ta réponse, sa va surement m’aider

j’ai créer un fichier package.json a l’intérieur j’ai mis ceci:
{ " Scripts " : {
" Install " : " npm install -g homebridge-synology "
}
}

Mais rien a faire il n’a pas l’air d’installé

nouvelle épisode j’arrive a faire fonctionne le fichier .json sur le mac mais par sur synology. Quand je lance le conteneur sur docker il s’arrête aussitôt. Je ne comprend pas ou est mon erreur

Tu as déjà installé node, sinon tu ne pourrais pas faire npm install -g homebridge.

L’erreur est toujours la même, tu n’as pas la commande make sur ton NAS (tu l’as sur ton Mac, c’est pour ça que ça fonctionne). Formate les erreurs que tu as entre triples accents graves s’il te plaît. Tu peux modifier tes messages précédents en cliquant sur le crayon plutôt que de faire trois messages à la suite (très désagréable).

L’erreur de permission que tu relèves n’est pas bloquante puisque gyp essaie de résintaller en utilisant le répertoire /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/node_modules/curve25519-n2/.node-gyp :

gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/node_modules/curve25519-n2/.node-gyp"

Je pense que tu n’utilises pas docker sur ton NAS à vrai dire (à part pour le package.json que tu as créé ? Je suis obligé de deviner ce que tu fais, poste les commandes que tu fais), donc je te propose d’installer Entware-ng qui te permettra d’installer make qui te permettra d’installer homebridge-nest.

Rendez-vous sur la page de wiki dédiée aux NAS Synology, voici les commandes que tu vas taper en tant que root sur ton NAS via ssh :

mkdir -p /volume1/@entware-ng/opt
mount -o bind /volume1/@entware-ng/opt /opt

Tu vas vérifier l’architecture du processeur de ton NAS avec la commande suivante :

uname -m

Qui retournera au choix armv7l ou x86-64 (si ton NAS n’est pas trop vieux). En fonction de cette réponse, copie-colle (clic-droit avec Putty pour coller) l’une de ces commandes.

wget -O - http://pkg.entware.net/binaries/armv7/installer/entware_install.sh | /bin/sh
wget -O - http://pkg.entware.net/binaries/x86-64/installer/entware_install.sh | /bin/sh

Ensuite :

echo -e 'mkdir -p /opt\nmount -o bind /volume1/@entware-ng/opt /opt\n/opt/etc/init.d/rc.unslung start' >> /etc/rc.local
echo '. /opt/etc/profile' >> /etc/profile
. /opt/etc/profile

Tu peux désormais vérifier qu’opkg est bien installé :

opkg

Si t’es retournée l’aide d’opkg sur ses différentes options, c’est bon.

Installons la commande make avec notre opkg tout frais :

opkg install make

Là tu peux à nouveau réessayer d’installer homebridge avec

npm install -g homebridge