Page 1 of 1

Evohome DzVents Control

Posted: Friday 15 November 2019 23:29
by tmh88
Evening all,
I’m a noob to Domoticz and been playing with DeVents. I’m a PLC programmer by trade and have a good understanding of control, but limited knowledge with regards to scripting.
I would like to setup a script to change the mode on my Evohome to “auto” if the outside temp falls below a setpoint/ constant value and if the outside temp rises above a setpoint/ constant value, change the mode to “heating off”.
So far, I have a test script running to monitor the outside temp and write a text file to the log if the temp drops below or above a set of constant values.

I’m struggling with changing the mode my Evohome via the DzVent scripts, I have read the wiki info
And have setup another script setup to try and test it. see below

Code: Select all

return {
	active = true,

	on = {

    timer = {'every minute'},

	},


	execute = function(domoticz, triggeredItem, info)

    domoticz.log(domoticz.devices('EvoTouch').state)
    domoticz.devices('EvoTouch').setMode(domoticz.EVOHOME_MODE_HEATINGOFF, nil, nil, nil )
         

    end
}
so far the log returns the following,

Code: Select all

/generated_scripts/Evohome State.lua
2019-11-15 22:28:00.574 Status: dzVents: Info: ------ Start internal script: Evohome State:, trigger: every minute
2019-11-15 22:28:00.610 Status: dzVents: Info: Auto
2019-11-15 22:28:00.610 Status: dzVents: Error (2.4.19): An error occured when calling event handler Evohome State
2019-11-15 22:28:00.610 Status: dzVents: Error (2.4.19): ...ticz/scripts/dzVents/generated_scripts/Evohome State.lua:14: attempt to call field 'setMode' (a nil value)
2019-11-15 22:28:00.611 Status: dzVents: Info: ------ Finished Evohome State 
and I’m stuck. any help would be greatly apricated

Re: Evohome DzVents Control

Posted: Sunday 17 November 2019 23:03
by waaren
tmh88 wrote: Friday 15 November 2019 23:29

Code: Select all

2019-11-15 22:28:00.610 Status: dzVents: Error (2.4.19): An error occured when calling event handler Evohome State
2019-11-15 22:28:00.610 Status: dzVents: Error (2.4.19): ...ticz/scripts/dzVents/generated_scripts/Evohome State.lua:14: attempt to call field 'setMode' (a nil value)
2019-11-15 22:28:00.611 Status: dzVents: Info: ------ Finished Evohome State [/code]
and I’m stuck. any help would be greatly apricated
the setMode function for evohome controller devices is in dzVents versions >= 2.4.23
It is not available in version 2.4.19

Re: Evohome DzVents Control

Posted: Sunday 17 November 2019 23:39
by tmh88
waaren wrote: Sunday 17 November 2019 23:03
tmh88 wrote: Friday 15 November 2019 23:29

Code: Select all

2019-11-15 22:28:00.610 Status: dzVents: Error (2.4.19): An error occured when calling event handler Evohome State
2019-11-15 22:28:00.610 Status: dzVents: Error (2.4.19): ...ticz/scripts/dzVents/generated_scripts/Evohome State.lua:14: attempt to call field 'setMode' (a nil value)
2019-11-15 22:28:00.611 Status: dzVents: Info: ------ Finished Evohome State [/code]
and I’m stuck. any help would be greatly apricated
the setMode function for evohome controller devices is in dzVents versions >= 2.4.23
It is not available in version 2.4.19
Thanks Waaren, another noob question. Do I need to update domoticz or dzvents? If so how?

Re: Evohome DzVents Control

Posted: Monday 18 November 2019 1:22
by waaren
tmh88 wrote: Sunday 17 November 2019 23:39 Do I need to update domoticz or dzvents? If so how?
dzVents is fully integrated in domoticz. If you want to use dzVents setMode for your evohome you will have to upgrade domoticz ( and with that get the latest dzVents version with it)
Upgrading to latest beta can be done on the command line with
sudo <domoticz dir>/updatebeta

or choosing the beta chanel in [setup][settings][system][software updates] and make the [check for updates] green

Please make sure you have a recent and good backup of your domoticz diriectory and all subdirectory's before updating. A new version can also reveal new issues.