5 ms·
Managing and using ONVIF IP cameras with Linux
- pabs3 4y agoI wonder how many security cameras run Linux and how many of them are actually GPL compliant, or at least possible to hack due to vulnerabilities in the ancient Linux and then update to a modern Linux distro.
- user3939382 4y agoIf you're not familiar with this technology, do yourself a favor and be 100% sure any cameras you buy use this protocol.
- jeffdubin 4y agoAlso check that the camera doesn't rely upon a proprietary configuration tool, e.g. a Windows-only IE plugin, and that the camera doesn't need internet connectivity to function. Some cameras will stop streaming, even locally, if they can't hit the manufacturer's cloud-based platform.
- brnt 4y agoMy problem is that this protocol is only for video. These camera's are used for motion detection, and I know of no way of receiving that signal unless you mimick it by setting up your own software monitoring the stream 24/7. I think we can agree that this is a huge complication compared to installing 'the app'. For the two way voice chat, alarm and in some cases flood light and pan/zoom controls there is no substitute at all.
- monsecchris 4y agoOnvif motion detection events can be received over pullpoint or rtsp metadata.
- brnt 4y agoHmm, last i checked whatever Home Assistant comes with (and integration for some other tool) did not support that. Also, all the TPlink devices I have have their IP feeds capped at an hour, and there was no good way to reinit the stream. Maybe that's changed?
- rubenbe 4y agoI'd choose Home Assistant to use these ONVIF cameras on Linux. It's arguably less elegant, but will probably be better maintained. https://www.home-assistant.io/integrations/onvif/ https://www.home-assistant.io/integrations/onvif/
- kfghjkfhjgjkl 4y agoThe ONVIF component in hasio is likely to be better maintained than Zoneminder's?. This seems like a bold statement to make in either direction. ZM has been alive and actively maintained for nearly twice as long as Hasio..
- _ea1k 4y agoI'm surprised to see zoneminder mentioned, but no mention of shinobi.
- kfghjkfhjgjkl 4y ago
- ranger_danger 4y agoMy experience so far with every wifi ONVIF camera I have purchased (at least half a dozen different brands) has been absolutely terrible. Not sure if it's all related to the hardware or just FOSS software support somehow. They seem to all use the same generic/white label Chinese firmware with barely anything changed about it. Their advertisements of "up to X viewers" really only ever means max of 1 or maybe 2 if you want a decent/max resolution or framerate. The devices and their video streams are often quite unstable (needing a daily reboot or restart of the stream), jittery and not smooth. The cost of the device does not seem to make a difference either, whether it's a $50 device or $300+. Anyone have recommendations or tips on either better brands or maybe some idea of what I might possibly be doing wrong?
- jonathanberger 4y agoHave you tried Amcrest?
- ranger_danger 4y agoYes that is what I am currently using. Every couple days the stream stops functioning and I have to reboot it. Stream playback with every conceivable FOSS video player I have tried is never 100% smooth and always has some kind of microstutter, regardless of the codec, resolution, framerate, bitrate, stream protocol etc. or number of viewers (and I have tried every combination of them all).
- js2 4y agoI've been using an Amcrest AD410 doorbell camera with HomeKit Secure Video via Scrypted for about a month and I haven't had any trouble with it at all. https://www.scrypted.app/ https://www.scrypted.app/
- rnk 4y agoWyze cameras are cheap and work pretty reliably for me. They don't support onvif. I'm sure it's because they want you to subscribe to their paid services that analyze the video feed. I want the quality and cheapness and reliability of wyze with onvif.
- pedrocr 4y agoIP cameras need their WRT54G moment. It would be amazing to have an openwrt like project for them. The software is a complete mess full of bugs and security issues.
- ajsnigrutin 4y agoYep... the only alternative I know is a raspberrypi zero with a motioneye os, but this makes a good camera software-wise but a shitty one regarding the sensor (high megapixel but shitty night quality) and a shitty one regarding accessories (waterproof casings, poe, ir lightning, microphones, speakers,...).
- invalidator 4y agoThe RasPi kinda is that, at least when they're in stock. There are several IP camera software loads for them, whether it's for local storage, or streaming over the network.
- scottlamb 4y agoAgreed. https://github.com/OpenIPC https://github.com/OpenIPC looks promising in concept but obviously hasn't reached OpenWRT's level of success. On the NVR side, I'm slowly working on it, including https://github.com/scottlamb/moonfire-nvr https://github.com/scottlamb/moonfire-nvr and https://github.com/scottlamb/retina https://github.com/scottlamb/retina . Help welcome!
- monsecchris 4y agoMy software https://monoclesecurity.com https://monoclesecurity.com has all the features being asked for here and was open source for years but i couldn’t get any financial support. It’s probably a bit late now but if some particularly generous people came along I would open source it again.
- pedrocr 4y agoNVR is a different problem. I meant the software inside the IP cameras themselves.
- geijoenr 4y agoThe market for security cameras is very old fashioned and plagued with proprietary implementations. ONVIF is the standard that allows interoperability with desktop Video Management Systems and other devices, is the protocol that allows to glue together end to end systems. Some alternatives are starting to appear, but this is an industry that moves really slow. Things only seem to happen when a new player disrupts the market and starts taking market share, as AXIS did with cheap IP cameras back in the day.
- LinuxBender 4y agoI don't know how complete it is, but this site [1] claims to verify which cameras are truly ONVIF compliant as apparently some companies make false claims about their cameras or gatekeep some ONVIF functions. [1] - https://www.onvif.org/conformant-products/ https://www.onvif.org/conformant-products/
- scottlamb 4y agoThe ONVIF SOAP APIs aren't really that important IMHO. They're mostly used for configuration. Configuring your camera is something you do rarely, and if you have to put up with some crappy web interface, proprietary plugin, or Windows-only desktop software for it, oh well. The most important part is getting the video. The popular open standard is RTSP. Many cameras have astonishingly poor RTSP implementations. See https://github.com/scottlamb/moonfire-nvr/wiki/Cameras:-Reolink https://github.com/scottlamb/moonfire-nvr/wiki/Cameras:-Reol... for some of what I'm talking about. That ONVIF page (https://www.onvif.org/conformant-products/ https://www.onvif.org/conformant-products/) says everything is fine for several Reolink models, but I don't believe it! After that would be some way to get the analytics, assuming the camera has them and they're any good. If the ONVIF API works well, great, but a proprietary API isn't that bad IMHO as long as it's simple.
- LinuxBender 4y agoproprietary API isn't that bad My opinion differs a little bit. If I buy a PTZ I know some here think those are a waste I expect to be able to control it from an open source application. If I can control all aspects of PTZ audio and video then that is good enough for me, but may not be good enough for others.
- acidburnNSA 4y agoI used this to get a USB gamepad joystick to control a amcrest camera. Super fun. Then I hooked it up to my roofcam, but that's another story. https://partofthething.com/thoughts/controlling-a-amcrest-ptz-camera-with-a-joystick/ https://partofthething.com/thoughts/controlling-a-amcrest-pt...
- devnulll 4y agoI have high-end security camera's all over the exterior of my house. They all run a Linux 2.6 Kernel that is froom 2011. There are no firmware updates available from the manufacture, and even their new camera's run this kernel. If I could find a brand that actually did regular maintenance and wasn't a walled garden (such as Ubiquity), I would replace all of my camera's. Security comes from networking tricks (VLAN's, etc), which is far from ideal.
- willis936 4y agoWell, raspberry pis have a CSI port and is based off a recent debian release. If you want something newer than raspberry pi os then you can run debian or arch with a cron job to update and reboot. Not pretty, not reliable, but surely more secure. Though the best thing is to air-gap or at the least firewall.
- DrPhish 4y agoBosch are the only ones I’ve found that have full chain of custody on all parts of the camera I wouldn’t discount network tricks, tho. A non-routed vlan for cameras to talk to the nvr and all video access through the nvr only keeps cameras pretty safe. Much easier to secure one nvr than 100 cameras
- rektide 4y agoHard days that those interested in trying to DIY with an RPi or RPi0 just can't, that there's no parts available. There's some various other boards we could possibly use. Few are small. Many lack CSI interfaces for attaching cameras. And then, for your outdoor use, ruggedizing is another huge leap.
- maven29 4y agoSurely you could get android phones and a type-c PoE adapter for cheaper?
- rektide 4y agoI like the idea! There's some IP webcam apps. For some simpler needs, there's the Guardian Project's Haven[1]. Alas though, you'll still be stuck with a device that only lasts 3 years before it's insecure. I'm in the minority, but personally I'd rather a more open ended & flexible system like Linux, with more small-pieces-loosely-coupled possibilities in front of me, where-as with Android I'm going to have 2 or 3 different apps with pretty fixed/limited capabilities that I'll never be able to improve or adjust. In some ways, the web is kind of the possible remedy here. If the phone runs a webpage that accesses the camera & webrtc & does the things, that'd kind of be ideal, because it's insta-deployable to any vaguely general-purpose hardware. Developing the webrtc chops though to be able to make use of this well though, that's a totally separate conversation. [1] https://guardianproject.info/apps/org.havenapp.main/ https://guardianproject.info/apps/org.havenapp.main/
- patchtopic 4y agoI have been setting up a low cost home IP camera solution recently as well. I have also found like others mention, although some of the hardware is OK, on the software side all IP cameras that I have looked at are garbage. hacky linux firmware, needing apps and cloud accounts to config, etc. I also found zoneminder and shinobi not that great either, I've ended up with a "simpler" setup using the basic "motion" Linux motion detect program, and using Jellyfin to view the video files created. So far the "least worst" of the low cost IP cameras I have tried have been TPLINK TAPO.. once they are configured for onvif and IP set by tying to mac address, they can be blocked from the internet access at the firewall and work fine standalone. The only non-TPLINK app I have found that can work with the PTZ mode of the TAPO C210 is the proprietry ONVIER android app.
- nickstinemates 4y agoAre there any hackers out there making custom ones? I was designing one recently and it ended up looking a lot like an Android phone in the end. Maybe a better 3d printed case and powered by PoE instead of battery. How hard could it be?
- pabs3 4y agoThere is a Python ONVIF module here too: https://github.com/FalkTannhaeuser/python-onvif-zeep https://github.com/FalkTannhaeuser/python-onvif-zeep
- egberts1 4y agoI prefer a camera that has the following features for highest security: - wired Ethernet (POE is nicer) - no WiFi nor Zig - speaks ONVIF - ruggedized - 4K - powerful infrared LEDs Cannot believe one does not exist.
- egberts1 4y agoSeems like I've found one. Still not FOSS. https://www.hanwhasecurity.com/product/xnd-9082rf/ https://www.hanwhasecurity.com/product/xnd-9082rf/
- TreeInBuxton 4y agoI use Reolink RLC-810 cameras for this purpose, seem to tick your boxes - on their own VLAN isolated away from everything, and I just pull in the streams via RTSP - firmware updates can be uploaded via the camera Web interface. I wouldn't call then "ruggedized", but I live on a fairly remote farm that definitely gets hit hard by the weather, and they have survived just fine.
- egberts1 4y agoSo close, so close. Not quite at the "TAKE MY MONEY" point yet.
- scottlamb 4y agoThat exists, but AFAIK the list drops down to nothing again if you add: 1. manufacturers don't actively support genocide (rules out anything involving Dahua, Hikvision, Huawei, as IPVM has described extensively), are allowed in the US (look up the Secure Equipment Act of 2021) 2. has a nice large sensor (the 1/1.8" models are great, but see point 1) 3. supports open source firmware (none of them do AFAIK) 4. reasonably affordable (surprisingly, this part is not the biggest problem) 5. nice-to-have: has an NPU for on-camera analytics (there are cameras with this but mostly from the genocidal manufacturers...) The best I've got is GeoVision. No open-source firmware, sensors aren't as large as I'd like, no NPU, but relatively decent otherwise. https://github.com/scottlamb/moonfire-nvr/wiki/Cameras:-Geovision https://github.com/scottlamb/moonfire-nvr/wiki/Cameras:-Geov... edit: actually, some of these 6MP Hanwha cameras look promising. Several say they have 1/1.8" sensors. Not cheap though, and no eyeball/turret form factor.