Domoticz on synology for evohome

For heating/cooling related questions in Domoticz
Erwinvos72
Posts: 61
Joined: Thursday 25 February 2016 17:30
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Domoticz on synology for evohome

Post by Erwinvos72 » Wednesday 23 March 2016 14:42

Hi Allen en Gordon,

i have seen that the ^M isn't removed with the command supplied.
So i have a windows tool now that does the trick, and i will try it again with those files

Then i will try it again. Keep you guys informed.

Erwinvos72
Posts: 61
Joined: Thursday 25 February 2016 17:30
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Domoticz on synology for evohome

Post by Erwinvos72 » Wednesday 23 March 2016 19:10

The synchronization is Working. It was the ^M what causes the problem.
So now every minute it is update.

And now there is only one thing to solve. When i change the temperature on domoticz after a minute it is set back to the original
I looked at the evotouch which is also created and i saw that it is looking voor de set-evomode as i a correct. But in the .py file i pointed to a wrong directory.
I changed it and the path changed. But it says that it has to begin with script:// but in the .py script it is ///
And it isn't update so i think there is still something wrong.

But almost there.
Thanks

Erwinvos72
Posts: 61
Joined: Thursday 25 February 2016 17:30
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Domoticz on synology for evohome

Post by Erwinvos72 » Friday 25 March 2016 8:44

Anyone?

gordonb3
Posts: 567
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 » Friday 25 March 2016 10:39

It needs to be '///'

'script://' defines the protocol to be used (i.e. file system). The third slash is the reference to root.


I found some issues lately with regard to changing settings in scripted evohome and submitted some patches. Obviously this is of no use to you since you are running an older binary created for Synology. There is however a tweak that I also added to the wiki page that will allow you to change the setpoint on a zone. You may first want to try though if setting a time limit on the change setpoint does in fact become visible on the EvoTouch.

As far as setmode is concerned I'm sorry. I cannot make that work for you. The patch I submitted was added to the code base just yesterday and you would need to build/compile a new version of Domoticz to be able to use that. That said: the problem is with the hardware ID being too long and you could probably create a rather ugly hack in the scripts to fool Domoticz in using a made up ID that does allow the setmode script to be triggered. You would need to add a replace-string to the output from evo-update.sh (real ID of EvoTouch -> shorter fake ID) and hardcode the real ID in the setmode script. This is all theory of course.
Excito B3 running Gentoo Linux, P1, Rfxtrx433 to read and control TFA, KaKu, EvoHome RFG100
Custom patched Domoticz v3.8000

Erwinvos72
Posts: 61
Joined: Thursday 25 February 2016 17:30
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Domoticz on synology for evohome

Post by Erwinvos72 » Friday 25 March 2016 11:32

Hi Gordon,

thnx for your reply, you mean /json.htm?type=setused&idx=<idx>&setpoint=<setpoint>&mode=<mode>&used=true ?

i tried it but i received an error 'exit 127 on setused'
Think it is my lack of knowledge.

I understood that Alle had all working on his synology and he offered assistance via teamviewer. So i send hem an email and hope we can arrange a meetign and he can solve these last issues.

@Alle, i send you an email, i hope we can arrange a teamviewer session.

gordonb3
Posts: 567
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 » Friday 25 March 2016 17:19

I have not looked at the precise URI, but the setmode function has an internal check that uses the hardware defined ID (not idx, that is the Domoticz internal ID) which in the HGI80 USB/Serial interface is a five digit hexadecimal number and a seven digit decimal number with the scripted interface to the RFG100 gateway. The trouble is that the original code will only use the last six digits and the internal check fails because it can't find the right record.

Similar with setsetpoint, the script should be called with one parameter short if you do a permanent override. Instead it sends an invalid date 0000-00-00T00:00:00Z. I changed the Wiki some time ago to handle that incorrect parameter, but I don't know how long ago you pulled the scripts from it. You could try to temporary replace the scripts with a shell script that dumps all the parameters to a file:

Code: Select all

#!/bin/sh
echo $* > /tmp/settemp.log
Trigger a settemp action and `cat /tmp/settemp.log` to verify that it fired and what parameters were sent. You can do the same with the setmode script, but I can practically guarantee that it will never fire.
Excito B3 running Gentoo Linux, P1, Rfxtrx433 to read and control TFA, KaKu, EvoHome RFG100
Custom patched Domoticz v3.8000

mschut
Posts: 136
Joined: Sunday 23 February 2014 22:40
Target OS: Raspberry Pi
Domoticz version: V3.5613
Location: Netherlands
Contact:

Re: Domoticz on synology for evohome

Post by mschut » Saturday 26 March 2016 23:24

I might say something quite stupid, but is the Domoticz Package an option?

http://www.jadahl.com/

gordonb3
Posts: 567
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 » Sunday 27 March 2016 10:01

The scripts for accessing evohome internet gateway are not part of the domoticz distributed files. You need to get them from the wiki. And selecting 'main' modes like away, normal or heating off is disfunctional in this hardware type with versions prior to #5009.
Excito B3 running Gentoo Linux, P1, Rfxtrx433 to read and control TFA, KaKu, EvoHome RFG100
Custom patched Domoticz v3.8000

mschut
Posts: 136
Joined: Sunday 23 February 2014 22:40
Target OS: Raspberry Pi
Domoticz version: V3.5613
Location: Netherlands
Contact:

Re: Domoticz on synology for evohome

Post by mschut » Sunday 27 March 2016 12:23

I am using the HGI-80, that is working with the package. So that was my context. Good luck then!

gordonb3
Posts: 567
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 » Sunday 27 March 2016 14:05

Yes. I found that the code base appeared to be largely based on HGI80 behaviour. Took some thinking to make it work for the scripted evohome without loosing the original working method for the USB/Serial device.
Excito B3 running Gentoo Linux, P1, Rfxtrx433 to read and control TFA, KaKu, EvoHome RFG100
Custom patched Domoticz v3.8000

Erwinvos72
Posts: 61
Joined: Thursday 25 February 2016 17:30
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Domoticz on synology for evohome

Post by Erwinvos72 » Tuesday 29 March 2016 20:23

Hi guys,

Have been offline for few days so nothing news under the sun.
I'll make an appointment with alle and then come back with the results

Erwinvos72
Posts: 61
Joined: Thursday 25 February 2016 17:30
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Domoticz on synology for evohome

Post by Erwinvos72 » Thursday 15 September 2016 11:40

Hello everyone,

i had rested my synology domoticz in combination with evohome for a period, but now i want to get the last pieces to get to work.

I see al my zones in domoticz and i have a scheduled task in my synology which updates every minute, which works good
Now i am still not able to change the temperature of the zones. Ik can change it and i see it, but after a minute (my schedule) it is set back to my default value from my evohome.
Also my evotouch is not working. It is not updated, from the moment the device was added.

I had some troubles to get it to work, so maybe something on the road i have made a mistake or forgot something.

Can anyone help me to get this solved?

gordonb3
Posts: 567
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 » Thursday 15 September 2016 16:52

If the changes are reset when running your schedule, this means that the command was in fact never submitted to the evohome site and back to your central controller.

Please reference my previous comments in this thread. If you are running a domoticz build older than 5009 it is virtually impossible to set evohome mode. There is a fairly simple hack for set temperature which I added to the wiki. Verify that your script matches the one currently in the wiki. You may also try the alternative update script here in the forum which will load the until time for set temperature with the next scheduled time from your controller (requires some additional python modules to be installed).
Excito B3 running Gentoo Linux, P1, Rfxtrx433 to read and control TFA, KaKu, EvoHome RFG100
Custom patched Domoticz v3.8000

Erwinvos72
Posts: 61
Joined: Thursday 25 February 2016 17:30
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Domoticz on synology for evohome

Post by Erwinvos72 » Friday 16 September 2016 13:31

Gordon,

Do you mean this part 'Updating the evohome controller mode using the JSON API' and 'updating a setpoint using the JSON API' ?
Where do i implement these commands? Do i have to put them in one of the scripts above?

gordonb3
Posts: 567
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 » Friday 16 September 2016 15:58

Erwinvos72 wrote:Gordon,

Do you mean this part 'Updating the evohome controller mode using the JSON API' and 'updating a setpoint using the JSON API' ?
Where do i implement these commands? Do i have to put them in one of the scripts above?
No

Those are the commands that you can observe being executed by the web front end of domoticz if you change a setting. There are full scripts listed on that wiki page. The relevant part of the script evo-settemp.sh being:

Code: Select all

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')
These lines were added on March 10 of this year. If you do not have them you must have referenced the wiki prior to that date. The 'elif' test is what will allow you to set a permanent override with older builds of domoticz,. including the last stable. It has no relevance for beta >= 5009. Do note that the old version of the script should allow you to set an override with a valid 'Until' time. If that is not the case something else is wrong. e.g. the script might be missing (you didn't follow the wiki) or contain invalid characters (DOS line endings).
Excito B3 running Gentoo Linux, P1, Rfxtrx433 to read and control TFA, KaKu, EvoHome RFG100
Custom patched Domoticz v3.8000

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 » Friday 04 November 2016 23:56

Hello, I've been reading this topic thoroughly and I've managed to set up my evohome wifi for 80% (I run domoticz on a Synology NAS)
The part where i struggle also is the settemp (setmode not even possible I believe so far)
It shows my zones and the temps in it, and it shows "Evohome Touch" which does not update and which i cannot do much with but that might be by design.But i thought here I should be able to do setmode I guess? Or is the setmode meant for events?
Anyhow, like the TS, when i set a temp override, during the update it is set back to it's earlier value, like it won't update to the website.
Did i make a mistake somewhere? I believe i followed the wiki exactly and also the hints and tips in this topic. Any help would be much appreciated and if needed more details, please tell me and i would be happy to supply them of course.
Thanks in advance
Martin
PS, I'm running latest beta of domoticz and as far as I know all the latest versions of scripts etc.

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 15:28

Hurray! Looks like i got it working now. :D

I will write later today what i did to make it work, just in case someone else might run into the same problems.

One thing which i did not manage to implement is the alternative script of Gordon with the until routine in it. I do get an error on line 142 saying keyerror: u'unknown'
I tried to install pytz and i think it went ok but maybe there is a problem?

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 17:37

There are a few things which i changed to make it work, maybe some were not related to this problem but i will mention it anyhow to be complete.
First of all, there is a difference regarding the root user password in systems with DSM 5.x versus DSM 6.x. In 5 the root password is the same as the admin password, however, in 6 you will have to login as admin and then do sudo -i to get root access.

Anyhow, first i followed the little tutorial of user Alle on the first page of this topic, after that the wiki page. Since i work from a windows pc i followed then the tip from gordonb3 in this topic to remove the ^M with the line of code he suggested, works perfectly.

However, still not possible to set a different temp or away action or anything, after a minute it all defaults back to original values.

I then remembered gordonb3 was wondering why to use chroot for the schedule. So i started playing with that and yes, without chroot-ing , the command in the scheduler also works fine after adjusting the location in the command of course, so i left it without chroot.
Still not working but then i noticed in the domoticz log some error entries that it could not find the settemp script. That made sense i think since no more chroot-ing, the path was now slightly different, so i adjusted the script location in evoconfig.py and then finally it worked!!!

Thanks a lot all the users here whose help and hints and tips brought me to the solution!

There are a few minor things left to solve but for now it works well.
I would also really love to use the alternative evo-update script of gordonb3 but for some reason i cannot manage to get it to work, well, maybe tomorrow i will spend some more time on that.

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 17:57

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?
Last edited by Soulplayer on Saturday 05 November 2016 18:39, edited 2 times in total.

mschut
Posts: 136
Joined: Sunday 23 February 2014 22:40
Target OS: Raspberry Pi
Domoticz version: V3.5613
Location: Netherlands
Contact:

Re: Domoticz on synology for evohome

Post by mschut » Saturday 05 November 2016 18:02

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?

Verstuurd vanaf mijn SM-G920F met Tapatalk

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests