tranfer value from Setpoint to virtual temperature

Easy to use, 100% Lua-based event scripting framework.
Post Reply
Knibor
Posts: 19
Joined: Sunday 20 May 2018 12:56
Target OS: OS X
Domoticz version: Beta
Contact:

tranfer value from Setpoint to virtual temperature

Post by Knibor » Tuesday 29 May 2018 20:28

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...

User avatar
EdddieN
Posts: 452
Joined: Wednesday 16 November 2016 12:31
Target OS: Raspberry Pi
Domoticz version: 4.9700
Location: Scotland
Contact:

Re: tranfer value from Setpoint to virtual temperature

Post by EdddieN » Tuesday 29 May 2018 21:00

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
11101101 - www.machinon.com

User avatar
waaren
Posts: 906
Joined: Tuesday 03 January 2017 15:18
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Netherlands
Contact:

Re: tranfer value from Setpoint to virtual temperature

Post by waaren » Tuesday 29 May 2018 21:33

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
}
Raspberry (debian stretch via berryboot on Synology DS916+) , Domoticz (almost) latest Beta, , dzVents 2.6, RFLink, RFXtrx433e, P1, Youless, Harmony, Hue, Yeelight, Xiaomi, HomeWizard, Zwave, Amazon echo

Post Reply

Who is online

Users browsing this forum: emme, stewdyne, waaren and 20 guests