Greetings!
So, I just finished installing the Swann 4K Floodlight (SWIFI-4KFLOCAM) today after much dissatisfaction with a couple other floodlight cameras, and although this camera isn’t perfect, it provides a solid rtsp stream, usable human detection, decent image quality (not quite comparable to indoor 4k cameras, but I wanted a drop-in replacement for a junction box mount), and best of all… its app communicates to the camera via REST API!! As a programmer, this is like hitting the jackpot.
To trace camera traffic, simply use something like Fiddler Classic, point your mobile connection to the Fiddler proxy instance on your machine (https decryption is not even needed - traffic occurs over http), and go from there.
Use postman to test requests, then HA rest_commands to control the camera and floodlight.
I’m still experimenting, but it appears most of the functionality occurs using the “setMediaConfig” endpoint.
Example:
curl --location --request POST ‘http://camera.ip:85/API10/setMediaConfig’
–header ‘Content-Type: application/json’
–data ‘{
“Light”: 0
}’
curl --location --request GET ‘http://camera.ip:85/API10/getMediaConfig’
–header ‘Content-Type: application/json’ \
Response:
{
“Live Video Quality”: 3,
“Image Mirror”: 0,
“Image Flip”: 0,
“Video Environment”: 60,
“Video Environment Mode”: 2,
“Mic Volume”: 50,
“Speaker Volume”: 85,
“Light”: 0,
“Light On Motion”: 1,
“Light On Motion Duration”: 120,
“Light On Manual Duration”: 120,
“Siren”: 0,
“Siren On Motion”: 0,
“Siren On Motion Duration”: 0,
“Siren On Manual Duration”: 120,
“Enforcer”: 0,
“Enforcer On Motion”: 0,
“Enforcer On Motion Duration”: 30,
“Enforcer On Manual Duration”: 30,
“Light Intensity”: 100
}