dkerr64 / homebridge-yolink

Apache License 2.0
12 stars 2 forks source link

Garage Door Controller not responding #90

Closed staring007 closed 8 months ago

staring007 commented 9 months ago

Describe Your Problem: Garage Door controller device not working anymore

Logs:

[19/12/2023, 06:23:11] [YoLink] MQTT: GarageDoor.setState for device YS4906-UC (xxx) Garage Door Controller not supported.
Please report all bugs at https://github.com/dkerr64/homebridge-yolink/issues
{
  "event": "GarageDoor.setState",
  "time": 1702966991160,
  "msgid": "1702966991159",
  "data": {
    "state": "closed",
    "stateChangedAt": 1702966991159,
    "loraInfo": {
      "netId": "010202",
      "signal": -34,
      "gatewayId": "xxx",
      "gateways": 1
    }
  },
  "deviceId": "xxx"

Plugin Config:

    {
        "name": "YoLink",
        "platform": "YoLink",
        "tokenURL": "https://api.yosmart.com/open/yolink/token",
        "apiURL": "https://api.yosmart.com/open/yolink/v2/api",
        "mqttPort": 8003,
        "userAccessId": "xxx",
        "secretKey": "xxx",
        "refreshAfter": 3600,
        "verboseLog": false,
        "liteLog": true,
        "allDevices": true,
        "excludeTypes": [
            "Hub",
            "SpeakerHub"
        ],
        "checkNewDeviceInterval": 600,
        "enableExperimental": false,
        "garageDoors": [
            {
                "controller": "xxx",
                "sensor": "xxx",
                "timeout": 30
            }
        ]
    }
],


**Screenshots:**
<!-- If applicable, add screenshots to help explain your problem. -->

**Environment:**

* **Plugin Version**: 1.5.0
* **Homebridge Version**: 7.70
* **Node.js Version**: 20.10.0
* **NPM Version**: 10.2.3
* **Operating System**: Raspbian 

<!-- Click the "Preview" tab before you submit to ensure the formatting is correct. -->
dkerr64 commented 8 months ago

Thank you for reporting this. What you are seeing is a MQTT message sent by the YoLink garage door opener informing the plugin that something is setting a new state (in this case "closed"), possibly because you used the YoLink app to close the door. What is interesting is that this message is not documented (I would expect it here) but also not surprising (other devices are starting to send setState messages when they didn't in the past).

Your door should be functioning properly, and open/close state should be reported correctly by the DoorSensor device. If not, then that is a separate problem unrelated to this.

I will handle this MQTT message next time I push a release.

dkerr64 commented 8 months ago

I was able to reproduce the MQTT messages with my own garage door, also found a bug in opening/closing. It should be working now in release 1.5.2.

staring007 commented 8 months ago

All working now as expected. Issue resolved. Thanks for the quick fix and this project!