Domoticz on synology for evohome

For heating/cooling related questions in Domoticz
dutch64
Posts: 7
Joined: Friday 04 November 2016 23:46
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Domoticz on synology for evohome

Post by dutch64 » Saturday 05 November 2016 20:01

mschut wrote:Just curious. Connecting my Evohome through the HGI80 results in an temporarily working solution. After a certain time it stops communication. I do not seem to be the only one with thus issue. Connecting through the script as referred to in this thread, does that lead to a stable situation?
Hi, do you mean stops communicating with the honeywell server? That's no issue here so far, it is running since yesterday and the reading of temps etc has been without any trouble.

dutch64
Posts: 7
Joined: Friday 04 November 2016 23:46
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Domoticz on synology for evohome

Post by dutch64 » Saturday 05 November 2016 20:19

Soulplayer wrote:Hello,

Good that you found a solution. Could you however post the content + location of your config file (without pw ofcourse ^^). Perhaps also you task content? I'm trying to do the same that you did but it is not working for me...

temperature is updating but evotouch is still offline and I can't change the temperature

Thanks,

Soul

Update: I'm connecting trough the wifi gateway.
Update 2: I tried to use ./evo-setmode.sh Away and it gives following error:
"Exception: More than one location available"

I have 2 locations in my account. Could that be the reason nothing but temperaturereadings works?
that i don't know since i have only one location. But in Domoticz, in your Temperature tab, can you use the "set" button on one of the zones and set the temperature you want? And of course, it should stay there and not being set back to the previous value after an update

Anyhow: the config script (don't mind the timezone part, it is for an alternative script, also, the path might seem a bit unusual, maybe i will change it one day)

Code: Select all

#fill in Domoticz URL
url='127.0.0.1'
#fill in Domoticz port
port='8080'
#fill in script root e.g. script:///home/<user>/evohome-client script::///usr/local/bin etc
srt='script:///volume1/@appstore/debian-chroot/var/chroottarget/home/evohome-client'
#fill in your timezone
timezone='Europe/Amsterdam'
and for the task scheduler, run it as root and every minute:

Code: Select all

/volume1/@appstore/debian-chroot/var/chroottarget/home/evohome-client/evo-update.sh
make sure no spaces in there.

Hope this helps, let me know if you like to know more

Soulplayer
Posts: 29
Joined: Saturday 05 November 2016 17:54
Target OS: -
Domoticz version:
Contact:

Re: Domoticz on synology for evohome

Post by Soulplayer » Saturday 05 November 2016 20:59

I think it has something to do with my multiple locations:
2016-11-05 19:56:36.289 Executing script: /volume1/@appstore/debian-chroot/var/chroottarget/home/evohome-client/evo-settemp.sh
2016-11-05 19:56:39.949 Error: Error executing script command (/volume1/@appstore/debian-chroot/var/chroottarget/home/evohome-client/evo-settemp.sh). returned: 256
When i run ./evo-settemp.sh
Traceback (most recent call last):
File "./evo-settemp.sh", line 28, in <module>
client._get_single_heating_system().zones_by_id[sys.argv[1]]._set_heat_setpoint({"HeatSetpointValue":0.0 if len(sys.argv)<4 else float(sys.argv[3]),"SetpointMode":int(sys.argv[2]),"TimeUntil":until})
File "/home/evohome-client/evohomeclient2/__init__.py", line 35, in _get_single_heating_system
raise Exception("More than one location available")
Exception: More than one location available
Anybody got it working with 2 systems?

dutch64
Posts: 7
Joined: Friday 04 November 2016 23:46
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Domoticz on synology for evohome

Post by dutch64 » Saturday 05 November 2016 21:10

Seems like the script expects some input or so (the specific location). Sorry, cannot help you with that but I hope someone can explain because in the future i might like to use more locations also

gordonb3
Posts: 566
Joined: Friday 22 January 2016 11:15
Target OS: Linux
Domoticz version: custom
Location: The Netherlands
Contact:

Re: Domoticz on synology for evohome

Post by gordonb3 » Monday 07 November 2016 17:57

You can replace _get_single_heating_system() with locations[0]._gateways[0]._control_systems[0]

To access the second system you'll have to toggle one of the zero values to one. Which one will depend on your setup.
Excito B3 running Gentoo Linux, P1, Rfxtrx433 to read and control TFA, KaKu, EvoHome RFG100
Custom patched Domoticz v3.8000

Soulplayer
Posts: 29
Joined: Saturday 05 November 2016 17:54
Target OS: -
Domoticz version:
Contact:

Re: Domoticz on synology for evohome

Post by Soulplayer » Tuesday 08 November 2016 15:29

gordonb3 wrote:You can replace _get_single_heating_system() with locations[0]._gateways[0]._control_systems[0]

To access the second system you'll have to toggle one of the zero values to one. Which one will depend on your setup.
And do you know which files I have to edit? All of them?

Update:

I edited the file settemp.sh and tried three times (each time a 0 to 1):

Code: Select all

import evoconfig
from evohomeclient2 import EvohomeClient
import sys
import dateutil.parser

if len(sys.argv)<5:
        until = None
elif sys.argv[4][:1] == '0':
        until = None
else:
     	until = dateutil.parser.parse(sys.argv[4]).strftime('%Y-%m-%dT%H:%M:%SZ')

#connect to evohome web portal @ http://www.mytotalconnect.com
client = EvohomeClient(evoconfig.usr,evoconfig.pw)
client._locations[0]._gateways[0]._control_systems[1].zones_by_id[sys.argv[1]]._set_heat_setpoint({"HeatSetpointValue":0.0 if len(sys.argv)<4 else float(sys.argv[3]),"SetpointMode":int(sys.argv[2]),"TimeUntil":until})
open ("/var/tmp/evo-noup.tmp","w")
Now I get:
client# ./evo-settemp.sh
Traceback (most recent call last):
File "./evo-settemp.sh", line 28, in <module>
client._locations[0]._gateways[0]._control_systems[1].zones_by_id[sys.argv[1]]._set_heat_setpoint({"HeatSetpointValue":0.0 if len(sys.argv)<4 else float(sys.argv[3]),"SetpointMode":int(sys.argv[2]),"TimeUntil":until})
AttributeError: 'EvohomeClient' object has no attribute '_locations'

gordonb3
Posts: 566
Joined: Friday 22 January 2016 11:15
Target OS: Linux
Domoticz version: custom
Location: The Netherlands
Contact:

Re: Domoticz on synology for evohome

Post by gordonb3 » Tuesday 08 November 2016 19:54

There's no underscore before locations
Excito B3 running Gentoo Linux, P1, Rfxtrx433 to read and control TFA, KaKu, EvoHome RFG100
Custom patched Domoticz v3.8000

Soulplayer
Posts: 29
Joined: Saturday 05 November 2016 17:54
Target OS: -
Domoticz version:
Contact:

Re: Domoticz on synology for evohome

Post by Soulplayer » Tuesday 08 November 2016 21:24

Then I get following error:
Traceback (most recent call last):
File "./evo-settemp.sh", line 28, in <module>
client.locations[0]._gateways[1]._control_systems[0].zones_by_id[sys.argv[1]]._set_heat_setpoint({"HeatSetpointValue":0.0 if len(sys.argv)<4 else float(sys.argv[3]),"SetpointMode":int(sys.argv[2]),"TimeUntil":until})
IndexError: list index out of range

gordonb3
Posts: 566
Joined: Friday 22 January 2016 11:15
Target OS: Linux
Domoticz version: custom
Location: The Netherlands
Contact:

Re: Domoticz on synology for evohome

Post by gordonb3 » Tuesday 08 November 2016 21:45

That makes perfect sense. Apparently your first location does not have two gateways.
Excito B3 running Gentoo Linux, P1, Rfxtrx433 to read and control TFA, KaKu, EvoHome RFG100
Custom patched Domoticz v3.8000

Soulplayer
Posts: 29
Joined: Saturday 05 November 2016 17:54
Target OS: -
Domoticz version:
Contact:

Re: Domoticz on synology for evohome

Post by Soulplayer » Tuesday 08 November 2016 22:05

Ok, perhaps I should first understand what the different options mean?

Locations => number of locations on my mytotalconnectcomfort account?
Gateway => ?
Control system => evohome basestation?

on my account I have 2 locations because I have 2 evohome stations that connect with 2 opentherm modules.
evohome WiFi Controller x 2
No gateway installed

Always trying with evo-settemp.sh via ssh.

gives error:
client.locations[2]._gateways[0]._control_systems[0].zones_by_id[sys.argv[1]]._set_heat_setpoint({"HeatSetpointValue":0.0 if len(sys.argv)<4 else float(sys.argv[3]),"SetpointMode":int(sys.argv[2]),"TimeUntil":until})
gives error:
client.locations[2]._gateways[0]._control_systems[2].zones_by_id[sys.argv[1]]._set_heat_setpoint({"HeatSetpointValue":0.0 if len(sys.argv)<4 else float(sys.argv[3]),"SetpointMode":int(sys.argv[2]),"TimeUntil":until})
gives error:
client.locations[1]._gateways[0]._control_systems[2].zones_by_id[sys.argv[1]]._set_heat_setpoint({"HeatSetpointValue":0.0 if len(sys.argv)<4 else float(sys.argv[3]),"SetpointMode":int(sys.argv[2]),"TimeUntil":until})
Error from example 2:
Traceback (most recent call last):
File "./evo-settemp.sh", line 28, in <module>
client.locations[2]._gateways[0]._control_systems[2].zones_by_id[sys.argv[1]]._set_heat_setpoint({"HeatSetpointValue":0.0 if len(sys.argv)<4 else float(sys.argv[3]),"SetpointMode":int(sys.argv[2]),"TimeUntil":until})
IndexError: list index out of range

gordonb3
Posts: 566
Joined: Friday 22 January 2016 11:15
Target OS: Linux
Domoticz version: custom
Location: The Netherlands
Contact:

Re: Domoticz on synology for evohome

Post by gordonb3 » Tuesday 08 November 2016 22:38

Well, the thing is that I have just one system and it works for me with 0,0,0 which is effectively what _get_single_heating_system() does (you can look it up in the evohomeclient2 code).

You can try expanding properties one at a time and print whatever is returned. You'll most likely see nothing but "[something] property" but that will tell you that the parameters are good.

PS do note that the first element in each of the components is numbered zero. A second location, gateway and/or control system will be numbered 1. From the way you describe your system I would not expect you to have any of those components with an index of 2 or higher.
Excito B3 running Gentoo Linux, P1, Rfxtrx433 to read and control TFA, KaKu, EvoHome RFG100
Custom patched Domoticz v3.8000

Soulplayer
Posts: 29
Joined: Saturday 05 November 2016 17:54
Target OS: -
Domoticz version:
Contact:

Re: Domoticz on synology for evohome

Post by Soulplayer » Tuesday 08 November 2016 22:44

That's pretty weird... Even with all 0's it gives me the same error. Should I change another file besides the evo-settemp.sh?

gordonb3
Posts: 566
Joined: Friday 22 January 2016 11:15
Target OS: Linux
Domoticz version: custom
Location: The Netherlands
Contact:

Re: Domoticz on synology for evohome

Post by gordonb3 » Tuesday 08 November 2016 23:45

Don't know.

You could try this as a test:

Code: Select all

import evoconfig
from evohomeclient2 import EvohomeClient
client = EvohomeClient(evoconfig.usr,evoconfig.pw)
zone=client.locations[0]._gateways[0]._control_systems[0]._zones[0]
schedule=zone.schedule()
print schedule
This should return json code containing the schedule for the first zone in your first location. To retrieve this data for a zone by name you can simply replace _zones[0] with zones['zone_name']. I suppose something similar will apply to the other underscore field names.
Excito B3 running Gentoo Linux, P1, Rfxtrx433 to read and control TFA, KaKu, EvoHome RFG100
Custom patched Domoticz v3.8000

Soulplayer
Posts: 29
Joined: Saturday 05 November 2016 17:54
Target OS: -
Domoticz version:
Contact:

Re: Domoticz on synology for evohome

Post by Soulplayer » Wednesday 09 November 2016 14:17

So I created a test.sh with following config:

Code: Select all

#!/usr/bin/python
#
# Copyright 2015 - fullTalgoRythm
# 
# Licensed under GNU General Public License 3.0 or later. 
# Some rights reserved. See COPYING, AUTHORS.
# 
# @license GPL-3.0+ <http://spdx.org/licenses/GPL-3.0+>
#
# see http://www.domoticz.com/wiki/Evohome
# see http://evohome-client.readthedocs.org/en/latest/index.html
#


import evoconfig
from evohomeclient2 import EvohomeClient
client = EvohomeClient(evoconfig.usr,evoconfig.pw)
zone=client.locations[1]._gateways[0]._control_systems[0]._zones[1]
schedule=zone.schedule()
print schedule
and this works perfectly... I also used locations 0 which worked. But when I use a name with '' or without'' it gives an error. Not really a big deal but it shows your code is correct but how would I have to implement it in the settemp.sh...

fantilator
Posts: 24
Joined: Saturday 12 November 2016 21:52
Target OS: NAS (Synology & others)
Domoticz version: 3.5877
Contact:

Re: Domoticz on synology for evohome

Post by fantilator » Saturday 12 November 2016 21:56

Hi Alle,

I've just read your walkthrough about the evohome Domoticz connection.
I a linux novice and got stuck on the run: /var/packages/debian-chroot/scripts/start-stop-status chroot commend.
I get sh: run:: command not found

Is there any change of setting up a teamviewer session and help me out for a couple of minutes please?

Kind regards

Soulplayer
Posts: 29
Joined: Saturday 05 November 2016 17:54
Target OS: -
Domoticz version:
Contact:

Re: Domoticz on synology for evohome

Post by Soulplayer » Sunday 13 November 2016 12:37

don't use the run before the command. just use "/var/packages/debian-chroot/scripts/start-stop-status chroot"

fantilator
Posts: 24
Joined: Saturday 12 November 2016 21:52
Target OS: NAS (Synology & others)
Domoticz version: 3.5877
Contact:

Re: Domoticz on synology for evohome

Post by fantilator » Sunday 13 November 2016 19:48

Hi Soulplayer,
Thank you for your help, I got a bit further now,

Now I'm stuk at the point where I have to create the own evohome-config.py file.

https://www.domoticz.com/wiki/Evohome#S ... _or_RFG100

Should I do this in notepad or via the shell, as I cannot find the evohome-client folder on my NAS.

I tried also via the VI command, although I'm struggling editing the pasted text and cannot save it.

Thanks

Soulplayer
Posts: 29
Joined: Saturday 05 November 2016 17:54
Target OS: -
Domoticz version:
Contact:

Re: Domoticz on synology for evohome

Post by Soulplayer » Sunday 13 November 2016 21:27

I use winscp to make the files, i do not like the vi editor...

To use winscp as root, follow these steps:
Log in with SSH, be root, "sudo -i"
Enter, "vi etc/sudoers"
comment out the line #%administrators ALL=(ALL) ALL
insert a new line as: %administrators ALL=NOPASSWD: ALL
[esc] :w!
enter password.
https://forum.synology.com/enu/viewtopi ... 95#p425367

fantilator
Posts: 24
Joined: Saturday 12 November 2016 21:52
Target OS: NAS (Synology & others)
Domoticz version: 3.5877
Contact:

Re: Domoticz on synology for evohome

Post by fantilator » Monday 14 November 2016 19:32

I was able to set up everything, although 2parts are not acting as should be.
1 the task schedule runs as long as I'm logged in to DSM and then jumps to 1 time per day instead of per minute.

2 setting temperature towards te system does not work. Guess I'm missing a script as I have seen in the Domoticz log.

Soulplayer
Posts: 29
Joined: Saturday 05 November 2016 17:54
Target OS: -
Domoticz version:
Contact:

Re: Domoticz on synology for evohome

Post by Soulplayer » Monday 14 November 2016 20:55

1: Make sure you select the right "first execution time" (bad translation probably): if you set the task at 17 make sure you set it at 17. It will then default back to one time a day so you need to change it back. Then put the end time at 23:59.

2: What is the log error?

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest