return { on = { devices = { 'Salon - akt.temp', 'Salon - temp ust' }}, logging = { level = domoticz.LOG_DEBUG }, -- zmien na LOG_ERROR jak skrypt bedzie dzialal execute = function(dz, item) _G.logMarker = _G.moduleLabel local piec = dz.devices('Pompa w piecu') local temperature = dz.utils.round(dz.devices('Salon - akt.temp').temperature,1) local setpoint = dz.utils.round(dz.devices('Salon - temp ust').setPoint,1) dz.log('Piec state: ' .. piec.state,dz.LOG_DEBUG) dz.log('Measured temperature: ' .. temperature,dz.LOG_DEBUG) dz.log('Setpoint: ' .. setpoint,dz.LOG_DEBUG) if setpoint < temperature and piec.state == 'On' then piec.switchOff() dz.log('Piec pompa off',dz.LOG_DEBUG) elseif setpoint > temperature and piec.state == 'Off' then piec.switchOn() dz.log('Piec pompa on',dz.LOG_DEBUG) end end }