Skip to content

L command in sample.py not working #5

@WayneManion

Description

@WayneManion

I'm using sample.py as the basis of a script to publish MQTT messages when connected sensors send their status. I've been playing around with unchanged sample.py over the last couple days, and every time I use the 'L' "L to list" option nothing happens for ~30 seconds and then the script crashes with this output:

  File "./sample.py", line 134, in <module>
    sys.exit(main(docopt(usage)))
  File "./sample.py", line 117, in main
    while HandleCmd():
  File "./sample.py", line 113, in HandleCmd
    handler[1](cmd_and_args[1:])
  File "./sample.py", line 61, in List
    result = ws.List()
  File "/home/wayne/WyzeSensePy/wyzesense/gateway.py", line 497, in List
    sensors = self._GetSensors()
  File "/home/wayne/WyzeSensePy/wyzesense/gateway.py", line 469, in _GetSensors
    self._DoCommand(Packet.GetSensorList(count), cmd_handler, timeout=self._CMD_TIMEOUT * count)
  File "/home/wayne/WyzeSensePy/wyzesense/gateway.py", line 374, in _DoCommand
    raise TimeoutError("_DoCommand")
NameError: global name 'TimeoutError' is not defined

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions