I am trying to control my Foscam ip camera from Openhab, but no success so far. IP camera has a SDK it says the formation rule to control it as it goes:
http://<mycameraip>/decoder_control.cgi?command=[&next_url=]
Parameters
value / description
0 / up
1 / Stop up
2 / down
3 / Stop down
4 / left
5 / Stop left
6 / right
7 / Stop right
I created a camcontrol.items such as (only up command for example purpose):
Switch up "Up" { http=">[ON:POST:http://<mycameraip>/decoder_control.cgi?command=0&user=admin&pwd="] }
And sitemap such as:
Switch item=up
Though, I am not sure if this is the right way to do it. Maybe I should use Setpoint instead of the Switch? So far, I had no success controling it.
Hi,
I know this is an old post, but I wanted to do exactly the same thing with what is probably the same or similar camera, and I just succeeded.
You were very close to the solution; you just need to add basic HTTP authentication and you are done. You can also remove the user and pwd parameter from the request as they serve no purpose in this case.
So a Switch item would look like: