tommasomarchionni / homebridge-openHAB

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

Openhab loading 0 accessory #40

Open picotto86 opened 7 years ago

picotto86 commented 7 years ago

Hello everyone, It is impossible for me load the items from openhab2 platform.

this is my config.json ` "bridge": { "name": "Homebridge", "username": "CC:22:3D:E3:CE:30", "port": 51826, "pin": "031-45-154" },

    "description": "This is an example configuration file",

    "accessories": [],

    "platforms": [
{
    "platform": "openHAB",
    "name": "openHAB",
    "host": "xxxxxx",
    "port": "8080",
    "sitemap": "casa",
    "useLabelForName": true
}

] ` and this is the response when I launch homebridge:

`[2016-12-11 17:07:06] Loaded plugin: homebridge-http [2016-12-11 17:07:06] Registering accessory 'homebridge-http.Http' [2016-12-11 17:07:06] --- [2016-12-11 17:07:07] Loaded plugin: homebridge-openhab [2016-12-11 17:07:07] Registering platform 'homebridge-openhab.openHAB' [2016-12-11 17:07:07] --- [2016-12-11 17:07:07] Loaded config.json with 0 accessories and 1 platforms. [2016-12-11 17:07:07] --- [2016-12-11 17:07:07] Loading 1 platforms... [2016-12-11 17:07:07] [openHAB] Initializing openHAB platform... [2016-12-11 17:07:07] [openHAB] Platform - Fetching OpenHAB devices. [2016-12-11 17:07:07] [openHAB] Platform - Connecting to http://xxx:8080/rest/sitemaps/casa?type=json [2016-12-11 17:07:07] Loading 0 accessories... Scan this code with your HomeKit App on your iOS device to pair with Homebridge:

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

[2016-12-11 17:07:07] Homebridge is running on port 51826.

` Anyone could help me.I'm to become crazy for this problem.

jj74 commented 6 years ago

old thread, but same here. I`m going crazy too :-(

gijoecool commented 6 years ago

What is in your "casa" sitemap?

ssvenn commented 6 years ago

Pretty sure the existing plugin isn't compatible with OH2, for what it's worth the built-in homekit support in OH2 seems to be stable for me now in the latest development snapshots (it used to always lock up after a couple of days)

You could also look into using the mqtt binding and homebridge-mqtt as a more flexible alternative, but it's a bit complicated. OH still allows you to link multiple bindings to the same item and I think it will try to keep them in sync. https://community.openhab.org/t/map-multiple-bindings-to-one-item/5564/2

I think the author of this plugin has moved on to other projects, the latest commit will soon be a year old.

jj74 commented 6 years ago

sitemap is working fine within openhab. Looks like: "sitemap standard label="Mein Haus" { Frame label="Kalender" { Text item=CurrentDate }

   Frame label="Wohnzimmer"

   {

        Switch item=TV
        Switch item=Apple_TV
        Switch item=Stehlampe
        Switch item=Leselampe
        Switch item=Bar
        Switch item=Gaeste_WLAN

   }

   Frame label="Küche"

   {

       Switch item=DEMOSW1

   }
gijoecool commented 6 years ago

@ssvenn is right. I didn't see that this was for OH2.

jj74 commented 6 years ago

Maybe its an issue of less knowledge?! Im just switched over from pilight to openhab, especially in terms of mqtt. Till now openhab itself works fine. intead of Homebridge. I can connect to openhab Homebridge, but there are no Items visible. Also i`m a little bit confused, because there are two folders, homebridge and homebridge-openhab, both with config.json. Within pilight, i only had to configure one config file. Sorry for stupid questions

gijoecool commented 6 years ago

@jj74 are you on openHAB version 1 or 2?

jj74 commented 6 years ago

MQTT is also working fine in openhab. Im using Sonoff S20 with Tasmota firmware. Oh, sorry im using openhab2!

ssvenn commented 6 years ago

Give the built-in homekit binding a go then, the new documentation has improved a great deal since OH2 was initially released. Start here: http://docs.openhab.org/addons/io/homekit/readme.html

The only big downside with the new homekit binding is that it currently only supports lights, thermostats and appliances. No roller shutters, locks or garage doors. If you have any of those you could probably let homebridge-mqtt handle them :)