IpCamera: New IP Camera Binding

Has anyone had success with an Eufy camera? After several hours of testing I’m giving up now.

The camera has the specialty that it is battery operated and thus only sends an rtsp stream when motion is detected. And it does not support anything but rtsp. From the previous comments I read that might not (yet) be supported if I understood correctly?

It’d be great to be able to use those cameras. For the time when they are offline, either the last sent picture could be shown or a “camera not active” placeholder.

Yes that would cause major issues for the binding. What happens if you try and open the RTSP stream with VLC both when there is motion and when there is none?

Depending on how it handles things it may need a custom standalone binding to cover that use case.

Found this post about someone working on a binding?

Hey @matt1

Problably something missing in Docker , yes

New build 2020-04-28 has new features for all cameras. Readme not yet updated but below info should be enough to get people playing…

  • Ability to set the gif filename to anything you wish, handy for timestamping the file. Use the String channel called gifFilename.
  • Ability to record to MP4 by setting a number channel called recordMp4 to how many seconds you wish to record. You can also set the filename with a string channel called mp4Filename. The channel will reset to 0 when the recording file is available to be used and this can trigger a rule if you watch for when it is set back to 0.

The above features are not tested much and only just added, consider them experimental. To get them working you probably have to clean cache and tmp and reboot multiple times as they are new channels. If you used paperUI to setup the camera, it will need to be deleted and re-added.

When I open the rtsp stream with VLC while the camera is active, it displays the video. As soon an the motion stops, the video stops as well (VLC seems to automatically disconnect). When I try to establish the connection while there is no motion, I only get an error message, no video feed at all. I don’t remember the exact wording, but it was like “service not available”, “resource not found” or something like that.

The binding you mention seems to be not a good fit:

  • It uses the web Eufy API (eufylife.com) instead of the available local rtsp stream
  • It currently is broken because the Eufy API is “only” reverse engineered. So using the officially available rtsp seems like a more stable approach for me.
  • It does not support the Homebase 1 and the eufyCam (yet?)

I understand that it might be possible to extend that Eufy Doorbell binding so that it works again and eveneually supports the eufyCam. But since I don’t need the other web API functions I would prefer being able to use a binding that just solidly gets the rtsp stream into openHAB when available :slight_smile:

It would be possible to get it running but IMHO it should be a separate binding I cant see any easy way to include it in this one. It would be valuable to have that as a battery powered camera that can work without a cloud and still work when you internet connection goes down is a valuable thing to have.

A few options if you cant change to a different camera that uses a wired connection which is what I think is the better option…

Check the thread out here. It may be possible to do this with a script that keeps polling the camera but I think you will still hit issues and it will need a dedicated binding.

Check into using older firmware which is know to be less secure and using that binding it may work?

If you cant code, you can help out with a bounty.

i tried this:
I left only one camera configured in things file and in the sitemap and I no longer had any warnings for 24 h.
Then I added the second camera and after 2 hours the follow warnings reappeared

2020-04-29 22:04:51.001 [WARN ] [io.netty.channel.nio.NioEventLoop   ] - Selector.select() returned prematurely 512 times in a row; rebuilding Selector io.netty.channel.nio.SelectedSelectionKeySetSelector@11b3db7.

2020-04-29 23:06:52.114 [WARN ] [io.netty.channel.nio.NioEventLoop   ] - Selector.select() returned prematurely 512 times in a row; rebuilding Selector io.netty.channel.nio.SelectedSelectionKeySetSelector@14e52af.

2020-04-29 23:06:52.125 [WARN ] [io.netty.channel.nio.NioEventLoop   ] - Selector.select() returned prematurely 512 times in a row; rebuilding Selector io.netty.channel.nio.SelectedSelectionKeySetSelector@146c4c3.

Jad

log_30_04_20.pdf (51.9 KB)

How do you do fellow kids?
After successfully implementing the Homematic-binding, I currently despair trying to get my Reolink RLC-410-5MP running.
State says

OFFLINE - CONFIGURATION_ERROR Camera failed to report a valid Snaphot URL, try over-riding the Snapshot URL auto detection by entering a known URL.

openhab.log says

blablabla We got an ONVIF error400
blablabla <SOAP-ENV:Envelope blablabla>Sender not Authorized</SOAP-ENV:Envelope>

Manually calling the ONVIF-website refers to a missing GET-implementation:

<SOAP-ENV:Fault>
SOAP-ENV:Client
HTTP GET method not implemented
</SOAP-ENV:Fault>

Where did I go wrong?

First make sure the Timezone and time is correct on both the camera and also openhabs server. The UTC time needs to match for onvif to work.

A work around that the binding is telling you, Give the binding the URL from here.

If that does not work you can over ride the snapshot URL to be ffmpeg to create the snapshots from the RTSP stream using ffmpeg after you install that program of course.

Readme covers all of this in more detail.

1 Like

Sometimes it may be worth looking through the thread to see, if others have already been there :smiley: The Reolink RLC-410 has been mentioned quite a few times in this thread. And lately I have posted my setup for this specific camera. Look a few messages back, (14 days back).
It will NOT work with Onvif. You need to install it as a HTTP only.

1 Like

Kudos! Excellent advice!
Works like a charm on first try!

New build 2020-05-04 has these changes, it is a big bug fix release mostly for ONVIF cameras without an API:

  • ONVIF fix as snapshot urls where getting wrongly reported as having http in them twice.
  • Fixes for setting the snapshot to use ffmpeg not being reliable.
  • Fix bug that caused multiple connections when the binding soft restarted.
  • Better logging to guide users that miss or enter wrong details.
  • Fixed slow ONVIF reply back from camera stopping rtsp features from working.

Testing a lot of features at the moment for bugs after a lot of changes to make the binding closer to being merged may have broken things. If you upgrade from older versions and notice something stopped working please post as there are so many combinations to test.

FYI, Some useful tools for cheap cams:


Hi,
Have just setup a Foscam 9928P and having some problems with PTZ.
The ipcamera:FOSCAM:foscam:gotoPreset channel is of type number but the camera is expecting a string. It works ok using the cgi method.
http://CAMERA_IP:PORT/cgi-bin/CGIProxy.fcgi?cmd=ptzGotoPresetPoint&name=<PRESET_NAME>&usr=USR&pwd=PASS

The binding produces the following error:
2020-05-04 10:59:53.271 [WARN ] [ui.internal.items.ItemUIRegistryImpl] - Exception while formatting value ‘front’ of item CameraPreset with format ‘%.0f’: f != java.lang.String

The binding does not use the CGI method, it uses ONVIF methods to move. If you want me to look at it, please send some DEBUG level log when the camera is connecting and it should have a heap of long XML looking replies in it, send this in a private message and do a find / replace on your password to remove it.

@Sascha_
The binding has most if not all of those abilities already built in and done in java in hopefully a seamless experience for a user with no scripting knowledge. Thanks for the heads up on them thou as it is always good to know.

I have an idea to a system for my mailbox. My mailbox accepts medium packages. I would like to receive a notification of received mail with time stamp and a snapshot with a camera to know if they are letters or packages.

With a motion detector, turns on the camera power and take a photo. After that send the notification.

I’m looking for a cheap ip camera with IR for it. The Reolink can work, right? Reolink D400 45eur camera?

Yes it can work as others have posted other models of Reolink as working, however read the first post of this thread for what extra functionality you get with any brand that has a API supported by the binding. You probably wont want them in your mailbox but if you shop around it does not cost a lot to get a camera with an API.

@matt1

Does the thing parameter POLL_CAMERA_MS only affect the frequency of the snapshot being updated from the camera or does it also affect, how often a camera is checked for alarm state in general?

Or in other words: if i increase POLL_CAMERA_MS to let’s say 5000ms, do i only receive an update of my alarm items every 5s?

That depends on the brand of camera as some cameras use EVENT based alarm streams instead of the need to poll. Amcrest, Dahua, Doorbird, Hikvision and Instar all use events so they don’t change how the alarms act when the poll time changes. However if the stream closes due to a network issue, then the stream will be closed until the next poll time where the stream will get reopened.

If your using the ffmpeg based motion or audio alarm, it also does not rely on the poll time.

The only camera that would is Foscam.

1 Like