Controlling EvoHome using LUA

For heating/cooling related questions in Domoticz

Moderator: leecollings

Post Reply
PhilippeDom
Posts: 11
Joined: Tuesday 12 December 2017 18:40
Target OS: NAS (Synology & others)
Domoticz version: 3.0.8770
Contact:

Controlling EvoHome using LUA

Post by PhilippeDom »

Hello,

Four years ago, I aquired the EvoHome multi-zone system, wanting one day to create a smart home heating system. Now, with the arrival of cheap sensors from Xiaomi, I am finally in the "Home stretch".

In each EvoHome zone (room), one (or multiple) PIRs are placed. After not detecting any motion for 15 minutes, the lua script checks the room setting and if it is set to "Auto", and if the program temperature is set to more than 15C, the room is set to "PermanentOverride" at 10C
When the PIR detects a room presence for more than 5 min., and if the room setting is set to "PermanentOverride" at 10C, the lua script should activate the "Auto" setting for that room. I said should, because I am not able to get it back from "PermanentOverride" using LUA and JSON.

To set the room to "PermanentOverride" I use the JSON script from the Evohome - Domotiocz Wiki:

Updating a setpoint using the JSON API


/json.htm?type=setused&idx=<idx>&setpoint=<setpoint>&mode=<mode>&used=true

<idx> id number of the evohome zone device in Domoticz
<setpoint> set point in degrees (will be ignored for Auto)
<mode> Auto,TemporaryOverride,PermanentOverride,FollowSchedule
used must be true


I'm running the latest Domoticz Beta on synology 6.1, The Evohome has the color display without Wifi, linked to Domoticz using the HGI/S80 gateway.

I'm sure I am not the only one to have this idea of using Domoticz for controlling the EvoHome system, so I hope that someone can help me solving this problem. Thanks a lot,

PS in Domoticz web interface, I am able to change setpoints, temporary override, etc...
User avatar
philchillbill
Posts: 396
Joined: Monday 12 September 2016 13:47
Target OS: Linux
Domoticz version: beta
Location: Eindhoven. NL
Contact:

Re: Controlling EvoHome using LUA

Post by philchillbill »

I do something vaguely similar based on voice input from Alexa to temporarily boost a zone for 15 minutes (e.g. the Bathroom before I take a shower). Instead of Lua I'm doing it via an external perl script. When I want to finish the boost, I don't set the zone back to 'Auto' but instead to 'FollowSchedule' and it works fine. Maybe you could try that? It shouldn't really matter but who knows :mrgreen:
Alexa skills author: EvoControl, Statereport, MediaServer, LMS-lite
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Controlling EvoHome using LUA

Post by waaren »

I switched some months ago to Evohome via Web API for my installation. Combined with dzVents makes it relatively simple to set the zone back to Auto.
lines in dzVents script:

Code: Select all

local myZone = domoticz.devices('Slaapkamer')
myZone.updateSetPoint(nil, Auto,nil )
I also needed to changed line 10 in domoticzdir/dzvents/runtime/device-adapters/evohome_device.lua to

Code: Select all

local res = (( device.hardwareTypeValue == 39 or device.hardwareTypeValue == 75 ) and device.deviceSubType == 'Zone')
to make dzVents recognize my evohome via Web API device as a evohome device
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
PhilippeDom
Posts: 11
Joined: Tuesday 12 December 2017 18:40
Target OS: NAS (Synology & others)
Domoticz version: 3.0.8770
Contact:

Re: Controlling EvoHome using LUA

Post by PhilippeDom »

Thanks a lot for the suggestions, it seems my Lua script was missing a quote ("), which for some reason could set a zone to PermanentOverride, but not back to Auto. With the quote added, it works like a charm.

BTW it's really a cool idea to control EvoHome using Alexa. Yet again new possibilities...
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests