I can trigger virtual input via browser line:
I would like to use this in a rule (item JA65 is a contact)
rule “ALARM ARMED ON”
Item JA65_Home changed from CLOSED to OPEN
sendMail(“email@example.com”, “Home ON”, “OpenHAB2.”)
rule “ALARM ARMED OFF”
Item JA65_Home changed from OPEN to CLOSED
sendMail(“firstname.lastname@example.org”, “Home OFF”, “OpenHAB2.”)
Email are sending correctly, but the http request is not working.
Get, Put, Post … nothing OK
Request should set/reset virtual input 1 of the camera.
Any suggestion ?
Try setting the HTTP binding to debug and see what comes up in the log. Maybe a permissions issue?
Is this correct for DEBUG for http binding ?
- Open with Putty SSH connection OH2IP Port:22, user:pi pw:mypw
- sudo su
- ssh -p 8101 openhab@localhost PW:habopen
- log:set DEBUG org.openhab.binding.http
- log:list shows org.openhab.binding.http | DEBUG
- log:display or log:tail
Camera access is password protected. Is it necessary to insert user and pw to the sendhttp ?
On DEBUG I can`t see lines according Axis statement
After lot of testing I can use http statements directly via browser input
Camera event is triggered via virtual input 1 from windows firefox and pri firefox
Set virtual input 1:
Reset virtual input 1:
But above rules without success :0(
Also tested on received command with ON/OFF case
curl on RPI3 Raspbian
root@raspberrypi:/home/pi# curl http://192.168.100.9/axis-cgi/virtualinput/activate.cgi?schemaversion=1&port=1
This server could not verify that you
are authorized to access the document
requested. Either you supplied the wrong
credentials (e.g., bad password), or your
browser doesn’t understand how to supply
the credentials required
Also same if I put valid user:password before IP
Maybe a openhab script would be better. Can someone me help with script ?
Thanks for help.
This solves my CURL problem. No ’ single quotas and all spaces to @@ and --anyauth (avoid authorisation problem)
curl statement should be as a string without spaces and ’
On Axis cameras FW>5.50 are virtual inputs 1-32 as event trigger possible.
anybody knows how is possible to get info about motion detection status (not stream, picture) to set some flag and switch some rule with this flag (switch) ?