Files
Domoticz/lua/Archives/script_time_Camera2.lua
2025-03-06 11:09:58 +01:00

20 lines
457 B
Lua
Executable File

require "scripts/lua/functions"
commandArray = {}
--recupere les minutes
time=os.time()
minutes=tonumber(os.date('%M',time))
if (minutes % 1 == 0) then
local f = io.popen("ls /media/WDBlue/motion/ |grep jpg| cut -c 1-2 |uniq| wc -l") -- runs command
local l = f:read("*a") -- read output of command
debug("Nombre de detection "..l)
f:close()
commandArray['PhotoMotion']=tostring(l)
commandArray['UpdateDevice']="1065|"..l
end
return commandArray