Page 1 of 1

tranfer value from Setpoint to virtual temperature

Posted: Tuesday 29 May 2018 20:28
by Knibor
Hi,

I created a virtual Sensor "thermostat setpoint" with "idx 94" and name "setpoint"

How to transfer this value of the setpoint to a virtual "temperature" with "idx 95" and name "setpoint"

I'am not familiar with programming in dzVents, can someone help me with this?

Thanks...

Re: tranfer value from Setpoint to virtual temperature

Posted: Tuesday 29 May 2018 21:00
by EdddieN
Hello, have a look at this thread, I think it is doing what you want using dzVents
http://www.domoticz.com/forum/viewtopic ... 25#p176525

Re: tranfer value from Setpoint to virtual temperature

Posted: Tuesday 29 May 2018 21:33
by waaren
Is there a specific reason why you use the same name for the setpoint device and the temperature sensor ?

dzVents script:
Spoiler: show

Code: Select all

--[[ 
setPoint2sensor.lua  [ dzVents >= 2.2 ] 
 ]]--

return {
    on      =   {   devices      =      { 94  }},                      -- trigger device (type = Thermostat / Setpoint)
                    
    logging =   {   level     =   domoticz.LOG_INFO,
                    marker    =   "setPoint2sensor"    },

    
    execute = function(dz, trigger)
        local slave = dz.devices(95)
        dz.log("Updating temperature sensor (" .. slave.name .. ") with setPoint Value: " .. trigger.setPoint .. "°C" )
        slave.updateTemperature(trigger.setPoint)
    end
}