hey all
i have the below dzvents script in my domoticz v2020.2 Stable
but it never fires?
you can see i have logging in there to dump out to the logs every time its triggered but i never see it in the logs page of domoticz
return {
on = {
-- devices = {['Lounge Temperature'] = {'between 06:00 and 08:00'}}
-- devices = {78}
timer =
{
'every minute'
}
},
data =
{
temperatures = {history = true, maxItems = 10 },
},
execute = function(dz, item, device)
dz.log('heater script kicked it', dz.LOG_INFO)
local temp = dz.devices(78) --loungeroom temprature sensor
dz.data.temperatures.add(temp.temperature)
local heater = dz.devices('Heater') -- Reverse Cycle Heating Mode
local cooling = dz.devices('Cooling') -- Reverse Cycle Coling Mode
local average = dz.data.temperatures.avg() -- Average of Temprate Sensor in Loungeroom
local Season = 'Cooling' -- Variable for if system should be in heating or cooling mode
local setpoint = dz.devices(144) -- Lounge Thermostate
-- dz.log('Device ' .. device.name .. ' was changed', dz.LOG_INFO)
dz.log('Temp: ' .. temp.temperature, dz.LOG_INFO)
dz.log('Average Temp: ' .. average, dz.LOG_INFO)
dz.log('current setting is ' .. Season, dz.LOG_INFO)
if (Season == 'Heating') then
if (temp.temperature <= 18 and average <= 18) then
heater.switchOn().checkFirst()
end
if (temp.temperature >= 22 and average >= 22) then
heater.switchOff().checkFirst()
end
end
end
}
Do you see other dzVents scripts executing in the log?
Yes i do, and i know others work as i dont use anything but dzvents anymore
what are your settings for dzVents logging?
Errors only, you are spot on thats why i couldnt see the logging i had in place for the debugging of the script. sometimes its the simple things....
ill answer the rest just incase someone else is curious
How do you look at logfile? If from within the GUI do you look at all logtypes?
yeah in the GUI and yeah i flip between all 3 depending on what i want to look at
How did you save the script? Do you see something in log when changing the script and save it again?
Using the DZvents editor window. No error on complile where it shows all the scripts registering after a save
btw. Your profile and signature show another version then the one you mention in your post
Cheers i have updated it now.... cant believe that its been that long since I changed the signature....
then again domoticz is one of things i get running then leave it alone to do its job for months at a time, sometimes you can forget its even there in the background
EDIT:
On a similar vein is there a way to just set one script to debug mode and have it show everything without changing the main settings? it would be usefull to have just the one script showing every action without everything else cluttering up the logs
markjgabb wrote: ↑Sunday 24 January 2021 11:57
On a similar vein is there a way to just set one script to debug mode and have it show everything without changing the main settings? it would be usefull to have just the one script showing every action without everything else cluttering up the logs