[SOLVED] Tenvis JPT3815-HD IP camera IR filter switch by Openhab

Just in case someone else out there is trying to solve the same issue: I wanted to manually trigger the IR-cut filter on my IP cam, which needs authentication and so I went into experimenting a lot and ended up with a fairly easy solution.
Just create a switch in the Items file, then in the rules file monitor its value (when Item yourswitch changed)
If it’s ON (IR needed)

sendHttpGetRequest("http://ip:port/cgi-bin/hi3510/param.cgi?cmd=setinfrared&-infraredstat=open&usr=username&pwd=password")

If it’s OFF (not needed)
sendHttpGetRequest("http://ip:port/cgi-bin/hi3510/param.cgi?cmd=setinfrared&-infraredstat=close&usr=username&pwd=password")