(obviously change 192.168.1.19 to your own IP address)
The image takes about 4-5 seconds to appear once you click on it (I guess because ffmpeg has to start and then connect), but the frame rate is exceptional on my Raspberry Pi 3B.
I might end up offloading the camera stream to an NVR so I can do recording etc., but it works as-is, so I’m happy.
No idea unfortunately. Once I realized I didn’t need Swann’s app (I set up the camera then immediately started looking for a stream from my PC), I unpaired my camera. If I need to change settings, I’ll need to re-pair the camera.
But my suggestion would be to tweak the motion detection settings in the options for the Swann app and see if you can set it low enough to trigger.
Sorry to ask a silly question. I am very new to Hass. got my first setup running yesterday.
I have added the lines to my config file. Can you tell me how do I use it in the UI please. Or maybe you can point me to the right place.
Thank you so much for the well explained reply.
I added the code that you had recommended but I am not able to see the feed.(of course with the proper ip)
I was wondering how would it stream the feed without the mention of the username and password in the code.
I have the Swann floodlight camera
You shouldn’t need a username and password to view it. You might need to set up ffmpeg though. You might also want to check that the RTSP stream actually exists. I suggest downloading VLC, going to Media > Open Network Stream and pasting in the address (e.g. rtsp://192.168.1.19:8282/) and seeing if you can view the streatm from there.
I ended up setting up my two cameras with ZoneMinder which does recording. Once I added the ZoneMinder integration to HA, any new cameras just show up as entities I can add to the front-end.
Just a quick note for anyone who has one of these cameras: I believe Swann has forced an update on the camera, and now the high-res RTSP stream no longer works. The best you can now access (as far as I’m aware), is a lower resolution stream. The URL is now rtsp://xxx.xxx.xxx.xxx:554
This is all very strange, as I disconnected my camera from my Swann account about a year ago and set up PiHole to block all traffic to and from Swann because it was still phoning home (which is alarming). It’s only after the “you must update to keep your cameras working” nonsense that this happened.
Why is it impossible for me to own a modern camera that is wireless, doesn’t force me to pay for a subscription or use some poorly built app?
UPDATE! So I got my camera to output a 1080p stream again. And here’s what you need to do to do it. It definitely works with the SWWHD-OUTCAM, and might work with the SWWHD-INTCAM too:
Download something like Postman, or use Hoppscotch.io or wget or something like that.
Send a POST request to http://your.camera.ip.address:85/API10/setMediaConfig with the application/json as the Content-Type, and the following payload:
{
"Live Video Quality": 4
}
Then you’ll be able to view the RTSP stream at rtsp://your.camera.ip.address:554/ and it’ll be 1080p.
Interestingly, the Swann Security app only lets you set Live Video Quality to 1, 2 or 3. There is no 4
Hey did this work if the camera is paired to the app? Or does it need to be removed from the app to send the post? Mines seems to not be getting the posts either way.
I’ve got it paired because I’m still decompiling the app and seeing what else I can fetch (hopefully motion events), but I suspect it’d still work unpaired. In fact, I’m wondering if you can set up the camera without needing the app at all, by connecting to the hotspot and issuing commands to join the device to your wifi.
What sort of camera do you have, and how are you sending the commands to it? The port may be different on different cameras, I’m not sure, as I just decompiled the Android app and looked for getUrl calls which takes two parameters, the URL to get, and the port to try. The port is determined by some other routine which I didn’t bother looking at (I just discovered port 85 while looking through some logs I got with PCAPdroid)
Try using Postman, as I tried Hoppscotch with the browser extension, and it still didn’t work. Even after I added my local IP address as an origin, it still wouldn’t work.
I’ve actually ordered 2 SWWHD-INTCAMs from eBay, so when they arrive, I’ll double check the port (if I get to it before you do). Apparently they’re not pairing with the app, so I might need to do some research, and possibly see if I can set them up without needing the app.
I can get the rtsp feed up on VLC, google home and numerous other simple RTSP viewers. But for the life of me I’ve had no luck with tinycam pro (andriod) & blueiris. I’ve got a sneaking suspicion that Swann have programmed the camera to ignore RTSP requests based on the ‘User-Agent’ property of certain mainstream video surveillance software most likely to encourage usage of their paid cloud service. I assume they reluctantly had to enable RTSP to ensure compatibility with Alexa & Google Home.
David, do your cameras timeout streaming live to HA or zoneminder?
My SWWHD-INTCAM times out after 5 minutes no matter what program I use and this is only possible by either keeping the swann app open on liveview or by sending a /API10/keepAlive request (the camera ignores any keepalive request that extends beyond 5 minutes from when the stream first commences).
The camera’s firmware appears to limit streaming to 5 minutes even when using the swann app.
My camera doesn’t time out, but I only have the OUTCAM which is mains-powered. My INTCAMs should be arriving some time next week, so I’ll be able to test.
But looking at the decompiled Swann app, it looks like /API10/keepAlive also accepts a duration, so perhaps try sending something like this?:
{
"duration": 1200
}
Which would (hopefully) keep it alive for 1200 seconds (20 minutes)
If your camera isn’t plugged in via mains power, your camera is gonna take a pretty big battery hit, because I guess the 5 minute limit is for power conservation purposes.
Speaking of power conservation, one of the things I plan to do is use the REST sensor in Home Assistant to poll the camera once a day for the battery level (and give me alerts when they need to be charged). If that sounds useful to you, I could share my YAML once I get it working. I suspect a call to /API10/getSystemConfig would give me that data… hopefully.
Yes that is correct you specify the “duration” but no matter how long I specify, my intcam will only remain alive for a maximum of 300 seconds (5 minutes) regardless of whether it is plugged on or not. Ie. If I send a duration of 1200 seconds as soon as I connect to the camera it would return a keepalive value of 300 seconds. If 60 seconds had already elapsed since the camera woke up and I send the same command for 1200 seconds (or anything greater than 240 seconds) the camera would simply return a value of 240 seconds (being the remainder of the maximum 300 seconds allowed per wake session).
The outcam firmware must be different if its mains powered.