husky-koglhof / ioBroker.homekit

11 stars 10 forks source link

Mac OS X Install #4

Open TomBoehm opened 8 years ago

TomBoehm commented 8 years ago

The preinstall script fails because there exists no binary apt-get in Mac OS X "preinstall": "sudo apt-get install git-core libnss-mdns libavahi-compat-libdnssd-dev -y"

husky-koglhof commented 8 years ago

Hi Tom, I think you are my Apple Teacher...

I've uploaded a new Version of ioBroker.homekit.

TomBoehm commented 8 years ago

Hi husky-koglhof

I tried (on Mac OS X 10.11.1)

$ iobroker add homekit host.coalmine.lan install adapter homekit npm install --production --prefix "/Users/localadmin/Documents/iobroker/node_modules/iobroker.homekit" (System call) npm WARN package.json ioBroker.homekit@0.0.4 license should be a valid SPDX license expression Password: sudo: apt-get: command not found

npm ERR! Darwin 15.0.0 npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "--production" "--prefix" "/Users/localadmin/Documents/iobroker/node_modules/iobroker.homekit" npm ERR! node v4.1.2 npm ERR! npm v2.14.4 npm ERR! code ELIFECYCLE npm ERR! ioBroker.homekit@0.0.4 preinstall: sudo apt-get install git-core libnss-mdns libavahi-compat-libdnssd-dev -y npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the ioBroker.homekit@0.0.4 preinstall script 'sudo apt-get install git-core libnss-mdns libavahi-compat-libdnssd-dev -y'. npm ERR! This is most likely a problem with the ioBroker.homekit package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! sudo apt-get install git-core libnss-mdns libavahi-compat-libdnssd-dev -y npm ERR! You can get their info via: npm ERR! npm owner ls ioBroker.homekit npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /Users/localadmin/Documents/iobroker/npm-debug.log Cannot install iobroker.homekit: 1 coalmine:iobroker localadmin$

This is the mentioned file: /Users/localadmin/Documents/iobroker/npm-debug.log 0 info it worked if it ends with ok 1 verbose cli [ '/usr/local/bin/node', 1 verbose cli '/usr/local/bin/npm', 1 verbose cli 'install', 1 verbose cli '--production', 1 verbose cli '--prefix', 1 verbose cli '/Users/localadmin/Documents/iobroker/node_modules/iobroker.homekit' ] 2 info using npm@2.14.4 3 info using node@v4.1.2 4 verbose readDependencies loading dependencies from /Users/localadmin/Documents/iobroker/node_modules/iobroker.homekit/package.json 5 warn package.json ioBroker.homekit@0.0.4 license should be a valid SPDX license expression 6 verbose install where, deps [ '/Users/localadmin/Documents/iobroker/node_modules/iobroker.homekit', 6 verbose install [ 'hap-nodejs', 'yalm', 'yargs' ] ] 7 verbose install where, peers [ '/Users/localadmin/Documents/iobroker/node_modules/iobroker.homekit', 7 verbose install [] ] 8 verbose installManyTop reading for lifecycle /Users/localadmin/Documents/iobroker/node_modules/iobroker.homekit/package.json 9 info preinstall ioBroker.homekit@0.0.4 10 verbose unsafe-perm in lifecycle true 11 info ioBroker.homekit@0.0.4 Failed to exec preinstall script 12 verbose stack Error: ioBroker.homekit@0.0.4 preinstall: sudo apt-get install git-core libnss-mdns libavahi-compat-libdnssd-dev -y 12 verbose stack Exit status 1 12 verbose stack at EventEmitter. (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:214:16) 12 verbose stack at emitTwo (events.js:87:13) 12 verbose stack at EventEmitter.emit (events.js:172:7) 12 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:24:14) 12 verbose stack at emitTwo (events.js:87:13) 12 verbose stack at ChildProcess.emit (events.js:172:7) 12 verbose stack at maybeClose (internal/child_process.js:818:16) 12 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5) 13 verbose pkgid ioBroker.homekit@0.0.4 14 verbose cwd /Users/localadmin/Documents/iobroker 15 error Darwin 15.0.0 16 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "--production" "--prefix" "/Users/localadmin/Documents/iobroker/node_modules/iobroker.homekit" 17 error node v4.1.2 18 error npm v2.14.4 19 error code ELIFECYCLE 20 error ioBroker.homekit@0.0.4 preinstall: sudo apt-get install git-core libnss-mdns libavahi-compat-libdnssd-dev -y 20 error Exit status 1 21 error Failed at the ioBroker.homekit@0.0.4 preinstall script 'sudo apt-get install git-core libnss-mdns libavahi-compat-libdnssd-dev -y'. 21 error This is most likely a problem with the ioBroker.homekit package, 21 error not with npm itself. 21 error Tell the author that this fails on your system: 21 error sudo apt-get install git-core libnss-mdns libavahi-compat-libdnssd-dev -y 21 error You can get their info via: 21 error npm owner ls ioBroker.homekit 21 error There is likely additional logging output above. 22 verbose exit [ 1, true ]

