Release Foscam HD - Video feed with camera controls, and motion/sound detection preview
Solved the low level mic issue using the volume amplification setting in OSD!!! works like a charm!

Unfortunately there is no API call to set the volume amplification, so the only way we can automate this at launch time is using json rpc.

For whatever reason, the json python library, mainly the underlying is urllib2 is hanging when calling GUI.ActivateWindow, so instead I went the ugly route and used requests with a timeout set to 0.1

Here is an ugly quick code with no error checking, but you can get the idea. I will clean it up and send a pull request.

Code:
import requests
try:
    response = requests.get('http://192.168.1.134:8080/jsonrpc?request={ "jsonrpc": "2.0", "id": 1, "method": "GUI.ActivateWindow", "params": {"window": "osdaudiosettings"}}', timeout=0.1)
except:
    requests.get('http://192.168.1.134:8080/jsonrpc?request={ "jsonrpc": "2.0", "method": "Input.ExecuteAction", "params": { "action": "down" }, "id": 1 }')
    for x in range (1, 30):
        requests.get('http://192.168.1.134:8080/jsonrpc?request={ "jsonrpc": "2.0", "method": "Input.ExecuteAction", "params": { "action": "right" }, "id": 1 }')
    requests.get('http://192.168.1.134:8080/jsonrpc?request={ "jsonrpc": "2.0", "method": "Input.Back", "params": { }, "id": 1 }')
Reply


Messages In This Thread
RE: Foscam HD - by George - 2014-03-27, 17:30
RE: Foscam HD - Video feed with camera controls, and motion/sound detection preview - by danillll - 2014-11-20, 08:06


Logout Mark Read Team Forum Stats Members Help
Foscam HD - Video feed with camera controls, and motion/sound detection preview1
This forum uses Lukasz Tkacz MyBB addons.