You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Nov 07 20:19:44 raspberrypi hass[12803]: 2017-11-07 20:19:44 INFO (Thread-8) [hikvision.api] Current motion detection state? enabled: false
Nov 07 20:19:44 raspberrypi hass[12803]: 2017-11-07 20:19:44 INFO (Thread-8) [homeassistant.components.switch.hikvisioncam] enabled: False
Nov 07 20:19:45 raspberrypi hass[12803]: 2017-11-07 20:19:45 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: service_call_id=1970943728-4, domain=homeassistant, service=turn_on, service_data=entity_id=switch.hikvision_camera_motion_detection>
Nov 07 20:19:45 raspberrypi hass[12803]: 2017-11-07 20:19:45 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: service_call_id=1970943728-5, domain=switch, service=turn_on, service_data=entity_id=['switch.hikvision_camera_motion_detection']>
Nov 07 20:19:45 raspberrypi hass[12803]: 2017-11-07 20:19:45 INFO (Thread-19) [homeassistant.components.switch.hikvisioncam] Turning on Motion Detection
Nov 07 20:19:45 raspberrypi hass[12803]: 2017-11-07 20:19:45 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Nov 07 20:19:45 raspberrypi hass[12803]: Traceback (most recent call last):
Nov 07 20:19:45 raspberrypi hass[12803]: File "/srv/homeassistant/lib/python3.5/site-packages/requests/utils.py", line 868, in check_header_validity
Nov 07 20:19:45 raspberrypi hass[12803]: if not pat.match(value):
Nov 07 20:19:45 raspberrypi hass[12803]: TypeError: expected string or bytes-like object
Nov 07 20:19:45 raspberrypi hass[12803]: During handling of the above exception, another exception occurred:
Nov 07 20:19:45 raspberrypi hass[12803]: Traceback (most recent call last):
Nov 07 20:19:45 raspberrypi hass[12803]: File "/usr/lib/python3.5/asyncio/tasks.py", line 241, in _step
Nov 07 20:19:45 raspberrypi hass[12803]: result = coro.throw(exc)
Nov 07 20:19:45 raspberrypi hass[12803]: File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/core.py", line 1038, in _event_to_service_call
Nov 07 20:19:45 raspberrypi hass[12803]: yield from service_handler.func(service_call)
Nov 07 20:19:45 raspberrypi hass[12803]: File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/switch/__init__.py", line 113, in async_handle_switch_service
Nov 07 20:19:45 raspberrypi hass[12803]: yield from switch.async_turn_on()
Nov 07 20:19:45 raspberrypi hass[12803]: File "/usr/lib/python3.5/asyncio/futures.py", line 380, in __iter__
Nov 07 20:19:45 raspberrypi hass[12803]: yield self # This tells Task to wait for completion.
Nov 07 20:19:45 raspberrypi hass[12803]: File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
Nov 07 20:19:45 raspberrypi hass[12803]: future.result()
Nov 07 20:19:45 raspberrypi hass[12803]: File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
Nov 07 20:19:45 raspberrypi hass[12803]: raise self._exception
Nov 07 20:19:45 raspberrypi hass[12803]: File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
Nov 07 20:19:45 raspberrypi hass[12803]: result = self.fn(*self.args, **self.kwargs)
Nov 07 20:19:45 raspberrypi hass[12803]: File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/switch/hikvisioncam.py", line 93, in turn_on
Nov 07 20:19:45 raspberrypi hass[12803]: self._hikvision_cam.enable_motion_detection()
Nov 07 20:19:45 raspberrypi hass[12803]: File "/srv/homeassistant/lib/python3.5/site-packages/hikvision/api.py", line 230, in enable_motion_detection
Nov 07 20:19:45 raspberrypi hass[12803]: self.put_motion_detection_xml(self.xml_motion_detection_on)
Nov 07 20:19:45 raspberrypi hass[12803]: File "/srv/homeassistant/lib/python3.5/site-packages/hikvision/api.py", line 247, in put_motion_detection_xml
Nov 07 20:19:45 raspberrypi hass[12803]: self._username, self._password), data=xml, headers=headers)
Nov 07 20:19:45 raspberrypi hass[12803]: File "/srv/homeassistant/lib/python3.5/site-packages/requests/api.py", line 126, in put
Nov 07 20:19:45 raspberrypi hass[12803]: return request('put', url, data=data, **kwargs)
Nov 07 20:19:45 raspberrypi hass[12803]: File "/srv/homeassistant/lib/python3.5/site-packages/requests/api.py", line 58, in request
Nov 07 20:19:45 raspberrypi hass[12803]: return session.request(method=method, url=url, **kwargs)
Nov 07 20:19:45 raspberrypi hass[12803]: File "/srv/homeassistant/lib/python3.5/site-packages/requests/sessions.py", line 494, in request
Nov 07 20:19:45 raspberrypi hass[12803]: prep = self.prepare_request(req)
Nov 07 20:19:45 raspberrypi hass[12803]: File "/srv/homeassistant/lib/python3.5/site-packages/requests/sessions.py", line 437, in prepare_request
Nov 07 20:19:45 raspberrypi hass[12803]: hooks=merge_hooks(request.hooks, self.hooks),
Nov 07 20:19:45 raspberrypi hass[12803]: File "/srv/homeassistant/lib/python3.5/site-packages/requests/models.py", line 306, in prepare
Nov 07 20:19:45 raspberrypi hass[12803]: self.prepare_headers(headers)
Nov 07 20:19:45 raspberrypi hass[12803]: File "/srv/homeassistant/lib/python3.5/site-packages/requests/models.py", line 440, in prepare_headers
Nov 07 20:19:45 raspberrypi hass[12803]: check_header_validity(header)
Nov 07 20:19:45 raspberrypi hass[12803]: File "/srv/homeassistant/lib/python3.5/site-packages/requests/utils.py", line 872, in check_header_validity
Nov 07 20:19:45 raspberrypi hass[12803]: "bytes, not %s" % (name, value, type(value)))
Nov 07 20:19:45 raspberrypi hass[12803]: requests.exceptions.InvalidHeader: Value for header {Content-Length: 353} must be of type str or bytes, not <class 'int'>
Nov 07 20:19:55 raspberrypi hass[12803]: 2017-11-07 20:19:55 INFO (MainThread) Nov 07 20:20:15 raspberrypi hass[12803]: 2017-11-07 20:20:15 INFO (Thread-6) [hikvision.api] Current motion detection state? enabled: false
Nov 07 20:20:15 raspberrypi hass[12803]: 2017-11-07 20:20:15 INFO (Thread-6) [homeassistant.components.switch.hikvisioncam] enabled: False
Additional info:
worked fine before
The text was updated successfully, but these errors were encountered:
blanard
changed the title
Hikvision Camera Switch Traceback since 0.57
Hikvision Camera Switch does not work 0.57
Nov 15, 2017
Make sure you are running the latest version of Home Assistant before reporting an issue.
You should only file an issue if you found a bug. Feature and enhancement requests should go in the Feature Requests section of our community forum:
Home Assistant release (
hass --version
):0.57.2
Python release (
python3 --version
):3.5.3
Component/platform:
Hikvision Camera Switch
Description of problem:
Traceback on changing the switch state. Unable to change status from UI.
Status is read and shown correctly
Expected:
No Traceback. Change the state from the UI and set the camera.
Problem-relevant
configuration.yaml
entries and steps to reproduce:Click on switch on UI
2.
3.
Traceback (if applicable):
Additional info:
worked fine before
The text was updated successfully, but these errors were encountered: