I own a camera Axis1034W, I created an event in the camera to emit a sound with this address:
http://192.168.1.xx:xx/axis-cgi/io/virtualinput.cgi?action=6:/ is used to activate
http://192.168.1.xx:xx/axis-cgi/io/virtualinput.cgi?action=6:\ is used to deactivate
if I write this address in firefox it works, the camera emits sound so the event that I created works.
But if I create a "Dummy" and in the "Dummy" I create a interuptor I I call "on_off_cam" if I click on the button, nothing happens.
-------------------------------------------------------------------
I then read the documentation .lua https://www.domoticz.com/wiki/LUA_commands
and I saw this ... commandArray['OpenURL']='www.yourdomain.com/api/movecamtopreset.cgi'
I tried to make this script
And the same for "off" with http://192.168.1.99:99/axis-cgi/io/virt ... i?action=6:\'commandArray = {}
if (devicechanged['fgms001'] == 'On' then
commandArray['OpenURL']='http://192.168.1.99:99/axis-cgi/io/virt ... i?action=6:/'
end
return commandArray
The log return :
the difference between these two lines is / and \ I have to put it is this that on or off control2016-01-06 00:31:23.226 Error: EventSystem: /home/pi/domoticz/scripts/lua/script_device_cam_off.lua:3: ')' expected near 'then'
2016-01-06 00:31:23.231 Error: EventSystem: /home/pi/domoticz/scripts/lua/script_device_cam_on.lua:3: ')' expected near 'then'
I do not know how to settle this problem.
My goal is that the camera emits a sound when the sensor is triggered FGMS001.
Thank you for your help and even desolated for translation.