tommasomarchionni / homebridge-openHAB

Homebridge plugin for openHAB
Apache License 2.0
49 stars 18 forks source link

Loading 0 accessories... #7

Closed Sp1rit closed 8 years ago

Sp1rit commented 8 years ago

It seems that this plugin doesn't load my accessories.

This is the console output:

Loaded plugin: homebridge-openhab
Registering platform 'homebridge-openhab.openHAB'

---
Loaded config.json with 0 accessories and 1 platforms.

---
Loading 1 platforms...
[openHAB] Initializing openHAB platform...
[openHAB] Platform - Fetching OpenHAB devices.
[openHAB] Platform - Connecting to http://127.0.0.1:8080/rest/sitemaps/homekit?type=json
Loading 0 accessories...
Scan this code with your HomeKit App on your iOS device to pair with Homebridge:

    ┌────────────┐
    │ 031-45-154 │
    └────────────┘

Homebridge is running on port 51826.

This is my rest sitemap output:

{
   "name":"homekit",
   "label":"HomeKit",
   "link":"http://192.168.178.38:8080/rest/sitemaps/homekit",
   "homepage":{
      "id":"homekit",
      "title":"HomeKit",
      "link":"http://192.168.178.38:8080/rest/sitemaps/homekit/homekit",
      "leaf":"false",
      "widget":{
         "widgetId":"homekit_0",
         "type":"Switch",
         "label":"Licht",
         "icon":"switch-off",
         "item":{
            "type":"SwitchItem",
            "name":"Wohnzimmer_Lichtschalter",
            "state":"OFF",
            "link":"http://192.168.178.38:8080/rest/items/Wohnzimmer_Lichtschalter"
         }
      }
   }
}

And this is my config.json:

{
  "bridge": {
    "name": "Homebridge",
    "username": "CC:22:3D:E3:CE:30",
    "port": 51826,
    "pin": "031-45-154"
  },
  "accessories": [],
  "platforms": [
  {
    "platform": "openHAB",
    "name": "openHAB",
    "host": "127.0.0.1",
    "port": "8080",
    "sitemap": "homekit",
    "useLabelForName": true
  }]
}

As far as i can see it should work just fine? But there are no devices shown in the homekit apps I use.

tommasomarchionni commented 8 years ago

Try to change your host parameter in your config.json to 192.168.178.38

Sp1rit commented 8 years ago

Thx for your answer. I already tried that though. No change. I also don't have any security on in openHAB.

tommasomarchionni commented 8 years ago

I fix this issue in 0.1.28. Let me know if it works.