Yes.
Please state your domoticz version, os, any recent changes (if any) and include relevant loglines. That might help in answering you in a more useful way.
Moderator: leecollings
Yes.
A couple of days ago the embedded Lua version has been updated from Lua 5.2 to Lua 5.3 (announced here ).sander815 wrote: Thursday 07 November 2019 9:34 os: Raspbian GNU/Linux 9
Linux rpi3 4.19.66-v7+ #1253 SMP Thu Aug 15 11:49:46 BST 2019 armv7l GNU/Linux
Version: 4.11468
i only did apt-get update/upgrade, and upgraded to latest beta
No changes to the lua scripts
If you can try with this dzVents script you might see a somewhat useful message pointing to what goes wrong.
Code: Select all
local DomDevice = 'Keukenlampboven'
return
{
on = { devices = { DomDevice }},
logging = { level = domoticz.LOG_DEBUG, marker = DomDevice },
execute = function(dz, item)
local function composeCommand(targetValue)
return ('echo Fadetimer=5000,LED2_Target=' .. targetValue .. ' | nc -vw 1 192.168.1.230 43333 '.. ' ' )
end
local function osCommand(cmd)
dz.log('Executing Command: ' .. cmd,dz.LOG_DEBUG)
local fileHandle = assert(io.popen(cmd .. ' 2>&1 || echo ::ERROR::', 'r'))
local commandOutput = assert(fileHandle:read('*a'))
local returnTable = {fileHandle:close()}
if commandOutput:find '::ERROR::' then -- something went wrong
dz.log('Error ==>> ' .. tostring(commandOutput:match('^(.*)%s+::ERROR::') or ' ... but no error message ' ) ,dz.LOG_DEBUG)
else -- all is fine!!
dz.log('ReturnCode: ' .. returnTable[3] .. '\ncommandOutput:\n' .. commandOutput, dz.LOG_DEBUG)
end
return commandOutput,returnTable[3] -- rc[3] contains returnCode
end
if item.state == 'Off' then
dz.log('Turning off ' .. DomDevice, dz.LOG_DEBUG)
osCommand(composeCommand(0))
else
local CalcValue = math.floor(item.level * 33)
dz.log('Value received from Domoticz was ' .. item.level, dz.LOG_DEBUG)
dz.log('Dimming ' .. DomDevice .. ' to ' .. CalcValue,dz.LOG_DEBUG)
osCommand(composeCommand(CalcValue))
end
end
}
Users browsing this forum: Google [Bot] and 1 guest