Git Product home page Git Product logo

homebridge-openhab's People

Contributors

llamahunter avatar redhell avatar remogloor avatar stephan-01010011 avatar tannebil avatar tommasomarchionni avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

homebridge-openhab's Issues

periodic polling for changes in sitemap/items?

i find myself restarting homebridge whenever i update my openhab config, because it doesn't seem to pickup changes automatically. is there some way to make it periodically refresh from OH?

Is there no support for temperature items?

First of all, great job!

Second, if I add a temperature item to my sitemap I get

Platform - The widget 'Bedroom Temperature' of type NumberItem is an item not handled

Automatic Connection to OpenHAB after Start

Currently when Homebridge-openhab starts it tries to connect to Openhab server only once. If Openhab is not running yet (typically at start), homebridge stops and service needs to be restarted manually. Other workaround is to start homebridge from openhab script, which is also not good.
It would be good if Homebridge-openhab would try to connect to openhab continuously and automatically without requirement for user intervention.

Module isnt starting

Every time i try to start homebridge I get following error:

2016-10-13 17:05:26] Loaded plugin: homebridge-openhab
/usr/lib/node_modules/homebridge-openhab/index.js:59
    Utility.addSupportTo(AbstractItem, Accessory);
                                       ^

ReferenceError:

 Accessory is not defined
    at Plugin.module.exports [as initializer] (/usr/lib/node_modules/homebridge-openhab/index.js:59:40)
    at Server.<anonymous> (/usr/lib/node_modules/homebridge/lib/server.js:147:14)
    at Array.forEach (native)
    at Server._loadPlugins (/usr/lib/node_modules/homebridge/lib/server.js:125:22)
    at new Server (/usr/lib/node_modules/homebridge/lib/server.js:48:24)
    at module.exports (/usr/lib/node_modules/homebridge/lib/cli.js:26:16)
    at Object.<anonymous> (/usr/lib/node_modules/homebridge/bin/homebridge:17:22)
    at Module._compile (module.js:556:32)
    at Object.Module._extensions..js (module.js:565:10)
    at Module.load (module.js:473:32)


This is my Config:
"platforms": [
       "platform": "openHAB",
        "name": "openHAB",
        "host": "127.0.0.1",
        "port": "8080",
        "sitemap": "default",
        "useLabelForName": true
  ],

Any ideas?

TermostatItem.js:4 SyntaxError: Use of const in strict mode.

after a fresh install of homebridge and homebridge-openhab via npm, i'm getting the follow error. the fact that an issue doesn't already exist for this must mean others don't get it? would love some guidance to figure out what it is about my environment that's causing this, and i'd be happy to contribute a fix if there's some way to make the plugin more robust in this case

/usr/local/lib/node_modules/homebridge-openhab/items/ThermostatItem.js:4
const EventEmitter = require("events");
^^^^^
[Sun Apr 10 2016 18:40:59 GMT-0700 (PDT)] ====================
[Sun Apr 10 2016 18:40:59 GMT-0700 (PDT)] ERROR LOADING PLUGIN homebridge-openhab:
[Sun Apr 10 2016 18:40:59 GMT-0700 (PDT)] SyntaxError: Use of const in strict mode.
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/usr/local/lib/node_modules/homebridge-openhab/libs/ItemFactory.js:15:26)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
[Sun Apr 10 2016 18:40:59 GMT-0700 (PDT)] ====================
[Sun Apr 10 2016 18:40:59 GMT-0700 (PDT)] No plugins found. See the README for information on installing plugins.

a quick attempt at changing the 'const' to 'var' allows the plugin to load, but then it immediately crashes like so:

[Sun Apr 10 2016 18:49:10 GMT-0700 (PDT)] Homebridge is running on port 51826.

events.js:72
throw er; // Unhandled 'error' event
^
Error: listen EADDRINUSE
at errnoException (net.js:901:11)
at Server._listen2 (net.js:1039:14)
at listen (net.js:1061:10)
at Server.listen (net.js:1135:5)
at EventedHTTPServer.listen (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/eventedhttp.js:58:19)
at HAPServer.listen (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:155:20)
at Bridge.Accessory.publish (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:479:16)
at Server._publish (/usr/local/lib/node_modules/homebridge/lib/server.js:92:16)
at Server.run (/usr/local/lib/node_modules/homebridge/lib/server.js:82:10)
at module.exports (/usr/local/lib/node_modules/homebridge/lib/cli.js:40:10)

Setpoint Item Type

There is a temperature Item typ but does a Setpoint Temperature Item exists?

Devices do not update unless I open Home app

When I control things on the Homekit side, everything is fine.
But when something gets controlled on the OpenHAB side (rules, automation) it won't be updated on Home app unless I open it on the phone. That's a problem cause I have, for example, openhab automations that triggers virtual switches to change Homekit scenes.

Those will not trigger unless I open the app. Anyone can help on this?
I'm going crazy with the native OpenHAB HomeKit solution that works so poorly. Would love to switch to Homebridge, but this refresh bug is a non-starter. :(

itemLabel not showing up in homekit apps

Having a sitemap with multiple light switches it is likely that some of them are named the same (e.g. "ceiling light"). So using the label is name is not working as it would not be unique and I want to use itemLabel in the customAttributes.

Example:
Having a item in openHab named "EG_KUE_LichtDecke"
I switched off the label usage ("useLabelForName": false) and added custom attributes for the item, e.g.:

"customAttrs": [ {
"itemName":"EG_KUE_LichtDecke",
"itemLabel":"Ceiling Light",
"itemType":"LightbulbItem",
"itemManufacturer": "MDT",
"itemModel": "KNX Aktor",
"itemSerialNumber":"1.1.1.A"
} ]

In the homekit apps I see this item labeled "EG_KUE_LichtDecke" instead of "Ceiling light" as I´d expect. The name and everything else is considered.
So the questions are:
If I define an item in the items with the name XYZ, add it to the sitemap, switch off using labelsfornames and add custom attributes where itemName=XYZ and itemLabel=ABC

  • Is the link between customAttribs and the openHAB item done using itemName XYZ ? (Thinks so)
  • Where is this itemLabel ABC used ?
  • Is this the lack of the Homekit App (tried "MyTouchHome" as well as "Eve" where "Eve" is even showing less infomation on the item) or of the plugin (label not geting transfered) ?

A bit more documentation details on how to name and link items to custom attributes would be great, currently it is a bit of a lucky guessing.

GarageDoorOpenerItem.js

The latest version would not start until I renamed item/GarageDoorOpener.js to item/GarageDoorOpenerItem.js

OpenHAB with username/password

My OpenHAB is secured with a Username/Password, because I access it remotely via the Internet. Homebridge is unable to access my OpenHAB and I can't see a location where I can enter username/password.

Can this be added?

Fahrenheit double calculated

I have an ecobee3 thermostat using Fahrenheit. It displays the correct temperatures in openHAB, but in HomeKit they are calculated as if the source numbers are celsius (i.e. 67.9 °F is displayed as 157.5 °F).

TypeError: this.uniqueIds[this.itemList[key].itemUniqueAggregationId][("set" + this.itemList[key].itemSubType)] is not a function

with all due respect but the code looks spaghetti and fails accordingly:

Feb 19 01:25:50 DietPi node[19060]: /opt/node/lib/node_modules/homebridge-openhab/libs/ItemFactory.js:68
Feb 19 01:25:50 DietPi node[19060]: this.uniqueIds[this.itemList[key].itemUniqueAggregationId]['set'+this.itemList[key].itemSubType](this.itemList[key]);
Feb 19 01:25:50 DietPi node[19060]: ^
Feb 19 01:25:50 DietPi node[19060]: TypeError: this.uniqueIds[this.itemList[key].itemUniqueAggregationId][("set" + this.itemList[key].itemSubType)] is not a function
Feb 19 01:25:50 DietPi node[19060]: at exports.Factory.parseSitemap (/opt/node/lib/node_modules/homebridge-openhab/libs/ItemFactory.js:68:113)
Feb 19 01:25:50 DietPi node[19060]: at Request._callback (/opt/node/lib/node_modules/homebridge-openhab/index.js:106:34)
Feb 19 01:25:50 DietPi node[19060]: at Request.self.callback (/opt/node/lib/node_modules/homebridge-openhab/node_modules/request/request.js:199:22)
Feb 19 01:25:50 DietPi node[19060]: at emitTwo (events.js:87:13)
Feb 19 01:25:50 DietPi node[19060]: at Request.emit (events.js:172:7)
Feb 19 01:25:50 DietPi node[19060]: at Request.<anonymous> (/opt/node/lib/node_modules/homebridge-openhab/node_modules/request/request.js:1036:10)
Feb 19 01:25:50 DietPi node[19060]: at emitOne (events.js:82:20)
Feb 19 01:25:50 DietPi node[19060]: at Request.emit (events.js:169:7)
Feb 19 01:25:50 DietPi node[19060]: at IncomingMessage.<anonymous> (/opt/node/lib/node_modules/homebridge-openhab/node_modules/request/request.js:963:12)
Feb 19 01:25:50 DietPi node[19060]: at emitNone (events.js:72:20)

Config not loading

Hi guys. I new to all of this. Please help. Cant seem to get config.json running

sudo homebridge
*** WARNING *** The program 'node' 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=node
*** WARNING *** The program 'node' 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=node&f=DNSServiceRegister
[3/6/2016, 10:16:23 AM] Loaded plugin: homebridge-openhab
[3/6/2016, 10:16:23 AM] Registering platform 'homebridge-openhab.openHAB'
[3/6/2016, 10:16:23 AM] ---
Scan this code with your HomeKit App on your iOS device to pair with Homebridge:

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

[3/6/2016, 10:16:24 AM] Homebridge is running on port 51826.

Accessory information settings are not working

Pretty minor stuff but adding itemManufacturer, itemModel, itemSerialNumber in config.json is not doing anything. I still get Default-Manufacturer, etc. in the accessory information service.

Unhandled 'error' event

This is a very welcome addition -- thanks for your efforts.

I believe I'm close to having things working, but get this error when I start homebridge:

homebridge
*** WARNING *** The program 'node' 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=node
*** WARNING *** The program 'node' 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=node&f=DNSServiceRegister
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://user:[email protected]:8080/rest/sitemaps/homekit?type=json
Loading 0 accessories...
[ Dim1: { name: 'Dim1',
label: 'Living Room Light',
type: 'SwitchItem',
state: 'ON',
link: 'http://10.0.1.202:8080/rest/items/Dim1' },
ruleTest: { name: 'ruleTest',
label: 'Test Switch',
type: 'SwitchItem',
state: 'OFF',
link: 'http://10.0.1.202:8080/rest/items/ruleTest' },
piTest: { name: 'piTest',
label: 'Raspberry Pi',
type: 'SwitchItem',
state: 'OFF',
link: 'http://10.0.1.202:8080/rest/items/piTest' } ]
[openHAB] Platform - Accessory Found: Living Room Light
[openHAB] Platform - Accessory Found: Test Switch
[openHAB] Platform - Accessory Found: Raspberry Pi
[openHAB] Initializing platform accessory 'Living Room Light'...
[openHAB] Initializing platform accessory 'Demo Lightbulb Label'...
[openHAB] Initializing platform accessory 'Pi Light'...
Scan this code with your HomeKit App on your iOS device to pair with Homebridge:

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

Homebridge is running on port 51826.
events.js:142
throw er; // Unhandled 'error' event
^

Error: unexpected server response (401)
at ClientRequest.response (/usr/local/lib/node_modules/homebridge-openhab/node_modules/ws/lib/WebSocket.js:694:15)
at ClientRequest.g (events.js:261:16)
at emitOne (events.js:78:13)
at ClientRequest.emit (events.js:170:7)
at HTTPParser.parserOnIncomingClient as onIncoming
at HTTPParser.parserOnHeadersComplete (_http_common.js:89:23)
at Socket.socketOnData (_http_client.js:312:20)
at emitOne (events.js:78:13)
at Socket.emit (events.js:170:7)
at readableAddChunk (_stream_readable.js:147:16)

I'm not sure if this an openhab or homebridge issue. I'm running homebridge on a raspberry Pi and openhab on a second raspberry Pi.

Any suggestions would be welcome.

Thanks.

Contact Status Reversed

I'm monitoring some dry contacts my Omni using the openHAB omnilink binding. When a window is open, it shows as "contact detected" in Home and "Contact: YES" in Eve while the status shows as "open" in openHAB. Maybe it's just semantics but it seems like "contact detected" and "YES" are closer in meaning to "close" than "open". Is there a way to reverse the status display in homebridge-openHAB?

Update 1:

I checked the behavior against other contacts I have in HomeKit/homebridge and they report "contact detected/YES" when window/contact is closed.

Shutter with wrong direction

If have openHAB 1.8.1 and homebridge 0.3.4 running.

My items configuration file includes serval shutter items. On the OpenHAB web interface everything works fine. In the home app on the iPhone the direction of the shutter is invers. If i set the shutter to 0% Siri told me the shutter is closed. This is not true. If I want to close the shutter I have to set the shutter to 100% which normally means the shutter is open. So the direction is inverted.
What could be the Problem?
Thx Michael

Issue with CurrentRelativeHumidity

Homebridge crashes:

Feb 17 18:16:20 pichief homebridge[6073]: /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Service.js:71
Feb 17 18:16:20 pichief homebridge[6073]: throw new Error("Cannot add a Characteristic with the same UUID as another Characteristic in this Service: " + existing.UUID);
Feb 17 18:16:20 pichief homebridge[6073]: ^
Feb 17 18:16:20 pichief homebridge[6073]: Error: Cannot add a Characteristic with the same UUID as another Characteristic in this Service: 00000010-0000-1000-8000-0026BB765291
Feb 17 18:16:20 pichief homebridge[6073]: at Service.addCharacteristic (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Service.js:71:13)
Feb 17 18:16:20 pichief homebridge[6073]: at ThermostatItem.updateCurrentRelativeHumidity (/usr/local/lib/node_modules/homebridge-openhab/items/ThermostatItem.js:283:10)
Feb 17 18:16:20 pichief homebridge[6073]: at WebSocket. (/usr/local/lib/node_modules/homebridge-openhab/libs/WSListener.js:27:14)
Feb 17 18:16:20 pichief homebridge[6073]: at emitTwo (events.js:87:13)
Feb 17 18:16:20 pichief homebridge[6073]: at WebSocket.emit (events.js:172:7)
Feb 17 18:16:20 pichief homebridge[6073]: at Receiver.ontext (/usr/local/lib/node_modules/homebridge-openhab/node_modules/ws/lib/WebSocket.js:816:10)
Feb 17 18:16:20 pichief homebridge[6073]: at /usr/local/lib/node_modules/homebridge-openhab/node_modules/ws/lib/Receiver.js:477:18
Feb 17 18:16:20 pichief homebridge[6073]: at Receiver.applyExtensions (/usr/local/lib/node_modules/homebridge-openhab/node_modules/ws/lib/Receiver.js:364:5)
Feb 17 18:16:20 pichief homebridge[6073]: at /usr/local/lib/node_modules/homebridge-openhab/node_modules/ws/lib/Receiver.js:466:14
Feb 17 18:16:20 pichief homebridge[6073]: at Receiver.flush (/usr/local/lib/node_modules/homebridge-openhab/node_modules/ws/lib/Receiver.js:340:3)

Config is:
{
"itemName":"rweHumidityBad",
"itemLabel": "Humidity Bad",
"itemManufacturer": "RWE Effizienz",
"itemModel": "Humidity Sensor",
"itemType": "ThermostatItem",
"itemSubType":"CurrentRelativeHumidityItem",
"itemUniqueAggregationId":1,
"skipItem": false
},

Can't see item in iOS device

Hi,

i've a problem.
I think i've installed everything correctly, my iPhone is able to find a "Homebridge" device using Insteon app, but anything else. Nothing about the temperature sensor I've setup in openHab.

When I run homebridge from terminal the output said:

Loaded plugin: homebridge-openhab
Registering platform 'homebridge-openhab.openHAB
---
Scan this code...

It said nothing about any config.json or device/platform to load from.
I think I'm editing the right config.json file, but FYI the path is '/usr/lib/node_modules/homebridge-openhab/', and its content is:

"bridge": {
"name": "MyHomebridge",
"username": "CC:22:3D:E3:CE:30",
"port": 51826,
"pin": "031-45-154"
},

"description": "This is an example configuration file with one fake accessory$

"accessories": [
],

"platforms": [
{
"platform": "openHAB",
"name": "openHAB",
"host": "192.168.1.142",
"port": "8080",
"sitemap":"HomeKit_Sitemap",
"useLabelForName": true,
"customAttrs" : [
{
"itemName":"gTermostatoCamera_TemperaturaAttuale",
"itemLabel":"Termostato Camera",
"itemManufacturer":"MySelf",
"itemModel":"v1",
"itemType":"TemperatureSensorItem"
}
}
]
}

The Sitemap i've setup for the bridge contains:

