snapshot function debug

Easy to use, 100% Lua-based event scripting framework.

Moderator: leecollings

Post Reply
pvklink
Posts: 822
Joined: Wednesday 12 November 2014 15:01
Target OS: Raspberry Pi / ODroid
Domoticz version: latest b
Contact:

snapshot function debug

Post 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
Last edited by pvklink on Thursday 14 February 2019 18:23, edited 1 time in total.
Raspberry (raspbian on rpi 3) , Domoticz Beta, dzVents , RFXtrx433e, P1, Hue, Yeelight, Zwave+, X10, ESP(easy), MQTT,Weather Underground, System Alive Checker, Domoticz Remote Server to RPI with Google Assistant,
Jablotron connection, Ikea
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: snapshot function debug

Post 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) ?
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
pvklink
Posts: 822
Joined: Wednesday 12 November 2014 15:01
Target OS: Raspberry Pi / ODroid
Domoticz version: latest b
Contact:

Re: snapshot function debug

Post 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 ?
Raspberry (raspbian on rpi 3) , Domoticz Beta, dzVents , RFXtrx433e, P1, Hue, Yeelight, Zwave+, X10, ESP(easy), MQTT,Weather Underground, System Alive Checker, Domoticz Remote Server to RPI with Google Assistant,
Jablotron connection, Ikea
pvklink
Posts: 822
Joined: Wednesday 12 November 2014 15:01
Target OS: Raspberry Pi / ODroid
Domoticz version: latest b
Contact:

Re: snapshot function debug

Post 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...
Raspberry (raspbian on rpi 3) , Domoticz Beta, dzVents , RFXtrx433e, P1, Hue, Yeelight, Zwave+, X10, ESP(easy), MQTT,Weather Underground, System Alive Checker, Domoticz Remote Server to RPI with Google Assistant,
Jablotron connection, Ikea
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest