RMCob / homebridge-wyze-robovac

This plug-in provides rudimentary control for a Wyze Robot Vacuum.
Apache License 2.0
8 stars 4 forks source link

‘Unknown device type detected’ stops from polling for other devices? #16

Closed tjb1013 closed 5 months ago

tjb1013 commented 1 year ago

Describe The Bug: Not finding my vac. I do get a message about ‘Unknown device type detected’, which is likely my Wyze Air Purifier. Wondering if that stops the poll for other devices.

Saw an old issue about Python error logging, not certain how it applies.

To Reproduce: Restart Homebridge or Wyze bridge.

Expected behavior: Wyze vac accessory loaded

Logs:

Show the Homebridge logs here, remove any sensitive information.

[02/05/2023, 08:30:39] [WyzeRoboVac] Restarting child bridge... [02/05/2023, 08:30:39] Got SIGTERM, shutting down child bridge process... [02/05/2023, 08:30:45] [WyzeRoboVac] Child bridge process ended [02/05/2023, 08:30:45] [WyzeRoboVac] Process Ended. Code: 143, Signal: null [02/05/2023, 08:30:52] [WyzeRoboVac] Restarting Process... [02/05/2023, 08:30:53] [WyzeRoboVac] Launched child bridge with PID 11126 [02/05/2023, 08:30:53] Registering platform 'homebridge-wyze-robovac.WyzeRoboVac' [02/05/2023, 08:30:53] [WyzeRoboVac] Loaded homebridge-wyze-robovac v1.2.1 child bridge successfully [02/05/2023, 08:30:53] Loaded 0 cached accessories from cachedAccessories.0E8621AD9154. [02/05/2023, 08:30:53] [WyzeRoboVac] discoverDevices(): username = '[deleted]', password = '[deleted]' [02/05/2023, 08:30:53] Homebridge v1.6.1 (HAP v0.11.1) (WyzeRoboVac) is running on port 45640. [02/05/2023, 08:30:55] [WyzeRoboVac] stderr: Unknown device type detected ({'mac': 'CO_AP1_7C78B2CA5F58', 'first_activation_ts': 1682970096000, 'first_binding_ts': 1682970096000, 'enr': 'enr_place_holder', 'nickname': 'Post Office', 'timezone_name': 'America/New_York', 'product_model': 'CO_AP1', 'product_model_logo_url': '', 'product_type': 'Common', 'hardware_ver': '0.0.0.0', 'firmware_ver': '1.0.10', 'user_role': 1, 'binding_user_nickname': '[deleted]', 'conn_state': 1, 'conn_state_ts': 1682970852986, 'push_switch': 1, 'device_params': {}, 'is_in_auto': 0, 'event_master_switch': 1, 'parent_device_mac': '', 'parent_device_enr': '', 'binding_ts': 1682970096000, 'timezone_gmt_offset': -4.0})

Plugin Config:

Just the Wyze section

 {
            "name": "WyzeRoboVac",
            "username": "[deleted]",
            "password": "[deleted]",
            "statusCheckRefreshInterval": 30,
            "idleBatteryCheckRefreshInterval": 1800,
            "busyBatteryCheckRefreshInterval": 120,
            "path2py_stubs": "/var/lib/homebridge/node_modules/homebridge-wyze-robovac/py_helpers",
            "debugLevel": 1,
            "_bridge": {
                "username": "0E:86:21:AD:91:54",
                "port": 45640
            },
            "platform": "WyzeRoboVac"
        }

Screenshots:

Environment:

alanhartless commented 5 months ago

I'm also experiencing this. It's not finding my vacuum but I get a bunch of "Unknown device type detected" that is my wyze scale, climate sensors, and keypads for wyze home monitoring.

alanhartless commented 5 months ago

The Unknown device type detected error is coming from wyze_sdk which is triggering the return in places like https://github.com/RMCob/homebridge-wyze-robovac/blob/master/src/platform.ts#L78 and https://github.com/RMCob/homebridge-wyze-robovac/blob/master/src/platform.ts#L115. If I comment everywhere in platform.js and platformAccessories.js where it returns if stderr, the vacuum accessories show up.

RMCob commented 5 months ago

This issue is fixed with version 1.5.0/1.5.1 Thank you for your inputs.