Coder Social home page Coder Social logo

How to record? about reolink_dev HOT 13 CLOSED

fwestenberg avatar fwestenberg commented on September 6, 2024
How to record?

from reolink_dev.

Comments (13)

emericklaw avatar emericklaw commented on September 6, 2024

I have not tried it myself since I use an external DVR but the documentation here under ‘Service record’ may work?

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

from reolink_dev.

fwestenberg avatar fwestenberg commented on September 6, 2024

When I login to the webview of the camera, I do not see a recording option.

image

@ArchGalileu What exacly would you like to have? I think a little more info would help.

from reolink_dev.

IsaTTeN avatar IsaTTeN commented on September 6, 2024

Hello,

Thanks for this nice custom component!!!

I´ve tried to use the service camera.record or camera.snapshot with your custom component but it doesn´t work. I get this error:

2020-01-01 22:33:18 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.140656349256592] a bytes-like object is required, not 'HTTPResponse' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 133, in handle_call_service connection.context(msg), File "/usr/src/homeassistant/homeassistant/core.py", line 1235, in async_call await asyncio.shield(self._execute_service(handler, service_call)) File "/usr/src/homeassistant/homeassistant/core.py", line 1260, in _execute_service await handler.func(service_call) File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 205, in handle_service self._platforms.values(), func, call, service_name, required_features File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 336, in entity_service_call future.result() # pop exception if have File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 360, in _handle_service_platform_call await func(entity, data) File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 659, in async_handle_snapshot_service await hass.async_add_executor_job(_write_image, snapshot_file, image) File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 656, in _write_image img_file.write(image_data) TypeError: a bytes-like object is required, not 'HTTPResponse'

If I configure the reolink camera like a generic camera I can use the camera.record and camera.snapshot.

What I´m trying to do is to use both services to record video and snapshot in the local directory.

Best regards

from reolink_dev.

fwestenberg avatar fwestenberg commented on September 6, 2024

I just created a new pull request. Snapshot is fixed now!

from reolink_dev.

IsaTTeN avatar IsaTTeN commented on September 6, 2024

How fast!!!

I just downloaded it! I will test it very soon and say how it works!!

Thanks a lot

from reolink_dev.

IsaTTeN avatar IsaTTeN commented on September 6, 2024

It works like a charm!!!!

from reolink_dev.

IsaTTeN avatar IsaTTeN commented on September 6, 2024

The camera.record service is still not working. I supose it requires more work. I get this error:

"Call-service API error. Error Message: camera.rampa does not support record service"

from reolink_dev.

fwestenberg avatar fwestenberg commented on September 6, 2024

The record service is indeed not implemented. I will work on this a.s.a.p.

from reolink_dev.

IsaTTeN avatar IsaTTeN commented on September 6, 2024

No hurry!

from reolink_dev.

fwestenberg avatar fwestenberg commented on September 6, 2024

If you have an NVR recorder, there will probably be an record option? @begicj do you know if this exists and what's the URL?
For people like me, who only have a cam without NVR there simply is no recording functionality provided by the cam for as far as I know.

from reolink_dev.

begicj avatar begicj commented on September 6, 2024

Yes there is option for recording, see picture below.

This is link:

http: //IP_of_NVR/cgi-bin/api.cgi? cmd=SetRec&token=someletters&user=user&password=mypass with POST method and body

[{"cmd":"SetRec","action":0,"param":{"Rec":{"channel":1,"overwrite":1,"packTime":"60 Minutes","postRec":"2 Minutes","preRec":1,"schedule":{"enable":1,"table":"222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222"}}}}]�

And response is:

[
{
"cmd" : "SetRec",
"code" : 0,
"value" : {
"rspCode" : 200
}
}
]

60C53A57-A4EE-4D05-B20D-D169DDC3B525

from reolink_dev.

extin avatar extin commented on September 6, 2024

This may not be what OP meant, but I can confirm that you can enable/disable recording to camera SD via POST payload:
[{"cmd":"SetRec","action":0,"param":{"Rec":{"channel":0,"schedule":{"enable":1}}}}]
or enable = 0 on URL your-camera-ip/cgi-bin/api.cgi?cmd=setRec&token=sometoken
This work even if you don't have the enable option visible in the web-ui.
I'd very much like the option to set this via HA, so I you don't get unnecessary recordings when you're home.

from reolink_dev.

fwestenberg avatar fwestenberg commented on September 6, 2024

Please check out the latest release v0.2.

from reolink_dev.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.