@remcootje.
i looked in my dzvents.lua file and see this(i also have appollolake so the files should be the same)
looks like runtime_path is empty.(this path is probably set during the install of the package which you skipped)
did you try a test and modify this path to see what happens(not a fix but then we know if this is the problem)
Code: Select all
local runtimePath = globalvariables['runtime_path'] -- should be ${szStartupFolder}/dzVents/runtime/
to
Code: Select all
local runtimePath = '/usr/local/domoticz/var/dzVents/runtime/' -- should be ${szStartupFolder}/dzVents/runtime/
if this works maybe also change the scriptpath.
when things are working you have time to look for the real solution.
@Jumbotroll probably knows exactly where things go wrong but i suspect he is occupied with more important mathers(these are strange times for everybody)
this is my tota dzvents.lua
Code: Select all
local TESTMODE = false
globalvariables['testmode'] = false
--globalvariables['dzVents_log_level'] = 4 --debug
if (_G.TESTMODE) then
TESTMODE = false
globalvariables['testmode'] = false
end
local scriptPath = globalvariables['script_path'] -- should be ${szUserDataFolder}/scripts/dzVents/
local runtimePath = globalvariables['runtime_path'] -- should be ${szStartupFolder}/dzVents/runtime/
_G.scriptsFolderPath = scriptPath .. 'scripts' -- global
_G.generatedScriptsFolderPath = scriptPath .. 'generated_scripts' -- global
_G.dataFolderPath = scriptPath .. 'data' -- global
package.path =
scriptPath .. '?.lua;' ..
runtimePath .. '?.lua;' ..
runtimePath .. 'device-adapters/?.lua;' ..
scriptPath .. 'dzVents/?.lua;' ..
scriptPath .. 'scripts/?.lua;' ..
scriptPath .. '../lua/?.lua;' ..
scriptPath .. 'scripts/modules/?.lua;' ..
scriptPath .. '?.lua;' ..
scriptPath .. 'generated_scripts/?.lua;' ..
scriptPath .. 'data/?.lua;' ..
scriptPath .. 'modules/?.lua;' ..
package.path
local EventHelpers = require('EventHelpers')
local helpers = EventHelpers()
local utils = require('Utils')
if (tonumber(globalvariables['dzVents_log_level']) == utils.LOG_DEBUG or TESTMODE) then
print('Debug: Dumping domoticz data to ' .. scriptPath .. 'domoticzData.lua')
local persistence = require('persistence')
persistence.store(scriptPath .. 'domoticzData.lua', domoticzData)
--persistence.store(scriptPath .. 'globalvariables.lua', globalvariables)
--persistence.store(scriptPath .. 'timeofday.lua', timeofday)
local events, length = helpers.getEventSummary()
if (length > 0) then
print('Debug: dzVents version: '.. globalvariables.dzVents_version)
print('Debug: Event triggers:')
for i, event in pairs(events) do
print('Debug: ' .. event)
end
end
if (globalvariables['isTimeEvent']) then
print('Debug: Event triggers:')
print('Debug: - Timer')
end
end
commandArray = {}
local isTimeEvent = globalvariables['isTimeEvent']
if (isTimeEvent) then
commandArray = helpers.dispatchTimerEventsToScripts()
end
helpers.dispatchDeviceEventsToScripts()
helpers.dispatchVariableEventsToScripts()
helpers.dispatchSecurityEventsToScripts()
helpers.dispatchSceneGroupEventsToScripts()
helpers.dispatchHTTPResponseEventsToScripts()
helpers.dispatchSystemEventsToScripts()
helpers.dispatchCustomEventsToScripts()
commandArray = helpers.domoticz.commandArray
return commandArray