Git Product home page Git Product logo

Comments (3)

njh avatar njh commented on June 11, 2024

I have no idea why I was struggling with this but I have it working fine now.

I found that positionState did very little in the Apple Home app, so I have removed it from my configuration.

Here is my config:

  "living-room-blinds": {
    "name": "Living Room Velux Window",
    "manufacturer": "Velux",
    "category": 14,
    "services": [
      {
        "name": "Velux Blinds",
        "service": "WindowCovering",
        "topic": {
          "setTargetPosition": "living-room/velux/blinds/command",
          "statusTargetPosition": "living-room/velux/blinds/target_position",
          "statusCurrentPosition": "living-room/velux/blinds/current_position"
        },
        "payload": {},
        "config": {},
        "props": {}
      }
    ]
  }

I listen to the command topic for instructions what to do and then update target_position and current_position.

  • If current_position = target_positon = 100, then the tile displays 'Open'
  • If current_position = target_positon = 0, then the tile displays 'Closed'
  • If current_position = target_positon = 55, then the tile displays '55% Open'
  • If current_position is less than target_positon, then the tile displays 'Opening...' with a spinner
  • If current_position is greater than target_positon, then the tile displays 'Closing...' with a spinner

I hope if someone finds this, having the same problem, it helps them in some way.

from homekit2mqtt.

njh avatar njh commented on June 11, 2024

Reopening as I haven't got it working completely after all. It is working fine on Home.app (Version 4.0 (367.7)) on my Mac but not on my iPhone (iOS 14.2).

I have done some testing with the HomeKit simulator and that is working fine.
So I think there must be a bug somewhere....

from homekit2mqtt.

njh avatar njh commented on June 11, 2024

I did some more testing and got a Window Covering behaving correctly using homebridge-mqttthing instead:

        {
            "accessory": "mqttthing",
            "type": "windowCovering",
            "name": "Living Room Blinds",
            "topics": {
                "getCurrentPosition": "living-room/blinds/current-position",
                "getPositionState": "living-room/blinds/state",
                "getTargetPosition": "living-room/blinds/target-position",
                "setTargetPosition": "living-room/blinds/command"
            },
            "positionStateValues": [
                "closing",
                "opening",
                "stopped"
            ]
        }

There were some Homebridge plugins I wanted to try using anyway, so decided to make the switch away from homekit2mqtt.

Thanks for homekit2mqtt, I happily used it for a long time!

from homekit2mqtt.

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.