Notes and changes to Foscam CGI documentation v. 1.0.4:
=======================================================

getWifiConfig:
- is admin only
- result of PSK is urlencoded (since 1.11.1.18, I think)

snapPicture2
- max. pic size is 512000 bytes
  Workaround: decrease quality setting, or use snapPicture and follow the link

getPTZspeed/setPTZspeed
- contrary to doc: 0: very fast, 4: very slow

ptzAddPresetPoint
- additional result field:
  - addResult     2: point already exists

ptzDeletePresetPoint
- additional result field:
  - deleteResult  1: point does not exist
                  4: point not deleted (used in cruise)

ptzDeletePresetPoint
- additional result field:
  - delResult  1: cruise does not exist

setOSDSetting
- parameter `isEnableOSDMask` not working

setOSDMask
- undocumented CGI call
- parameter: isEnableOSDMask

getOSDMask
- undocumented CGI call
- same reseult as getOSDSetting


OSD masks:
- The dimensions use by masks seem to be 1/10000 of the picture width/height.
- Does not work with snapshots.

importConfig
- undocumented return parameter: importResult

setAlarmRecordConfig
- check return result: -1 = error
- preRecordSecs seems to be limited to 5
- alarmRecordSecs seems to be limited to 60

getLog
- call without parameters returns position 1..10
- IP address is stored in little Endian (NOT the normal network order)
Log type:
  0 System startup
  1 ?
  2 ?
  3 Login
  4 Logout
  5 User offline

getPortInfo
- additional result: onvifPort

setPortInfo
- additional parameter: onvifPort (default 888)

xxxSMTPConfig
- Note: Misspelling: "reciever"

smtpTest
- additional parameter "errorMsg"

setSystemTime
- it seems you can set everything
- note sign change in the time zone: GMT+1 = -3600