I do not know if all the things, you try to preinstall are required im Mac OS X Example „libavahi-compat-libdnssd-dev“ => That is something about Zerovonf / Bonjour Mac OS X has already implemented Bonjour

greetings Tom

husky-koglhof commented 8 years ago

Hi Tom, sorry, the main.js is implemented and tested on Mac OS X El Capitan. But the module is currently only under Debian/Raspian available.

Currently i'm testing the Installation Procedure. If it's working correct, i will implement a generic installer for all Operating Systems.

greetings Christian

TomBoehm commented 8 years ago

Thx for the feedback - I removed the preinstall script line from package.son => and it installs without problems

husky-koglhof commented 8 years ago

Hi Tom,

that's cool. This Adapter will only work with the Devices described in Readme.md. I've tested this Adapter with the Elgato Eve App. You have to give all needed Objects a correct Name within ioBroker. e.g. HM-CC-TC Thermostat (hm-rpc.0.JEQ0225305.1.TEMPERATURE) must have a Name (e.g. Living Room) e.g. HM-LC-Sw1-FM Switch (hm-rpc.0.KEQ0254722.1) must have a Name (e.g. Light)

greetings Christian

TomBoehm commented 8 years ago

Did not get that far: homekit.0 Error: EACCES: permission denied, mkdir '/persist' at Error (native) at Object.fs.mkdirSync (fs.js:799:18) at Function.sync (/Users/localadmin/Documents/iobroker/node_modules/iobroker.home homekit.0 error uncaught exception: EACCES: permission denied, mkdir '/persist'

Did chmod -R 777 /Users/localadmin/Documents/iobroker/node_modules/iobroker.home - problem remains.

husky-koglhof commented 8 years ago

Hi, i've uploaded a new Version, cause of Troubles with HAP-NodeJS.

Can you try it?

TomBoehm commented 8 years ago

A big step forward! After creating the folder "persist" via

sudo mkdir '/persist' 

the adapter starts and Elgato Eve can access my devices. Maybe we could move the folder from

/persist 

to

/Path_to_iobroker/iobroker-data/persist 

to avoid sudo

If I try to switch, I get an error

error   hm-rpc.0 binrpc -> setValue: no dpType for hm-rpc.0.EEQ0023884.1undefined!

I have tested with devices of type "HM-LC-Sw1-Pl" and "HM-LC-Sw4-PCB" Is there a way for me to add these device types ?

husky-koglhof commented 8 years ago

Hi,

for /persist, I've to analyse the hap-nodejs code. You can add a new Type with the following Procedure (currently it's not implemented within admin site)

Open the Object "system.adapter.homekit.0" within ioBroker and change the Attribute "Accessories" to the following:

homekit

husky-koglhof commented 8 years ago

Hi Tom,

there's a new version 0.0.5 uploaded. Now you can implement new Devices from iobroker admin Site.

greetings Christian

husky-koglhof commented 8 years ago

Can you give me a short Feedback if you've successfully tested new Devices?

Then i will implement it within io-package.json as Default.