Domoticz on synology for evohome
Moderator: leecollings
-
- Posts: 8
- Joined: Friday 04 November 2016 22:46
- Target OS: NAS (Synology & others)
- Domoticz version:
- Contact:
Re: Domoticz on synology for evohome
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
-
- Posts: 29
- Joined: Saturday 05 November 2016 16:54
- Target OS: -
- Domoticz version:
- Contact:
Re: Domoticz on synology for evohome
And do you know which files I have to edit? All of them?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.
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")
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'
-
- Posts: 29
- Joined: Saturday 05 November 2016 16:54
- Target OS: -
- Domoticz version:
- Contact:
Re: Domoticz on synology for evohome
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
-
- Posts: 29
- Joined: Saturday 05 November 2016 16:54
- Target OS: -
- Domoticz version:
- Contact:
Re: Domoticz on synology for evohome
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:
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:
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})
Error from example 2: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})
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
-
- Posts: 29
- Joined: Saturday 05 November 2016 16:54
- Target OS: -
- Domoticz version:
- Contact:
Re: Domoticz on synology for evohome
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?
-
- Posts: 29
- Joined: Saturday 05 November 2016 16:54
- Target OS: -
- Domoticz version:
- Contact:
Re: Domoticz on synology for evohome
So I created a test.sh with following config:
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...
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
-
- Posts: 28
- Joined: Saturday 12 November 2016 20:52
- Target OS: NAS (Synology & others)
- Domoticz version: 3.5877
- Contact:
Re: Domoticz on synology for evohome
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
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
-
- Posts: 29
- Joined: Saturday 05 November 2016 16:54
- Target OS: -
- Domoticz version:
- Contact:
Re: Domoticz on synology for evohome
don't use the run before the command. just use "/var/packages/debian-chroot/scripts/start-stop-status chroot"
-
- Posts: 28
- Joined: Saturday 12 November 2016 20:52
- Target OS: NAS (Synology & others)
- Domoticz version: 3.5877
- Contact:
Re: Domoticz on synology for evohome
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
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
-
- Posts: 29
- Joined: Saturday 05 November 2016 16:54
- Target OS: -
- Domoticz version:
- Contact:
Re: Domoticz on synology for evohome
I use winscp to make the files, i do not like the vi editor...
To use winscp as root, follow these steps:
To use winscp as root, follow these steps:
https://forum.synology.com/enu/viewtopi ... 95#p425367Log 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.
-
- Posts: 28
- Joined: Saturday 12 November 2016 20:52
- Target OS: NAS (Synology & others)
- Domoticz version: 3.5877
- Contact:
Re: Domoticz on synology for evohome
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.
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.
-
- Posts: 29
- Joined: Saturday 05 November 2016 16:54
- Target OS: -
- Domoticz version:
- Contact:
Re: Domoticz on synology for evohome
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?
2: What is the log error?
-
- Posts: 28
- Joined: Saturday 12 November 2016 20:52
- Target OS: NAS (Synology & others)
- Domoticz version: 3.5877
- Contact:
Re: Domoticz on synology for evohome
I have set my task to start at 00:00 end end time at 23:59 so I think it will run OK now.
For the second item, this is the error code:
2016-11-16 10:12:18.447 Error: evohome: Error script not found '/home/evohome-client/evo-settemp.sh'
Update1: I think it cannot find the evo-settemp.sh because the update script runs inside the chroot environment, and the domoticz runs outside the chroot environment.
Update2: I have changed the evoconfig file to following.
GNU nano 2.2.6 File: evoconfig.py Modified
Now I get 2016-11-16 20:04:01.776 Error: Error executing script command (/volume2/@appstore/debian-chroot/var/chroottarget/home/evohome-client/evohomeclient2/evo-settemp.sh). returned: 256
Update3: after trying to run the evo-update.sh I get following error.
looks quite the same as what soulplayer got, with the only difference is that I only have 1 system.
Update4:
Just tried to figure out where it goes wrong.
when debugging the value sys.Avrg I get next results:
#If the length of this is less than 5 then the timeuntil value is None
if len(sys.argv)<5:
until = None
#Else if the value is ??? return none
elif sys.argv[4][:1] == '0':
until = None
#else return me the date and time
else:
until = dateutil.parser.parse(sys.argv[4]).strftime('%Y-%m-%dT%H:%M:%SZ')
When debugging this part it says that the lenth is smaller than 5 and thus return None, which is not a date or time format.
also this part "dateutil.parser.parse(sys.argv[4]).strftime('%Y-%m-%dT%H:%M:%SZ')" returns the listindex out of range error
Is it possible that something goes wrong over here?
For the second item, this is the error code:
2016-11-16 10:12:18.447 Error: evohome: Error script not found '/home/evohome-client/evo-settemp.sh'
Update1: I think it cannot find the evo-settemp.sh because the update script runs inside the chroot environment, and the domoticz runs outside the chroot environment.
Update2: I have changed the evoconfig file to following.
GNU nano 2.2.6 File: evoconfig.py Modified
Code: Select all
#fill in username
usr=*********
#fill in pw
pw=***********
#fill in Domoticz URL
url='192.168.**********'
#fill in Domoticz port
port='8084'
#fill in script root e.g. script:///home/<user>/evohome-client script::///usr/local/bin etc
srt='script:///volume2/@appstore/debian-chroot/var/chroottarget/home/evohome-client/evohomeclient2'
Update3: after trying to run the evo-update.sh I get following error.
looks quite the same as what soulplayer got, with the only difference is that I only have 1 system.
I also made the test file, which works just fine.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_setpo int({"HeatSetpointValue":0.0 if len(sys.argv)<4 else float(sys.argv[3]),"Setpoin tMode":int(sys.argv[2]),"TimeUntil":until})
IndexError: list index out of range
Update4:
Just tried to figure out where it goes wrong.
when debugging the value sys.Avrg I get next results:
this value sys.avrg must go through an If function which must return the "Timeuntil" value.Number or arguments 1 arguments
Argument list: ['./evo-settemp_test.sh']
#If the length of this is less than 5 then the timeuntil value is None
if len(sys.argv)<5:
until = None
#Else if the value is ??? return none
elif sys.argv[4][:1] == '0':
until = None
#else return me the date and time
else:
until = dateutil.parser.parse(sys.argv[4]).strftime('%Y-%m-%dT%H:%M:%SZ')
When debugging this part it says that the lenth is smaller than 5 and thus return None, which is not a date or time format.
also this part "dateutil.parser.parse(sys.argv[4]).strftime('%Y-%m-%dT%H:%M:%SZ')" returns the listindex out of range error
Is it possible that something goes wrong over here?
Last edited by fantilator on Wednesday 16 November 2016 22:06, edited 6 times in total.
-
- Posts: 28
- Joined: Saturday 12 November 2016 20:52
- Target OS: NAS (Synology & others)
- Domoticz version: 3.5877
- Contact:
Re: Domoticz on synology for evohome
New strage acting part,
When I run the code from SSH, the values update, although the task sheduler runs, but does not update the values.
Update: After restart of NAS it works again, we'll see how long it takes.
Update2: It keeps running now, problem solved.
When I run the code from SSH, the values update, although the task sheduler runs, but does not update the values.
Code: Select all
chroot /volume2/@appstore/debian-chroot/var/chroottarget /home/evohome-client/evohomeclient2/evo-update.sh
Update2: It keeps running now, problem solved.
Re: Domoticz on synology for evohome
I'm almost done... but I receive an error message see below...thanks for your support..!
~/evohome-client# ./evo-update.sh
File "./evo-update.sh", line 26
sys.exit(1)
^
IndentationError: unexpected indent
~/evohome-client# ./evo-update.sh
File "./evo-update.sh", line 26
sys.exit(1)
^
IndentationError: unexpected indent
-
- Posts: 28
- Joined: Saturday 12 November 2016 20:52
- Target OS: NAS (Synology & others)
- Domoticz version: 3.5877
- Contact:
Re: Domoticz on synology for evohome
remove any spaces before your line 26.
Re: Domoticz on synology for evohome
Yess...stupid mistake thanks
Re: Domoticz on synology for evohome
After ./evo-update.sh I don't receive any errors, looks like everything is fine, but the temps doesn't show up in Domoticz.
For the script location (evoconfig.py) I use the following: srt='script:///home/evohome-client' is this correct? I see also some examples where there referring to script:///volume1/@appstore/debian-chroot/var/chroottarget/home/evohome-client
My (evohome) scripts are in home/evohome-client (@root)
Thanks for your support!
For the script location (evoconfig.py) I use the following: srt='script:///home/evohome-client' is this correct? I see also some examples where there referring to script:///volume1/@appstore/debian-chroot/var/chroottarget/home/evohome-client
My (evohome) scripts are in home/evohome-client (@root)
Thanks for your support!
-
- Posts: 28
- Joined: Saturday 12 November 2016 20:52
- Target OS: NAS (Synology & others)
- Domoticz version: 3.5877
- Contact:
Re: Domoticz on synology for evohome
when using the chroot, your files are being stored inside the chroot part, so you must link to chroot locations.
srt='script:///volume1/@appstore/debian-chroot/var/chroottarget/home/evohome-client'
srt='script:///volume1/@appstore/debian-chroot/var/chroottarget/home/evohome-client'
Re: Domoticz on synology for evohome
Thanks will change the location... but when I check the location /volume1/@appstore/debian-chroot/var/chroottarget/home/evohome-client it doesn't show the evo files.... I see only the files when login as root to my NAS /evohome-client/
I have selected within Domoticz Hardware --> Evohome via script and included the controller etc. But unfortunately the data is not updated (no temperature is shown...any suggestions?
Thanks again for your support
I have selected within Domoticz Hardware --> Evohome via script and included the controller etc. But unfortunately the data is not updated (no temperature is shown...any suggestions?
Thanks again for your support
Last edited by josimd on Monday 28 November 2016 20:36, edited 1 time in total.
Who is online
Users browsing this forum: No registered users and 0 guests