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

ONVIF - Set System Date and Time Error with NVR - Lorex LNR616 #89958

Closed
jazzyisj opened this issue Mar 19, 2023 · 1 comment · Fixed by #91882
Closed

ONVIF - Set System Date and Time Error with NVR - Lorex LNR616 #89958

jazzyisj opened this issue Mar 19, 2023 · 1 comment · Fixed by #91882
Assignees

Comments

@jazzyisj
Copy link

The problem

When clicking the Set System Date and Time button in the ONVIF integration, the function does not work and following error appears in the logs. I am able to set the NVR date/time externally using ONVIF Device Manager.

NVR - Lorex LNR616

What version of Home Assistant Core has the issue?

2023.3.5

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

ONVIF

Link to integration documentation on our website

https://www.home-assistant.io/integrations/onvif/

Diagnostics information

config_entry-onvif-55d0f351e4cbeed72a797110154d8ace.json.txt

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2023-03-19 13:26:37.556 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [281471792695952] Invalid data
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 199, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1808, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1845, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 213, in handle_service
    await service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 686, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 961, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 726, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/button/__init__.py", line 116, in _async_press_action
    await self.async_press()
  File "/usr/src/homeassistant/homeassistant/components/onvif/button.py", line 54, in async_press
    await self.device.async_manually_set_date_and_time()
  File "/usr/src/homeassistant/homeassistant/components/onvif/device.py", line 179, in async_manually_set_date_and_time
    await device_mgmt.SetSystemDateAndTime(dt_param)
  File "/usr/local/lib/python3.10/site-packages/zeep/proxy.py", line 64, in __call__
    return await self._proxy._binding.send_async(
  File "/usr/local/lib/python3.10/site-packages/zeep/wsdl/bindings/soap.py", line 164, in send_async
    return self.process_reply(client, operation_obj, response)
  File "/usr/local/lib/python3.10/site-packages/zeep/wsdl/bindings/soap.py", line 229, in process_reply
    return self.process_error(doc, operation)
  File "/usr/local/lib/python3.10/site-packages/zeep/wsdl/bindings/soap.py", line 391, in process_error
    raise Fault(
zeep.exceptions.Fault: Invalid data

Additional information

No response

@home-assistant
Copy link

Hey there @hunterjm, mind taking a look at this issue as it has been labeled with an integration (onvif) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of onvif can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign onvif Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


onvif documentation
onvif source
(message by IssueLinks)

@bdraco bdraco changed the title ONVIF - Set System Date and Time Error ONVIF - Set System Date and Time Error with NVR - Lorex LNR616 Apr 19, 2023
bdraco added a commit that referenced this issue Apr 23, 2023
… fails

If the device does not accept a timezone, or does not support
the system timezone, we try the current timezone, if that does
not work we try an empty timezone. This allows us to set the time
on many more devices which resolves auth problems

fixes #89958
@github-actions github-actions bot locked and limited conversation to collaborators May 24, 2023
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