JSON - Can't Change Profile

rfj

Pulling my weight
Joined
Oct 26, 2014
Messages
402
Reaction score
117
I am trying to change the profile of a cam via JSON. I did do the login which seems to be successful. I then send the following command where Cam166 is the short name of the camera for which I want to change the profile to 3 (I also tried "profile":"Profile 3").

{"cmd":"camconfig","session":"6662554e35523c771851509a72537f2e","camera":"Cam166","profile":"3"}

It looks like I get a valid response but the profile hasn't changed and in the response it does say profile is 1. So it looks like I get the current status rather than changing the profile. Any idea why this doesn't work?

{"result":"success","session":"6662554e35523c771851509a72537f2e","data":{"enabled":true,"profile":1,"lock":0,"pause":0,"push":false,"audio":false,"motion":true,"schedule":false,"ptzcycle":false,"ptzevents":false,"alerts":0,"output":false,"setmotion":{"audio_trigger":false,"audio_sense":10000,"usemask":true,"sense":8500,"contrast":40,"showmotion":1,"shadows":false,"luminance":false,"objects":true,"maketime":5,"breaktime":100},"setpost":{"timed":true,"timed_interval":10},"record":2}}
 

rfj

Pulling my weight
Joined
Oct 26, 2014
Messages
402
Reaction score
117
Turns out the value for profile needs to be a number rather than a string. Now it works.

{"cmd":"camconfig","session":"15d8489728767d9525700ab22f136e94","camera":"Cam166","profile":4}
 
Top