dkerr64 / homebridge-yolink

Apache License 2.0
12 stars 2 forks source link

Occasional random message that smoke sensor isn't supported #92

Closed threeonparfive closed 8 months ago

threeonparfive commented 8 months ago

Describe The Bug: Occasional random message that smoke sensor isn't supported

To Reproduce: Restart plug-in and wait. This seems to have started since the latest updates made by Synology to their nodejs packages. I don't recall seeing it before.

Expected behavior:

Logs:


[1/3/2024, 11:32:48 AM] [HB Supervisor] OS: Linux 4.4.302+ x64
[1/3/2024, 11:32:48 AM] [HB Supervisor] Node.js v20.9.0 /volume1/@appstore/Node.js_v20/usr/local/bin/node
[1/3/2024, 11:32:48 AM] [HB Supervisor] Homebridge Path: /volume1/homebridge/node_modules/homebridge/bin/homebridge
[1/3/2024, 11:32:48 AM] [HB Supervisor] UI Path: /var/packages/homebridge/target/app/lib/node_modules/homebridge-config-ui-x/dist/bin/standalone.js
[1/3/2024, 11:32:50 AM] [Homebridge UI] Homebridge UI v4.54.2 is listening on :: port 8581
[1/3/2024, 11:32:50 AM] [HB Supervisor] Starting Homebridge with extra flags: -I -P /volume1/homebridge/node_modules --strict-plugin-resolution
[1/3/2024, 11:32:50 AM] [HB Supervisor] Started Homebridge v1.7.0 with PID: 7147
[1/3/2024, 11:32:51 AM] Loaded config.json with 0 accessories and 5 platforms.
[1/3/2024, 11:32:51 AM] Loaded 0 cached accessories from cachedAccessories.
[1/3/2024, 11:32:51 AM] ---
[1/3/2024, 11:32:52 AM] Loaded plugin: homebridge-yolink@1.5.2
[1/3/2024, 11:32:52 AM] Registering platform 'homebridge-yolink.YoLink'
[1/3/2024, 11:32:52 AM] ---
[1/3/2024, 11:32:52 AM] Loading x platforms...
[1/3/2024, 11:32:52 AM] [YoLink] Initializing YoLink platform...
[1/3/2024, 11:32:52 AM] [YoLink] Initializing child bridge 0E:22:68:53:7B:5C                       
[1/3/2024, 11:32:52 AM] Homebridge v1.7.0 (HAP v0.11.1) (Homebridge E3E1) is running on port 51529.
[1/3/2024, 11:32:54 AM] [YoLink] Launched child bridge with PID 7166
[1/3/2024, 11:32:54 AM] [YoLink] Loaded homebridge-yolink v1.5.2 child bridge successfully
[1/3/2024, 11:32:54 AM] [YoLink] YoLink plugin for HomeBridge version 1.5.2 (c) 2022-2023 David A. Kerr
Please report all bugs at https://github.com/dkerr64/homebridge-yolink/issues
[1/3/2024, 11:32:54 AM] [YoLink] Login to YoLink API with credentials from config
[1/3/2024, 11:32:54 AM] Homebridge v1.7.0 (HAP v0.11.1) (YoLink) is running on port 30870.
[1/3/2024, 11:32:55 AM] [YoLink] Starting interval timer to refresh accessToken every 6480 seconds
[1/3/2024, 11:32:55 AM] [YoLink] [YS7A02-UC (d88b4c0100061adc) Downstairs Smoke Alarm] Hide Carbon Monoxide service because config.[d88b4c0100061adc].hide is set to "co"
[1/3/2024, 11:32:55 AM] [YoLink] [YS8004-UC (d88b4c0100079e9c) Pool Temperature] Hide Hydrometer service because config.[d88b4c0100079e9c].hide is set to "hydro"
[1/3/2024, 11:32:55 AM] [YoLink] [YS7A02-UC (d88b4c0100061a08) Upstairs Smoke Alarm] Hide Carbon Monoxide service because config.[d88b4c0100061a08].hide is set to "co"
[1/3/2024, 11:32:55 AM] [YoLink] [YS1603-UC (d88b4c160303664a) YoLink Hub] Not registering device as config 'hide=true'
[1/3/2024, 11:32:55 AM] [YoLink] Create MQTT client to connect to YoLink message service
[1/3/2024, 11:32:55 AM] [YoLink] Device initialized: YS7A02-UC (d88b4c0100061adc) Downstairs Smoke Alarm
[1/3/2024, 11:32:55 AM] [YoLink] Device initialized: YS7906-UC (d88b4c0100084e49) Hall Bath
[1/3/2024, 11:32:55 AM] [YoLink] MQTT subscribed: yl-home/b34dd4fd014b47879fa4b1051fca6440/+/report
[1/3/2024, 11:32:56 AM] [YoLink] Device initialized: YS7906-UC (d88b4c0100084d5d) Heat Pump
[1/3/2024, 11:32:56 AM] [YoLink] Device initialized: YS7906-UC (d88b4c0100084ceb) Main Shutoff
[1/3/2024, 11:32:58 AM] [YoLink] Device initialized: YS5003-UC (d88b4c0100081e51) Main Water Valve
[1/3/2024, 11:32:58 AM] [YoLink] Device initialized: YS7906-UC (d88b4c0100084ce8) Master Bath
[1/3/2024, 11:32:58 AM] [YoLink] Device initialized: YS8004-UC (d88b4c0100079e9c) Pool Temperature
[1/3/2024, 11:32:58 AM] [YoLink] Device initialized: YS7906-UC (d88b4c010008519d) Refrigerator
[1/3/2024, 11:32:58 AM] [YoLink] Device initialized: YS7906-UC (d88b4c0100084d17) Sink
[1/3/2024, 11:32:58 AM] [YoLink] Device initialized: YS7A02-UC (d88b4c0100061a08) Upstairs Smoke Alarm
[1/3/2024, 11:32:58 AM] [YoLink] Device initialized: YS7906-UC (d88b4c0100085195) Washer
[1/3/2024, 11:32:58 AM] [YoLink] Device initialized: YS3604-UC (d88b4c01000687cb) YoLink Fob
[1/3/2024, 11:32:58 AM] [YoLink] All YoLink devices initialized
[1/3/2024, 9:47:44 PM] [YoLink] MQTT: SmartRemoter.StatusChange for device YS3604-UC (d88b4c01000687cb) YoLink Fob button 1 double press event (time between presses = 687ms, threshold = 800ms)
[1/4/2024, 4:17:38 AM] [YoLink] MQTT: COSmokeSensor.StatusChange for device YS7A02-UC (d88b4c0100061adc) Downstairs Smoke Alarm not supported.
Please report all bugs at https://github.com/dkerr64/homebridge-yolink/issues
{
  "event": "COSmokeSensor.StatusChange",
  "time": 1704359858247,
  "msgid": "1704359858246",
  "data": {
    "state": {
      "unexpected": false,
      "sLowBattery": false,
      "smokeAlarm": false,
      "gasAlarm": false,
      "highTempAlarm": false,
      "silence": false
    },
    "metadata": {
      "inspect": false
    },
    "battery": 4,
    "interval": 120,
    "version": "0202",
    "devTemperature": 19,
    "tz": 0,
    "sche": {
      "type": "disable",
      "day": 0,
      "time": "0:0"
    },
    "loraInfo": {
      "netId": "010205",
      "signal": -41,
      "gatewayId": "d88b4c160303664a",
      "gateways": 1
    },
    "stateChangedAt": {
      "gasAlarm": 1704359858245,
      "smokeAlarm": 1704359858245,
      "unexpected": 1704359858245
    }
  },
  "deviceId": "d88b4c0100061adc"
}
[1/4/2024, 4:33:47 AM] [YoLink] MQTT: COSmokeSensor.StatusChange for device YS7A02-UC (d88b4c0100061a08) Upstairs Smoke Alarm not supported.
Please report all bugs at https://github.com/dkerr64/homebridge-yolink/issues
{
  "event": "COSmokeSensor.StatusChange",
  "time": 1704360827159,
  "msgid": "1704360827158",
  "data": {
    "state": {
      "unexpected": false,
      "sLowBattery": false,
      "smokeAlarm": false,
      "gasAlarm": false,
      "highTempAlarm": false,
      "silence": false
    },
    "metadata": {
      "inspect": false
    },
    "battery": 4,
    "interval": 120,
    "version": "0202",
    "devTemperature": 19,
    "tz": 0,
    "sche": {
      "type": "disable",
      "day": 0,
      "time": "0:0"
    },
    "loraInfo": {
      "netId": "010205",
      "signal": -33,
      "gatewayId": "d88b4c160303664a",
      "gateways": 1
    },
    "stateChangedAt": {
      "gasAlarm": 1704360827158,
      "smokeAlarm": 1704360827158,
      "unexpected": 1704360827158
    }
  },
  "deviceId": "d88b4c0100061a08"
}

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": "xxxxxxxxx",
    "secretKey": "xxxxxxxxx",
    "refreshAfter": 14500,
    "verboseLog": false,
    "liteLog": true,
    "allDevices": true,
    "excludeTypes": [
        "Hub",
        "SpeakerHub"
    ],
    "deviceTemperatures": false,
    "enableExperimental": false,
    "devices": [
        {
            "deviceId": "d88b4c0100061a08",
            "config": {
                "hide": "co"
            }
        },
        {
            "deviceId": "d88b4c0100061adc",
            "config": {
                "hide": "co"
            }
        },
        {
            "deviceId": "d88b4c0100079e9c",
            "config": {
                "hide": "hydro"
            }
        }
    ],
    "_bridge": {
        "username": "0E:22:68:53:7B:5C",
        "port": 30870
    }
}

Screenshots:

Environment:

dkerr64 commented 8 months ago

Thank you for reporting this. Looks like I was not expecting a COSmokeSensor.StatusChange event and I need to handle it.

It is an easy fix and it will be in next release. Give me a couple of days please.

David.

dkerr64 commented 8 months ago

This should be fixed now.