request http camera to Axis1034w not working.

Moderator: leecollings

Post Reply
optik8
Posts: 6
Joined: Tuesday 05 January 2016 23:59
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

request http camera to Axis1034w not working.

Post by optik8 »

Hello First I apologize for my English translated by Google.

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"
dummy anglais.png
dummy anglais.png (310.72 KiB) Viewed 2155 times
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
commandArray = {}

if (devicechanged['fgms001'] == 'On' then
commandArray['OpenURL']='http://192.168.1.99:99/axis-cgi/io/virt ... i?action=6:/'
end
return commandArray
And the same for "off" with http://192.168.1.99:99/axis-cgi/io/virt ... i?action=6:\'

The log return :
2016-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'
the difference between these two lines is / and \ I have to put it is this that on or off control

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.
JuanUil
Posts: 497
Joined: Friday 22 May 2015 12:21
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.11083
Location: Asten NB Nederland
Contact:

Re: request http camera to Axis1034w not working.

Post by JuanUil »

Hi,

you should:
if (devicechanged['fgms001'] == 'On' then
change in:
if (devicechanged['fgms001']) == 'On' then
so one ) more.

succes!!
Jan
Your mind is like a parachute,
It only works when it is opened!

RPI4 several Fibaro, KaKu, Neocoolcam switches, Z-Wave, Zigbee2Mqtt, Ikea bulbs and remote, Zigbee temp nodes
optik8
Posts: 6
Joined: Tuesday 05 January 2016 23:59
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: request http camera to Axis1034w not working.

Post by optik8 »

Thanks for your help. Is Google translation correct?

I redid the two scripts like this:

For On;
commandArray = {}

if (devicechanged['fgms001']) == 'On' then
commandArray['OpenURL']='http://192.168.1.99:99/axis-cgi/io/virt ... i?action=6:/'
end
return commandArray
For Off:
commandArray = {}

if (devicechanged['fgms001']) == 'Off' then
commandArray['OpenURL']='http://192.168.1.99:99/axis-cgi/io/virt ... i?action=6:\'
end
return commandArray
the log says:
2016-01-06 08:35:38.439 Error: EventSystem: /home/pi/domoticz/scripts/lua/script_device_cam_off.lua:4: unfinished string near ''http://192.168.1.99:99/axis-cgi/io/virt ... i?action=6:''
only for the "Off" But it is still not working.

I also feel I should put the login and password of the cam? but I do not know how.
JuanUil
Posts: 497
Joined: Friday 22 May 2015 12:21
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.11083
Location: Asten NB Nederland
Contact:

Re: request http camera to Axis1034w not working.

Post by JuanUil »

In the on action you end te line with /' and in the off action with \'
Your mind is like a parachute,
It only works when it is opened!

RPI4 several Fibaro, KaKu, Neocoolcam switches, Z-Wave, Zigbee2Mqtt, Ikea bulbs and remote, Zigbee temp nodes
optik8
Posts: 6
Joined: Tuesday 05 January 2016 23:59
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: request http camera to Axis1034w not working.

Post by optik8 »

JuanUil wrote:In the on action you end te line with /' and in the off action with \'
yes I do like that.
optik8
Posts: 6
Joined: Tuesday 05 January 2016 23:59
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: request http camera to Axis1034w not working.

Post by optik8 »

but it does not work...
optik8
Posts: 6
Joined: Tuesday 05 January 2016 23:59
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: request http camera to Axis1034w not working.

Post by optik8 »

Then I have news ...
With .lui but I can not do it by creating a scenario, I can access the sound file from my camera and play.
I pass your hand over the motion detector
the fact scenario LED strip light a red and 7 seconds after the sound of my camera resounded.

Here's the scenario:
scenario intrus garage.png
scenario intrus garage.png (310.67 KiB) Viewed 2081 times
I put the first red LED strip light for 20secondes, then Requette "Off" for the camera to start from zero and finally the Requette "On" for the sound that starts 7 seconds after the outbreak of the detector.

I am looking for help to create this szene .lua script but I do not know if I can choose the color of the LED strip

Merci de votre aide.
Eric
optik8
Posts: 6
Joined: Tuesday 05 January 2016 23:59
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: request http camera to Axis1034w not working.

Post by optik8 »

I find the good script !
commandArray = {}

if (devicechanged['bouton_intrus']) == 'On' and otherdevices['rgbw_rgbw'] == 'Off' then
commandArray[1]={['OpenURL']='xxx:[email protected]/axis-cgi/io/virtualinput.cgi?action=6:/'}
commandArray[2]={['OpenURL']='xxx:[email protected]/axis-cgi/io/virtualinput.cgi?action=6:\\'}



end
return commandArray
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest