Open Emptyless opened 8 years ago
Since you're not specifying a sitemap, have you set up a site map named "homekit.sitemap"?
yes in the same directory as the default.sitemap. I did try to add it by appending "--sitemap" "homekit" but that yielded the same results
Can you open http://10.0.1.15:8080/rest/sitemaps/homekit in a web browser?
Yes i can, I was also experimenting with Homebridge and there the sitemap works. No items are in groups or frames. Everything is added like the description on this repo's README.md
I'm not sure I remember right, but I don't think I could use # for comments in the sitemap if you have copied from the example.
I will test if it starts without the #'s, will post results
Did the comments have any effect? Please post your sitemap if the problem still exists.
Your problem is most likely having set up a username and password. Try to use "user:password@10.0.1.15:8080". Otherwise, sitemap download will fail, because of basic auth.
I'm experiencing the same error:
sudo npm start -- --name "myOpenHAB-Bridge" --server 192.168.1.101:8080
> openHAB-HomeKit-Bridge@1.3.3 start /opt/openhab/OpenHAB-HomeKit-Bridge
> node index.js start "--name" "myOpenHAB-Bridge" "--server" "192.168.1.101:8080"
*** 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>
Starting the bridge myOpenHAB-Bridge ...
/opt/openhab/OpenHAB-HomeKit-Bridge/lib/SitemapParser.js:44
var widgets = [].concat(sitemap.homepage.widget);
^
TypeError: Cannot read property 'homepage' of undefined
at SitemapParser.parseSitemap (/opt/openhab/OpenHAB-HomeKit-Bridge/lib/SitemapParser.js:25:29)
at /opt/openhab/OpenHAB-HomeKit-Bridge/lib/openHABBridge.js:59:39
at Request._callback (/opt/openhab/OpenHAB-HomeKit-Bridge/lib/RestClient.js:28:11)
at Request.self.callback (/opt/openhab/OpenHAB-HomeKit-Bridge/node_modules/request/request.js:186:22)
at emitTwo (events.js:106:13)
at Request.emit (events.js:191:7)
at Request.<anonymous> (/opt/openhab/OpenHAB-HomeKit-Bridge/node_modules/request/request.js:1081:10)
at emitOne (events.js:96:13)
at Request.emit (events.js:188:7)
at IncomingMessage.<anonymous> (/opt/openhab/OpenHAB-HomeKit-Bridge/node_modules/request/request.js:1001:12)
npm ERR! Linux 4.4.0-57-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "start" "--" "--name" "myOpenHAB-Bridge" "--server" "192.168.1.101:8080"
npm ERR! node v7.4.0
npm ERR! npm v4.1.1
npm ERR! code ELIFECYCLE
npm ERR! openHAB-HomeKit-Bridge@1.3.3 start: `node index.js start "--name" "myOpenHAB-Bridge" "--server" "192.168.1.101:8080"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the openHAB-HomeKit-Bridge@1.3.3 start script 'node index.js start "--name" "myOpenHAB-Bridge" "--server" "192.168.1.101:8080"'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the openHAB-HomeKit-Bridge package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node index.js start "--name" "myOpenHAB-Bridge" "--server" "192.168.1.101:8080"
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs openHAB-HomeKit-Bridge
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls openHAB-HomeKit-Bridge
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /opt/openhab/OpenHAB-HomeKit-Bridge/npm-debug.log
I've set a default.sitemap as below:
sitemap homekit label="NekkoYi HomeKit" {
Switch item=bal label="陽台"
Switch item=bath label="浴室"
Switch item=bed label="主臥"
Switch item=dine label="餐桌"
Switch item=ent label="玄關"
Switch item=guest label="和室"
Switch item=kit label="廚房"
Switch item=storage label="儲藏室"
Switch item=study label="書房"
Switch item=liv label="客廳"
}
Also I tried the method @niwakame suggested, didn't male any difference.
And I cannot open/rest/sitemaps/default , it gave me this:
HTTP ERROR 500
Problem accessing /rest/sitemaps/homekit. Reason:
javax.servlet.ServletException: Throwable
...
...
...
but just http://192.168.1.101:8080/ works fine and redirects to http://192.168.1.101:8080/openhab.app
I have another bridge running just fine with the same config, not sure why this happened. Any help will be greatly appreciated.
It turned out to be caused by java. After manually killed the java and openhab process then restart openhab, the REST API became reachable, and the bridge worked fine! Took me an hour to figure out though... silly me :joy:
I am trying to start the Node server from my Macbook but getting this error: