Giter VIP home page Giter VIP logo

homebridge-openhab2's People

Contributors

philipparndt avatar timcharper avatar tommasomarchionni avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

homebridge-openhab2's Issues

Item centric approach to accessory discovery; does not map well to Homekit services

Overview

When we expose something like a leak sensor in HomeKit, there are multiple channels of interest:

  • The alarm state (is a leak detected). A channel.
  • The battery state (percentage). A channel.
  • The health of the z-wave device (offline / online). Not a channel.

Items can be associated with one channel, and items cannot reasonably be associated with channels of different types. Items can not be bound to thing statuses, such as zwave node online/offline.

As such, being item centric does not map well to Homekit services, which can aggregate multiple channels of information:

homebridge/node_modules/hap-nodejs/lib/gen/HomeKitTypes.js

3088 | Service.LeakSensor = function(displayName, subtype) {
3089 |   Service.call(this, displayName, '00000083-0000-1000-8000-0026BB765291', subtype);
3090 | 
3091 |   // Required Characteristics
3092 |   this.addCharacteristic(Characteristic.LeakDetected);
3093 | 
3094 |   // Optional Characteristics
3095 |   this.addOptionalCharacteristic(Characteristic.StatusActive);
3096 |   this.addOptionalCharacteristic(Characteristic.StatusFault);
3097 |   this.addOptionalCharacteristic(Characteristic.StatusTampered);
3098 |   this.addOptionalCharacteristic(Characteristic.StatusLowBattery);
3099 |   this.addOptionalCharacteristic(Characteristic.Name);
3100 | };

Reconncet to OpenHAB on connection loss

I have been extensively using HomeBridge with the OpehHAB2 addon. Love it!!!
My ONLY issue is that if the OpenHAB server is unavailable during the startup of this HomeBridge plugin, or if I loose connection to the OpenHAB server at any point in time, it seems that this HomeBridge plugin does not have a retry or reconnect feature.

It would be GREAT if this HomeBridge plugin would have the ability to reconnect to OpenHAB on connection loss and have a timer to continue retrying to connect until OpenHAB is back online.

If I am doing something wrong, please let me know. That seems to be my only issue.
Thank you for any and all help!

Event stream stops responding after time

I observed that the event stream stopped responding after about 10 hours; push updates were lost. A week later (of no push updates for OpenHab2) I see this in the logs:

Oct 10 03:46:14 raspberrypi homebridge[5917]: [10/10/2018, 3:46:14 AM] [openHAB2] SSE - Error fetching updates: Event { type: 'error', message: undefined }
Oct 10 03:46:15 raspberrypi homebridge[5917]: [10/10/2018, 3:46:15 AM] [openHAB2] SSE - Error fetching updates: Event { type: 'error', status: 404, message: 'Not Found' }

I don't have any further detail to report at this time, sorry. It just looks like the recovery logic is not working.

mdns in package.json seem never to be used

mdns is a stong external dependancy because it needs a compile. But I have not seen a usage in the code.
Homebridge itself changed from mdns to bonjour-hap in May 2018.

Add build instructions?

Hi! I tried to hack on this but I am new to typescript. I ran npm install and then ran "tsc" but I got these error messages:

08:57 $ ./node_modules/typescript/bin/tsc
src/accessories/abstracts/abstractAccessory.ts(4,18): error TS2503: Cannot find namespace 'HAPNodeJS'.
src/accessories/abstracts/abstractAccessory.ts(4,18): error TS4000: Import declaration 'Service' is using private name 'HAPNodeJS'.
src/accessories/abstracts/abstractAccessory.ts(5,25): error TS2503: Cannot find namespace 'HAPNodeJS'.
src/accessories/abstracts/abstractAccessory.ts(5,25): error TS4000: Import declaration 'Characteristic' is using private name 'HAPNodeJS'.
src/models/homebridge/homebridgeInterface.ts(4,14): error TS2503: Cannot find namespace 'HAPNodeJS'.
src/models/homebridge/homebridgeInterface.ts(4,14): error TS4000: Import declaration 'hap' is using private name 'HAPNodeJS'.
src/models/homebridge/platformAccessoryInterface.ts(4,18): error TS2503: Cannot find namespace 'HAPNodeJS'.
src/models/homebridge/platformAccessoryInterface.ts(4,18): error TS4000: Import declaration 'Service' is using private name 'HAPNodeJS'.
src/models/homebridge/platformAccessoryInterface.ts(9,13): error TS2503: Cannot find namespace 'HAPNodeJS'.
src/models/homebridge/platformAccessoryInterface.ts(9,13): error TS4033: Property 'category' of exported interface has or is using private name 'HAPNodeJS'.
src/platform/openHAB2Platform.ts(13,18): error TS2503: Cannot find namespace 'HAPNodeJS'.
src/platform/openHAB2Platform.ts(13,18): error TS4000: Import declaration 'Service' is using private name 'HAPNodeJS'.
src/platform/openHAB2Platform.ts(14,25): error TS2503: Cannot find namespace 'HAPNodeJS'.
src/platform/openHAB2Platform.ts(14,25): error TS4000: Import declaration 'Characteristic' is using private name 'HAPNodeJS'.
src/platform/openHAB2Platform.ts(15,15): error TS2503: Cannot find namespace 'HAPNodeJS'.
src/platform/openHAB2Platform.ts(15,15): error TS4000: Import declaration 'uuid' is using private name 'HAPNodeJS'.
src/services/sse.ts(7,18): error TS2503: Cannot find namespace 'HAPNodeJS'.
src/services/sse.ts(7,18): error TS4000: Import declaration 'Service' is using private name 'HAPNodeJS'.
src/services/sse.ts(8,25): error TS2503: Cannot find namespace 'HAPNodeJS'.
src/services/sse.ts(8,25): error TS4000: Import declaration 'Characteristic' is using private name 'HAPNodeJS'.

not sure what I did wrong.

I'm excited to have a reason to hack on type script!

Rollershutters not working correctly

I have Fibaro Roller Shutters 2, perfectly integrated in open hab. openhab Control works.
Control via homebridge-openhab2 basically works, but there is a Problem regarding the correct states submitted to homebridge. If i am using the physicall switch in the wall connectet to the fibaro rollershutter to close the blinds, the resulting state "blinds closed" ist not submitted to homebridge. So homebridge still thinks that the blinds are open, which they are not. very unhandy and makes the rollershutter implementation in homekit quite useless. same happens, when i use the openhab app to close/open the blinds. the (correct) resulting state is not submitted to homebridge.

thx very much

Nip

Select color through home kit

Hi,

just stumbled upon homebridge-openhab2 and it works far more reliable for me then the openhab2 implementation atm. It looks like its missing a few features, like:

  • Select Color through home kit (ColorLightAccessory)
  • Set temperature for heating
  • Show temperature of thermometer

Are there plans to integrate this stuff? Maybe I could help to get some more features into the plugin.

BR
Patrick

feature request: min / max values for Thermostats (when implemented)

The built-in homekit binding in openHAB doesn't implement sane maximums, i think the range is from 100C to -100C and it makes the sliders on iOS pretty useless, you have to set a temperature with Siri.

It would be nice if we could limit thermostat values in the sitemap by using the SetPoint type, it has configurable limits.
https://docs.openhab.org/configuration/sitemaps.html#element-type-setpoint

Are you planning to support the WindowCovering and DoorLock homekit types eventually? Right now I have to handle my window blinds with homebridge-mqtt and some logic in Node-RED, it works but it was very fiddly to set up.

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.