Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception raised when enabling/disabling motion detection on Foscam. Functionality works correctly. #9484

Closed
i-am-shodan opened this issue Sep 18, 2017 · 2 comments · Fixed by #11701

Comments

@i-am-shodan
Copy link
Contributor

The Python Foscam library correctly sets motion detection on my Foscam FI9800P but throws an exception while doing so, see below. I've temporarily fixed this in my set up by wrapping this in an exception handler.

I have reported this upstream as well.

quatanium/foscam-python-lib#22

Traceback (most recent call last):
  File "/usr/lib/python3.4/asyncio/tasks.py", line 233, in _step
    result = coro.throw(exc)
  File "/usr/local/lib/python3.4/dist-packages/homeassistant/core.py", line 1025, in _event_to_service_call
    yield from service_handler.func(service_call)
  File "/usr/local/lib/python3.4/dist-packages/homeassistant/components/camera/__init__.py", line 133, in async_handle_camera_service
    yield from camera.async_disable_motion_detection()
  File "/usr/lib/python3.4/asyncio/futures.py", line 388, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup
    value = future.result()
  File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
    raise self._exception
  File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.4/dist-packages/homeassistant/components/camera/foscam.py", line 87, in disable_motion_detection
    ret, err = self._foscam_session.disable_motion_detection()
TypeError: 'int' object is not iterable

https://github.com/home-assistant/home-assistant/blob/ced642c86206e4552aea6ed1e057c93712a5016c/homeassistant/components/camera/foscam.py#L76

@balloobbot
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍

@i-am-shodan
Copy link
Contributor Author

i-am-shodan commented Dec 11, 2017

This is still broken in 0.59,2!

@home-assistant home-assistant locked and limited conversation to collaborators May 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants