Page 1 of 1

snapshot function debug

Posted: Thursday 14 February 2019 18:07
by pvklink
Hi, suddenly my snapshotscript does not send email/pictures anymore...
no errors in the logging...
and when i do a domoticz EMAIL (TEST) i do receive an email immediatly...
any suggestions?
When i check the setting in domoticz /cameras, in the past i could click "take picture" then then a download of the picture started,,, now i get a white screen. Stream video never worked for me and now this functionality works!
Is something changed in the camera environment ?

Code: Select all

return {
	on = {devices = {'Neemfoto'}},    

    logging =   { level   = domoticz.LOG_DEBUG ,                  -- Uncomment to override the dzVents global logging setting
                  marker  = "Security"},
	
    execute = function(dz, device, info)

local cameraID  = 1
local cameraNAME  = 'pvkcam'
local interval  = 1  -- seconds between repeats  
local repeats   = device.state
local domenv    =  dz.settings.location

for i = 0,(repeats - 1) do 
    dz.snapshot(cameraID,"Foto (" .. i+1 .."/" ..  repeats .. ") van camera (" .. cameraNAME .. "). Foto is gemaakt ".. (i * interval) ..  " seconden na eerste foto ").afterSec( i * interval )
    dz.log("Env:" .. domenv .. " Script: " .. info.scriptName .. " Foto is gemaakt....", dz.LOG_INFO)
end

end
}

Code: Select all

{
   "result" : [
      {
         "Address" : "192.168.20.50",
         "Enabled" : "true",
         "ImageURL" : "cgi-bin/snapshot.cgi",
         "Name" : "pvkcam",
         "Password" : "xxxxxxxx",
         "Port" : 80,
         "Protocol" : 0,
         "Username" : "xxxxx",
         "idx" : "1"
      }
   ],
   "status" : "OK",
   "title" : "Cameras"
}

Code: Select all

2019-02-14 17:57:09.224 Status: dzVents: Info: Security: ------ Start internal script: DZ_Neemfoto: Device: "Neemfoto (dummydevices)", Index: 1012
2019-02-14 17:57:09.225 Status: dzVents: Debug: Security: Constructed timed-command: Foto (1/2) van camera (pvkcam). Foto is gemaakt 0 seconden na eerste foto
2019-02-14 17:57:09.225 Status: dzVents: Debug: Security: Constructed timed-command: Foto (1/2) van camera (pvkcam). Foto is gemaakt 0 seconden na eerste foto AFTER 0 SECONDS
2019-02-14 17:57:09.225 Status: dzVents: Info: Security: Env:Domoticz_kast Script: DZ_Neemfoto Foto is gemaakt....
2019-02-14 17:57:09.225 Status: dzVents: Debug: Security: Constructed timed-command: Foto (2/2) van camera (pvkcam). Foto is gemaakt 1 seconden na eerste foto
2019-02-14 17:57:09.225 Status: dzVents: Debug: Security: Constructed timed-command: Foto (2/2) van camera (pvkcam). Foto is gemaakt 1 seconden na eerste foto AFTER 1 SECONDS
2019-02-14 17:57:09.225 Status: dzVents: Info: Security: Env:Domoticz_kast Script: DZ_Neemfoto Foto is gemaakt....
2019-02-14 17:57:09.225 Status: dzVents: Info: Security: ------ Finished DZ_Neemfoto
2019-02-14 17:57:09.267 Status: EventSystem: Script event triggered: /home/pi/domoticz/dzVents/runtime/dzVents.lua

Re: snapshot function debug

Posted: Thursday 14 February 2019 18:22
by waaren
pvklink wrote: Thursday 14 February 2019 18:07 Hi, suddenly my snapshotscript does not send email/pictures anymore...
no errors in the logging...
Did you check it from the GUI (camera tab) ?

Re: snapshot function debug

Posted: Thursday 14 February 2019 18:25
by pvklink
yes, When i check the setting in domoticz /cameras, in the past i could click "take picture" then a download of the picture started,,, now i get a white screen. Stream video never worked for me and now this functionality works!
Is something changed in the camera environment ?

Re: snapshot function debug

Posted: Thursday 14 February 2019 18:44
by pvklink
mm, tried it with an other browser, no problem!
back to my dashticz, tried it there, gone, it works!
i dont get it... but problem solved... i think...