Domoticz on synology for evohome

For heating/cooling related questions in Domoticz
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 28 November 2016 21:47

You do not have to add any devices to the hardware. When you run the "evo-update.sh init" command it will add all devices automatically.

Can you just tell me where you have places all files.
I have places all under the evohome-client2 folder in the chroot folder.

josimd
Posts: 70
Joined: Saturday 09 January 2016 20:47
Target OS: -
Domoticz version:
Contact:

Re: Domoticz on synology for evohome

Post by josimd » Monday 28 November 2016 21:55

currently the files are in the root "evohome-client", so these should be relocated to the /volume1/@appstore/debian-chroot/var/chroottarget/home/evohome-client directory?

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 28 November 2016 21:57

Yes, this is because you run everything Inside the chroot environment.
When you moved the files, run all commands again.

josimd
Posts: 70
Joined: Saturday 09 January 2016 20:47
Target OS: -
Domoticz version:
Contact:

Re: Domoticz on synology for evohome

Post by josimd » Tuesday 29 November 2016 21:31

Have moved the file to volume1/@appstore/debian-chroot/var/chroottarget/home/evohome-client

And have run the command: ./evo-update.sh

But no updates in Domoticz, do I miss a step?

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

Domoticz on synology for evohome

Post by Soulplayer » Tuesday 29 November 2016 21:32

Did you put in a task in dsm itself? Otherwise the values will not update.

For the first run you have to put in the command with init at the end
./evo-update.sh init


Verzonden vanaf mijn iPhone met Tapatalk

josimd
Posts: 70
Joined: Saturday 09 January 2016 20:47
Target OS: -
Domoticz version:
Contact:

Re: Domoticz on synology for evohome

Post by josimd » Tuesday 29 November 2016 22:18

No not yet in DSM, but there are no evohome items created in Domoticz after the;

./evo-update.sh init

I receive no errors...

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 » Tuesday 29 November 2016 23:37

try to fill in the ip address of your NAS instead of "localhost" or "127.0.0.1" helped here.

josimd
Posts: 70
Joined: Saturday 09 January 2016 20:47
Target OS: -
Domoticz version:
Contact:

Re: Domoticz on synology for evohome

Post by josimd » Wednesday 30 November 2016 20:08

I already did;

#fill in Domoticz URL
url='192.168.0.15'
#fill in Domoticz port
port='8084'
#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'

So strange that it wound work....Wiki is quite clear.... but somehow it doesn't work... any other suggestions?

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 » Wednesday 30 November 2016 21:32

What do you see when you dir the evoclient directory?
I use the evohomeclient2, so all my files are inside the "/evohome-client/evohomeclient2" folder

did you also compile the files as stated inside the tutorial?

josimd
Posts: 70
Joined: Saturday 09 January 2016 20:47
Target OS: -
Domoticz version:
Contact:

Re: Domoticz on synology for evohome

Post by josimd » Wednesday 30 November 2016 21:40

thanks again for your reply:

followed the wiki:

chmod +x evo-update.sh
./evo-update.sh init

Below the directory

/volume1/@appstore/debian-chroot/var/chroottarget/home/evohome-client
-rw-r--r-- 1 root root 269 Nov 25 22:08 :
drwxr-xr-x 6 root root 4096 Nov 30 20:38 .
drwxr-xr-x 3 root root 4096 Nov 29 20:16 ..
drwxr-xr-x 3 root root 4096 Nov 25 21:39 docs
-rwxr-xr-x 1 root root 324 Nov 30 20:28 evoconfig.py
-rw-r--r-- 1 root root 322 Nov 29 20:22 evoconfig.pyc
drwxr-xr-x 2 root root 4096 Nov 25 21:39 evohomeclient
drwxr-xr-x 2 root root 4096 Nov 26 20:57 evohomeclient2
-rw-r--r-- 1 root root 0 Nov 25 22:27 evo-update.py
-rwxr-xr-x 1 root root 0 Nov 27 20:15 evo-update.sh
-rw-r--r-- 1 root root 0 Nov 30 20:16 fixed_script.py
drwxr-xr-x 8 root root 4096 Nov 25 21:39 .git
-rw-r--r-- 1 root root 579 Nov 25 21:39 .gitignore
-rw-r--r-- 1 root root 11323 Nov 25 21:39 LICENSE.txt
-rw-r--r-- 1 root root 1105 Nov 30 20:38 npm-debug.log
-rw-r--r-- 1 root root 1 Nov 27 12:57 readme.md
-rw-r--r-- 1 root root 315 Nov 25 21:39 README.md
-rw-r--r-- 1 root root 40 Nov 25 21:51 setup.cfg
-rw-r--r-- 1 root root 555 Nov 30 20:17 setup.py

/volume1/@appstore/debian-chroot/var/chroottarget/home/evohome-client/evohomeclient2#
drwxr-xr-x 2 root root 4096 Nov 26 20:57 .
drwxr-xr-x 6 root root 4096 Nov 30 20:38 ..
-rw-r--r-- 1 root root 922 Nov 25 21:39 base.py
-rw-r--r-- 1 root root 1418 Nov 26 20:57 base.pyc
-rw-r--r-- 1 root root 4388 Nov 25 21:39 controlsystem.py
-rw-r--r-- 1 root root 4982 Nov 26 20:57 controlsystem.pyc
-rw-r--r-- 1 root root 569 Nov 25 21:39 gateway.py
-rw-r--r-- 1 root root 872 Nov 26 20:57 gateway.pyc
-rw-r--r-- 1 root root 1273 Nov 25 21:39 hotwater.py
-rw-r--r-- 1 root root 2034 Nov 26 20:57 hotwater.pyc
-rw-r--r-- 1 root root 4934 Nov 25 21:39 __init__.py
-rw-r--r-- 1 root root 5809 Nov 26 20:57 __init__.pyc
-rw-r--r-- 1 root root 1469 Nov 25 21:39 location.py
-rw-r--r-- 1 root root 1744 Nov 26 20:57 location.pyc
-rw-r--r-- 1 root root 2653 Nov 25 21:39 zone.py
-rw-r--r-- 1 root root 3445 Nov 26 20:57 zone.pyc

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 » Wednesday 30 November 2016 21:46

my folder structures

volume2/@appstore/debian-chroot/var/chroottarget/home/evohome-client

drwxr-xr-x 6 root root 4096 Nov 16 18:31 .
drwxr-xr-x 4 root root 4096 Nov 13 20:39 ..
drwxr-xr-x 8 root root 4096 Nov 13 12:39 .git
-rw-r--r-- 1 root root 579 Nov 13 12:39 .gitignore
-rw------- 1 root root 12288 Nov 13 13:01 .swp
-rw-r--r-- 1 root root 11323 Nov 13 12:39 LICENSE.txt
-rw-r--r-- 1 root root 315 Nov 13 12:39 README.md
drwxr-xr-x 3 root root 4096 Nov 13 12:39 docs
drwxr-xr-x 2 root root 4096 Nov 13 12:39 evohomeclient
drwxr-xr-x 3 root root 4096 Nov 16 22:55 evohomeclient2
-rw-r--r-- 1 root root 40 Nov 13 21:08 setup.cfg
-rw-r--r-- 1 root root 555 Nov 13 12:39 setup.py

/volume2/@appstore/debian-chroot/var/chroottarget/home/evohome-client/evohomeclient2

drwxr-xr-x 3 root root 4096 Nov 16 22:55 .
drwxr-xr-x 6 root root 4096 Nov 16 18:31 ..
-rw-r--r-- 1 root root 4934 Nov 13 12:39 __init__.py
-rw-r--r-- 1 root root 922 Nov 13 12:39 base.py
-rw-r--r-- 1 root root 4388 Nov 13 12:39 controlsystem.py
-rwxr-xr-x 1 root root 899 Nov 16 18:17 evo-setdhw.sh
-rwxr-xr-x 1 root root 1342 Nov 16 18:15 evo-setmode.sh
-rwxr-xr-x 1 root root 996 Nov 16 22:02 evo-settemp.sh
-rwxr-xr-x 1 root root 1234 Nov 16 22:55 evo-settemp.sh.save
-rwxr-xr-x 1 root root 731 Nov 16 22:30 evo-settemp_test.sh
-rwxr-xr-x 1 root root 6049 Nov 16 12:52 evo-update.sh
-rw-r--r-- 1 root root 344 Nov 16 19:49 evoconfig.py
-rw-r--r-- 1 root root 344 Nov 16 19:58 evoconfig.py.save
-rw-r--r-- 1 root root 300 Nov 16 19:58 evoconfig.py.save.1
-rw-r--r-- 1 root root 379 Nov 16 19:50 evoconfig.pyc
-rw-r--r-- 1 root root 0 Nov 13 22:17 evoconfig.sh
-rw-r--r-- 1 root root 569 Nov 13 12:39 gateway.py
-rw-r--r-- 1 root root 1273 Nov 13 12:39 hotwater.py
-rw-r--r-- 1 root root 1469 Nov 13 12:39 location.py
-rw-r--r-- 1 root root 2653 Nov 13 12:39 zone.py

josimd
Posts: 70
Joined: Saturday 09 January 2016 20:47
Target OS: -
Domoticz version:
Contact:

Re: Domoticz on synology for evohome

Post by josimd » Thursday 01 December 2016 21:08

I'm a little bit further... ./evo-update.sh gives:

Traceback (most recent call last):
File "./evo-update.sh", line 58, in <module>
hwl=json.loads(r.text)
File "/usr/lib/python2.7/json/__init__.py", line 339, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/json/decoder.py", line 364, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.7/json/decoder.py", line 382, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
Last edited by josimd on Thursday 01 December 2016 22:02, edited 1 time in total.

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 » Thursday 01 December 2016 21:50

can you try what is posted over here? and return what works and what fails?

thanks to Gordonb3 for the orginal post.

login to NAS via SSH as root:

Chance directory to /volume1/@appstore/debian-chroot/var/chroottarget/home/evohome-client

Code: Select all

B3 evohome # python
Python 2.7.10 (default, Nov 11 2015, 23:44:37) 
[GCC 4.8.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from evohomeclient2 import evoconfig
>>> from evohomeclient2 import EvohomeClient
>>> client = EvohomeClient(evoconfig.usr,evoconfig.pw)
>>> fi=client.full_installation()
>>> print fi
Which should spit out a bunch of information including your email and home address. This is the evohome part and I think you'll find this to be running correctly.

Exit python:

Code: Select all

>>> quit()

now change your directory to /volume2/@appstore/debian-chroot/var/chroottarget/home/evohome-client/evohomeclient2


Test your connection to domoticz:

Code: Select all

B3 evohome # python
Python 2.7.10 (default, Nov 11 2015, 23:44:37) 
[GCC 4.8.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import evoconfig
>>> import requests
>>> r=requests.get("http://%s:%s/json.htm?type=hardware" % (evoconfig.url,evoconfig.port))
>>> print r.text
Which should give you a json listing of the hardware you enabled in domoticz.

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 » Friday 02 December 2016 12:30

I got the settemp and setmode modules working! :D

my solution was, move following files from the /evohome-client/evohomeclient2 folder to the /evohome-client folder
-evo-settemp.sh
-evo-setdhw.sh
-evo-setmode.sh
-evo-update.sh

Code: Select all

mv evo-settemp.sh ..
mv evo-setdhw.sh ..
mv evo-setmode.sh ..
mv evo-update.sh ..
change these 4 files:

change lines from:

Code: Select all

import evoconfig
import EvohomeClient
to

Code: Select all

from evohomeclient2 import evoconfig
from evohomeclient2 import EvohomeClient
change the files inside the evohomeclient2 folder:

-evoconfig.py

remove the /evohomeclient2 from the script root

Code: Select all

srt='script:///volume2/@appstore/debian-chroot/var/chroottarget/home/evohome-client'
-remove the following files:
-evoconfig.pyc

Code: Select all

rm evoconfig.pyc
compile 4 files in the evohome-client

Code: Select all

chmod u+x evo-settemp.sh
chmod u+x evo-setdhw.sh
chmod u+x evo-setmode.sh
chmod u+x evo-update.s
h

Change the script in the DSM task scheduler

remove the /evohomeclient2 from the script

test run everything again.

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

Re: Domoticz on synology for evohome

Post by Soulplayer » Friday 02 December 2016 14:56

Still trying to get multiple locations to work.

Found this online. Can someone do something with this? I don't think it would work with domoticz.
https://github.com/freeranger/evologger

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 » Friday 02 December 2016 15:08

My evo-settemp file looks like this.


Code: Select all

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

if len(sys.argv)<5:
        until = '0-0-0T00:00:00'
elif sys.argv[4][:1] == '0':
        until = '0-0-0T00:00:00'
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[0].zones_by_id[sys.argv[1]]._set_heat_setpoint({"HeatSetpointValue":0.0 if len(sys.arg$
open ("/var/tmp/evo-noup.tmp","w")

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

Re: Domoticz on synology for evohome

Post by Soulplayer » Friday 02 December 2016 15:25

If I use your code, I get an error:

Code: Select all

-client# ./evo-settemp.sh
  File "./evo-settemp.sh", line 28
    client.locations[0]._gateways[0]._control_systems[0].zones_by_id[sys.argv[1]]._set_heat_setpoint({"HeatSetpointValue":0.0 if len(sys.arg$
                                                                                                                                            ^
SyntaxError: invalid syntax
Edited your code a bit because my files are in evohomeclient folder:

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
import sys
import dateutil.parser

if len(sys.argv)<5:
        until = '0-0-0T00:00:00'
elif sys.argv[4][:1] == '0':
        until = '0-0-0T00:00:00'
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[0].zones_by_id[sys.argv[1]]._set_heat_setpoint({"HeatSetpointValue":0.0 if len(sys.arg$
open ("/var/tmp/evo-noup.tmp","w"))
I thought perhaps there is some code missing so i added:

Code: Select all

client.locations[0]._gateways[0]._control_systems[0].zones_by_id[sys.argv[1]]._set_heat_setpoint({"HeatSetpointValue":0.0 if len(sys.arg[b]v)<4 else float(sys.argv[3]),"SetpointMode":int(sys.argv[2]),"TimeUntil":until})[/b]
but then I get the previous error back:

Code: Select all

client# ./evo-settemp.sh
Traceback (most recent call last):
  File "./evo-settemp.sh", line 28, in <module>
    client.locations[0]._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})
IndexError: list index out of range

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 » Friday 02 December 2016 15:30

That was also my problem, I had to move them to the Evohome-client folder,

have you tried setting the zonetemp with an end time?

If I put it permanently it does not work.

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

Re: Domoticz on synology for evohome

Post by Soulplayer » Friday 02 December 2016 15:35

OMG it works... I thougt I already tried to not use the permanent settings. Thank you so much!

Now that settemp works: does setting the mode for the gateway also work on your system?

josimd
Posts: 70
Joined: Saturday 09 January 2016 20:47
Target OS: -
Domoticz version:
Contact:

Re: Domoticz on synology for evohome

Post by josimd » Friday 02 December 2016 21:33

Hi Fantilator,

Followed you steps...

from evohomeclient2 import evoconfig
>>> from evohomeclient2 import EvohomeClient
>>> client = EvohomeClient(evoconfig.usr,evoconfig.pw)
>>> fi=client.full_installation()
>>> print fi
{u'locationInfo': {u'city': u'OosXXXe', u'name': u'Home', u'useDaylightSaveSwitching': True, u'country': u'Netherlands', u'locationOwner': {u'username': u'jXXX@gmail.com', u'lastname': u'Simdorn ', u'userId': u'1396603', u'firstname': u'JXXX'}, u'streetAddress': u'HXXXringseweg ', u'locationId': u'1660670', u'postcode': u'3233SB', u'locationType': u'Residential', u'timeZone': {u'timeZoneId': u'WEuropeStandardTime', u'currentOffsetMinutes': 60, u'displayName': u'(UTC+01:00) Amsterdam, Berlijn, Bern, Rome, Stockholm, Wenen', u'offsetMinutes': 60, u'supportsDaylightSaving': True}}, u'gateways': [{u'gatewayInfo': {u'gatewayId': u'1529337', u'crc': u'6A47', u'mac': u'00D02D7DC3DF', u'isWiFi': False}, u'temperatureControlSystems': [{u'zones': [{u'name': u'Woonkamer', u'heatSetpointCapabilities': {u'valueResolution': 0.5, u'timingResolution': u'00:10:00', u'maxHeatSetpoint': 35.0, u'minHeatSetpoint': 5.0, u'allowedSetpointModes': [u'PermanentOverride', u'FollowSchedule', u'TemporaryOverride'], u'maxDuration': u'1.00:00:00'}, u'zoneId': u'1844220', u'modelType': u'HeatingZone', u'scheduleCapabilities': {u'timingResolution': u'00:10:00', u'minSwitchpointsPerDay': 1, u'maxSwitchpointsPerDay': 6, u'setpointValueResolution': 0.5}, u'zoneType': u'ZoneTemperatureControl'}], u'systemId': u'1844221', u'modelType': u'EvoTouch', u'allowedSystemModes': [{u'systemMode': u'Auto', u'canBePermanent': True, u'canBeTemporary': False}, {u'systemMode': u'AutoWithEco', u'timingMode': u'Duration', u'canBeTemporary': True, u'canBePermanent': True, u'timingResolution': u'01:00:00', u'maxDuration': u'1.00:00:00'}, {u'systemMode': u'AutoWithReset', u'canBePermanent': True, u'canBeTemporary': False}, {u'systemMode': u'Away', u'timingMode': u'Period', u'canBeTemporary': True, u'canBePermanent': True, u'timingResolution': u'1.00:00:00', u'maxDuration': u'99.00:00:00'}, {u'systemMode': u'DayOff', u'timingMode': u'Period', u'canBeTemporary': True, u'canBePermanent': True, u'timingResolution': u'1.00:00:00', u'maxDuration': u'99.00:00:00'},


root@iSIM_NAS:/volume1/@appstore/debian-chroot/var/chroottarget/home/evohome-client/evohomeclient2# python
Python 2.7.12 (default, Jul 27 2016, 05:41:41)
[GCC 4.9.3 20150311 (prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import evoconfig
>>> import requests
>>> r=requests.get("http://%s:%s/json.htm?type=hardware" % (evoconfig.url,evoconfig.port))
>>> print r.text
{
"result" : [
{
"Address" : "",
"DataTimeout" : 0,
"Enabled" : "true",
"Extra" : "",
"Mode1" : 0,
"Mode2" : 0,
"Mode3" : 0,
"Mode4" : 0,
"Mode5" : 0,
"Mode6" : 0,
"Name" : "Dummy",
"Password" : "",
"Port" : 1,
"SerialPort" : "1",
"Type" : 15,
"Username" : "",
"idx" : "3"
},
{
"Address" : "",
"DataTimeout" : 0,
"Enabled" : "true",
"Extra" : "",
"Mode1" : 0,
"Mode2" : 0,
"Mode3" : 0,
"Mode4" : 0,
"Mode5" : 0,
"Mode6" : 0,
"Name" : "Alarm",
"Password" : "",
"Port" : 1,
"SerialPort" : "1",
"Type" : 15,
"Username" : "",
"idx" : "4"
},
{
"Address" : "",
"DataTimeout" : 0,
"Enabled" : "true",
"Extra" : "",
"Mode1" : 83,
"Mode2" : 9,
"Mode3" : 8,
"Mode4" : 12,
"Mode5" : 47,
"Mode6" : 0,
"Name" : "RFXCOM",
"Password" : "",
>>>

/volume1/@appstore/debian-chroot/var/chroottarget/home/evohome-client/evohomeclient2# ./evo-update.sh init
Traceback (most recent call last):
File "./evo-update.sh", line 28, in <module>
client = EvohomeClient(evoconfig.usr,evoconfig.pw)
File "/usr/lib/python2.7/site-packages/evohomeclient2/__init__.py", line 18, in __init__
self._login()
File "/usr/lib/python2.7/site-packages/evohomeclient2/__init__.py", line 69, in _login
self.access_token = self._convert(r.text)['access_token']
KeyError: 'access_token'

evoconfig.py file: (I use no username + password to login to domoticz..)
#fill in username
usr=''
#fill in pw
pw=''
#fill in Domoticz URL

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests