Git Product home page Git Product logo

Comments (7)

snowdd1 avatar snowdd1 commented on July 16, 2024 1

And Christof, could you read #61 for pasting code samples here? Thanks

from homebridge-knx.

snowdd1 avatar snowdd1 commented on July 16, 2024

Have to look up the characteristics. Reverse does only work with Boolean and Percentage types. First guess is that LockTargetState is an integer type with discrete values for states.

from homebridge-knx.

snowdd1 avatar snowdd1 commented on July 16, 2024

As I assumed, LockCurrentState
https://github.com/KhaosT/HAP-NodeJS/blob/master/lib/gen/HomeKitTypes.js#L900
is a UINT8 with values 0,1,2,3

LockTargetState
https://github.com/KhaosT/HAP-NodeJS/blob/master/lib/gen/HomeKitTypes.js#L972
is a UINT8 with values 0 or 1

So no Boolean value, even if it looks as if it was.

from homebridge-knx.

snowdd1 avatar snowdd1 commented on July 16, 2024

If you need other values than the ones defined by homekit, you need to write another add-in. Like I needed for my ContactSensor, because the characteristic is a UINT8, too.

from homebridge-knx.

giase82 avatar giase82 commented on July 16, 2024

Ah makes sense! I was thinking the "old stuff" was working as before still... So in the time before addins, which code did the mapping? (I am asking as I would probably copy this one)

from homebridge-knx.

snowdd1 avatar snowdd1 commented on July 16, 2024

I recommend using ContactSensor add-in as an example, because the old code worked completely different - and I forced it to be Boolean in 0.2.

from homebridge-knx.

giase82 avatar giase82 commented on July 16, 2024

Ok, agree. We can close this then.

from homebridge-knx.

Related Issues (20)

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.