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

Error: Command failed #19

Closed shifatul-i closed 1 year ago

shifatul-i commented 1 year ago

Please take a look at the logs

[9/3/2023, 11:29:15 AM] [WyzeRoboVac] Starting to sweep room 'Bedroom:Bedroom'(Vacuum)
[9/3/2023, 11:29:17 AM] [WyzeRoboVac] error: Command failed: python3 /homebridge/node_modules/homebridge-wyze-robovac/py_helpers/vacuumStartSweep.py email@gmail.com PASS  API_ID API_KEY 'Vacuum' 'Bedroom'
Traceback (most recent call last):
  File "/homebridge/node_modules/homebridge-wyze-robovac/py_helpers/vacuumStartSweep.py", line 54, in <module>
    for room in vacuum.current_map.rooms:
  File "/usr/local/lib/python3.8/dist-packages/wyze_sdk/models/devices/vacuums.py", line 703, in rooms
    return [VacuumMapRoom(**room) for room in map_data['12']]
  File "/usr/local/lib/python3.8/dist-packages/wyze_sdk/models/devices/vacuums.py", line 703, in <listcomp>
    return [VacuumMapRoom(**room) for room in map_data['12']]
TypeError: ABCMeta object argument after ** must be a mapping, not str
RMCob commented 1 year ago

Please supply more information: Platform, OS/version: Python version: NodeJS version: homebridge-wyze-robovac version:

Please run "python3 /homebridge/node_modules/homebridge-wyze-robovac/py_helpers/vacuumStartSweep.py email@gmail.com PASS API_ID API_KEY 'Vacuum' 'Bedroom'" with the appropriate arguments supplied from the command line in a terminal window and report back the results. By the way the order of arguments is email, password, key_id, api_key, vacuum_name, room_to_sweep.

vascott1 commented 1 year ago

Hi. Thanks for this plugin.

I am having a similar issue. I did run the command from the command line and got the same error:

python3: can't open file '/homebridge/node_modules/homebridge-wyze-robovac/py_helpers/vacuumStartSweep.py': [Errno 2] No such file or directory

I am running: Raspbian GNU/Linux Buster (10) Python 2.7.16 (default, Oct 10 2019, 22:02:15) Node.js Version v18.16.0 homebridge-wyze-robovac v1.4.2

What is did find is the files missing are not missing but are created in /usr/local/lib/node_modules/homebridge-wyze-robovac

pi@homebridge:/var/lib/homebridge $ ls -ltr /usr/local/lib/node_modules/homebridge-wyze-robovac/py_helpers/ total 32 -rw-r--r-- 1 root root 1521 Sep 11 19:30 getVacuumFloors.py -rw-r--r-- 1 root root 492 Sep 11 19:30 getVacuumDeviceList.py -rw-r--r-- 1 root root 992 Sep 11 19:30 getVacuumBatLevel.py -rw-r--r-- 1 root root 1744 Sep 11 19:30 setVacuumFloor.py -rw-r--r-- 1 root root 1041 Sep 11 19:30 getVacuumStatus.py -rw-r--r-- 1 root root 1099 Sep 11 19:30 getVacuumRoomList.py -rw-r--r-- 1 root root 1254 Sep 11 19:30 vacuumStopSweep.py -rw-r--r-- 1 root root 1855 Sep 11 19:30 vacuumStartSweep.py pi@homebridge:/var/lib/homebridge $

RMCob commented 1 year ago

@vascott1 Your issue is different than the original poster's, but I will address it here.

shifatul-i commented 1 year ago

@RMCob Platform, OS/version: Unraid 6.12.4 Python version: Python 2.7.18 & Python 3.8.10 NodeJS version: v18.17.1 homebridge-wyze-robovac version: homebridge-wyze-robovac v1.4.2

Command log:

root@NAS:/homebridge $ python3 /homebridge/node_modules/homebridge-wyze-robovac/py_helpers/vacuumStartSweep.py xxx@gmail.com ppp yyy zzz 'Vacuum' 'Bedroom'
Traceback (most recent call last):
  File "/homebridge/node_modules/homebridge-wyze-robovac/py_helpers/vacuumStartSweep.py", line 54, in <module>
    for room in vacuum.current_map.rooms:
  File "/usr/local/lib/python3.8/dist-packages/wyze_sdk/models/devices/vacuums.py", line 703, in rooms
    return [VacuumMapRoom(**room) for room in map_data['12']]
  File "/usr/local/lib/python3.8/dist-packages/wyze_sdk/models/devices/vacuums.py", line 703, in <listcomp>
    return [VacuumMapRoom(**room) for room in map_data['12']]
TypeError: ABCMeta object argument after ** must be a mapping, not str
root@NAS:/homebridge $ 
RMCob commented 1 year ago

@shifatul-i I am sorry but I can't help you. Your OS environment (Unraid) is different than my development environment (Raspberry Pi/Raspbian Linux) so I cannot recreate your problem in order to solve it. Perhaps someone else who has installed this plugin in your OS can help if they were successful. If you do manage to figure out what's wrong, please report back here and share with others.

shifatul-i commented 1 year ago

@RMCob Its inside a Homebridge (v1.6.1) docker container.

drakehomebridge commented 9 months ago

@RMCob I followed your command "python3 /homebridge/node_modules/homebridge-wyze-robovac/py_helpers/vacuumStartSweep.py email@gmail.com PASS API_ID API_KEY 'Vacuum' 'Bedroom'" and inputted my information, and this is what I got in the command terminal. Traceback (most recent call last): File "/usr/local/lib/node_modules/homebridge-wyze-robovac/py_helpers/vacuumStartSweep.py", line 54, in <module> for room in vacuum.current_map.rooms: ^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/wyze_sdk/models/devices/vacuums.py", line 703, in rooms return [VacuumMapRoom(**room) for room in map_data['12']] ^^^^^^^^^^^^^^^^^^^^^ TypeError: wyze_sdk.models.devices.vacuums.VacuumMapRoom() argument after ** must be a mapping, not str

Everything is working pretty much much except for the vacuum function. It accurately checks and updates the battery level, knows when it’s on the dock, but when you turn it on to vacuum, it throws out errors like it can’t detect it or something. However, if you turn it off, it will try to send it back to the dock, and if it’s already on the dock, it will tell you.

I’m just confused on the vacuum function.