sitemap HomeKit_Sitemap label="Main Menu" { Text item=gTermostatoCamera_TemperaturaAttuale }

Any idea why I'm not able to find my temperature sensor in iOS?

Openhab loading 0 accessory

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.

Loading 0 accessories...

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.

Can't recognize items

Hi,

first of all thanks for this plugin!

The plugin can't recognize items when there is only one element in a frame.
Example:
{
"widgetId": "rwe_0",
"type": "Frame",
"label": "Eingang",
"icon": "frontdoor",
"widget": {
"widgetId": "rwe_0_0",
"type": "Text",
"label": "Eingang [zu]",
"icon": "frontdoor-closed",
"item": {
"type": "ContactItem",
"name": "rweContact8d7f9f",
"state": "CLOSED",
"link": "http://192.168.2.118:8080/rest/items/rweContact8d7f9f"
}
}
},

but when i add an text element the sensor will be found

{
"id": "rwe",
"title": "Zuhause",
"link": "http://192.168.2.118:8080/rest/sitemaps/rwe/rwe",
"leaf": "false",
"widget": [{
"widgetId": "rwe_0",
"type": "Frame",
"label": "Eingang",
"icon": "frontdoor",
"widget": [{
"widgetId": "rwe_0_0",
"type": "Text",
"label": "Eingang [zu]",
"icon": "frontdoor-closed",
"item": {
"type": "ContactItem",
"name": "rweContact8d7f9f",
"state": "CLOSED",
"link": "http://192.168.2.118:8080/rest/items/rweContact8d7f9f"
}
}, {
"widgetId": "rwe_0_0_1",
"type": "Text",
"label": "Test",
"icon": "info"
}]
},

ThermostatItem current temperature

The ThermostatItem is working great, only thing is, that I cannot seem to see the current temperature inside of Elgato Eve for example (it just has a type for "Target temperature" (or what's it called in English, sorry, I have the German app version)).

Siri seems to know the temperature, but when asking her what the temperature is, she responds that the temperature is "set to ..." (with ... being the actual current temperature).

Any idea?

Openhab2 ?

item not a widget

I have only one OpenHab item in my json config file (though many more in openhab). This item is a relay switch connected to a raspberry pi that works well in OpenHab (it uses a rules to execute bash commands to turn on and off the relay). When I run Homebridge, Homebridge seems to fetch the OpenHab devices and connects to the sitemap without error, but when it loads accessories, this error appears 8 times:

   [openHAB] Platform - The widget ' ' is not an item.

Homebridge then reports it is running, and I can use the MiLight Platform and accessories, but there is nothing there for Openhab. I am not sure how to address this. Any help would be appriciated.

BTW - I will eventually try to connect to my Zigbee and Z-wave devices that are controlled by a rooted Wink Hub via Bash commands executed with OpenHab rules. Most of these items are Number items with Rules controlling Bash commands telling the Wink Hub what to do. If there is more I need to know to continue with this approach, that would also be appriciated.

Error when running homebridge

When I launch homebridge with the plugin installed i get this error:

[2017-12-18 20:13:17] Loaded plugin: homebridge-openhab
[2017-12-18 20:13:17] Registering platform 'homebridge-openhab.openHAB'
[2017-12-18 20:13:17] ---
[2017-12-18 20:13:17] Loaded config.json with 1 accessories and 1 platforms.
[2017-12-18 20:13:17] ---
[2017-12-18 20:13:17] Loading 1 platforms...
[2017-12-18 20:13:17] [openHAB] Initializing openHAB platform...
[2017-12-18 20:13:17] [openHAB] Platform - Fetching OpenHAB devices.
[2017-12-18 20:13:17] [openHAB] Platform - Connecting to http://10.0.1.32:8080/rest/sitemaps/home?type=json
[2017-12-18 20:13:18] Loading 1 accessories...
/usr/lib/node_modules/homebridge/lib/api.js:50
if (name.indexOf('.') == -1) {
^

TypeError: Cannot read property 'indexOf' of undefined
at API.accessory (/usr/lib/node_modules/homebridge/lib/api.js:50:12)
at Server._loadAccessories (/usr/lib/node_modules/homebridge/lib/server.js:264:42)
at Server.run (/usr/lib/node_modules/homebridge/lib/server.js:86:38)
at module.exports (/usr/lib/node_modules/homebridge/lib/cli.js:40:10)
at Object. (/usr/lib/node_modules/homebridge/bin/homebridge:17:22)
at Module._compile (module.js:660:30)
at Object.Module._extensions..js (module.js:671:10)
at Module.load (module.js:573:32)
at tryModuleLoad (module.js:513:12)
at Function.Module._load (module.js:505:3)

this is my config file:

{
"bridge": {
"name": "Homebridge",
"username": "CC:22:3D:E3:CE:30",
"port": 51826,
"pin": "031-45-154"
},

"description": "",

"accessories": [
    {
    }
],

"platforms": [
    {
    "platform": "openHAB",
    "name": "openHAB",
    "host": "10.0.1.32",
    "port": "8080",
    "sitemap": "home",
    "useLabelForName": true
    }
]

}

Any idea what the problem is?

GarageDoorOpenerItem config.json example

Dear Guy´s,

I tried to find out how I can use the Garagedooropeneritem without any positiv results.

Do you have a example how it works?

I have in OH2 for example one item what gives back the actual state (OPEN,OPENING,CLOSED,CLOSING) and one item what´s control´s the door´s.

But I have really absolute no idea how to get them run.

Thanks for your help!

,... and may be put this in the description from this project :-)

FanItem Issue

I have a insteon fanlinc configured in openhab and working fine. I set a custom attribute and set that item to a fan item. In the Insteon+ app it shows the homekit device as a fan with high , medium, low settings but the only command it sends is false.

Thermostat item No Response

I'm trying to setup a Thermostat item but am seeing No Response in the Home app.

Here are my items:

    {
            "itemName":"thermostat_currenttemp",
            "itemLabel":"Thermostat",
            "itemType":"ThermostatItem",
            "itemSubType":"CurrentTemperatureFItem",
            "itemUniqueAggregationId":1
    },
    {
            "itemName":"control_thermostat_ui",
            "itemLabel":"Thermostat",
            "itemType":"ThermostatItem",
            "itemSubType":"TargetTemperatureFItem",
            "itemUniqueAggregationId":1
    },
    {
            "itemName":"thermostat_current_humidity",
            "itemLabel":"Thermostat",
            "itemType":"ThermostatItem",
            "itemSubType":"CurrentRelativeHumidityItem",
            "itemUniqueAggregationId":1
    }

I get an initial value in Home which seems to indicate it reads the value and is converting it to celsius. It always just shows as No Response however. Has anyone gotten this working with fahrenheit?

Fan item speed

Hello, I'm trying to set up a new fan item type with variable speed (medium, low, high). Does this homebridge plugin support fans with adjustable speed? If so, any tips for configuring that in the openhab files?

I currently have it configured as three separate proxy switches (low, medium, high) which map to my actual fan control. This is working, but it would be awesome to have a single fan item in HomeKit instead of three switches.

contact for information

Ciao tommaso, è possibile avere un contatto per poter parlare di questi progetti? Sarei interessato e dovrei porti un paio di domande.

Grazie Mille
Matteo

ThermostatItem minor issues

Hello @tommasomarchionni,

the thermostatItem works good!

I want to report a minor issue:
In the Elegato Eve App (iOS) there is now a new target temperature item but the current temperature is not visible. But if i ask siri about the current temperature it will answer me the correct temperature.
So this could be a cosmetical issue.

As a feature request can you add a humidity sensor?

config.json customAttrs not recognized

system works, however all definitions behind "customAttrs" are just ignored.

what's wrong?
here's my config.json
"platforms": [
{
"platform": "HarmonyHub",
"name": "Harmony Hub"
},
{
"platform": "openHAB",
"name": "openHAB",
"host": "192.168.178.27",
"port": "8080",
"sitemap": "raspi",
"useLabelForName": true,
"customAttrs": [
{
"itemName":"Outside Temperature",
"itemLabel":"Aussentemperatur",
"itemManufacturer": "Selfmade",
"itemModel": "NTC",
"itemSerialNumber":"12345678",
"itemType": "TemperatureSensorItem"
},
{
"itemName":"Deckenlicht",
"itemLabel":"LampeDecke",
"itemManufacturer": "Hersteller Deckenlicht Wozi",
"itemModel": "Deckenlicht im Wohnzimmer",
"itemSerialNumber":"12345678",
"itemType":"LightbulbItem"
}
]
}

]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.