Page 1 of 1

EvoHome Wifi help needed

Posted: Wednesday 07 September 2016 21:37
by ArjanPeeters
Hi all,

First i'd like to say that i'm just learning to use my raspberry pi and my linux knowledge isn't up to parr. How ever i do know how to use google and it has come to a point that i'm seeing the same answers over and over again on google.
My problem:
I have used the domoticz raspberry pi image. And to start off I wanted to be able to graph my evohome setup. I have a relatively new one, without separate internet gateways. So i need to use the scripted one ( http://www.domoticz.com/wiki/Evohome#Sc ... _or_RFG100).
But i cannot get my evo-update.sh to initialize. I think i have tried everything, from using the python command to ./evo-home.sh init, in varios combinations.

When i just run it as an excecutable i get:
pi@raspberrypi:~$ evo-update.sh init EvoHomeZones
/usr/local/bin/evo-update.sh: line 15: import: command not found
from: can't read /var/mail/evohomeclient2
/usr/local/bin/evo-update.sh: line 17: import: command not found
/usr/local/bin/evo-update.sh: line 18: import: command not found
/usr/local/bin/evo-update.sh: line 19: import: command not found
/usr/local/bin/evo-update.sh: line 20: import: command not found
/usr/local/bin/evo-update.sh: line 21: import: command not found
/usr/local/bin/evo-update.sh: line 22: import: command not found
/usr/local/bin/evo-update.sh: line 24: syntax error near unexpected token `"/var/tmp/evo-noup.tmp"'
/usr/local/bin/evo-update.sh: line 24: `if os.path.isfile("/var/tmp/evo-noup.tmp"):'
And i when i use it as a phyton script the error is:
pi@raspberrypi:~$ python /usr/local/bin/evo-update.sh init EvoHome
File "/usr/local/bin/evo-update.sh", line 53
r=requests.get("http://%s:%s/json.htm?type=command&param=addhardware&htype=40&port=1&name=%s&enabled=true&datatimeout=0" % (evoconfig.url,evoconfig.port,hwname))
^
SyntaxError: invalid syntax
I use a mac with ssh on terminal to connect (don't know if its important).

Any ideas would be much appreciated!

Re: EvoHome Wifi help needed

Posted: Thursday 08 September 2016 7:12
by ArjanPeeters
Just to be clear. Domoticz is installed on a raspberry pi model 3 and I use my mac and terminal to ssh my way in to the pi.
Is the command above still needed?

Re: EvoHome Wifi help needed

Posted: Thursday 08 September 2016 10:18
by ArjanPeeters
Many thanks! I will try tonight and post results.

Re: EvoHome Wifi help needed

Posted: Thursday 08 September 2016 16:02
by DanM
There is a utility called dos2unix that available for the pi (sudo apt-get install dos2unix). Its effectively the same as the command above, but a useful shortcut if like me you do a lot of editing in windows environments before transfer to the pi.

Re: EvoHome Wifi help needed

Posted: Wednesday 26 April 2017 10:08
by OmeAnne
I know it's a bit of a topic kick, but since I have the same problem (didn't try the dos2unix solution yet) I was wondering if you got it to work!
The biggist difference is, I'm trying to install it on my Synology DS216play

But I must be doing something right, when I execute the script below I do get a reply with values that look an awefull lot like the values in my EvoHome app. ;)

Code: Select all

#!/usr/bin/python
import sys
import requests
from evohomeclient2 import EvohomeClient

client = EvohomeClient('email', 'password')

for device in client.temperatures():
    print(device['temp'])
    print(device['setpoint'])
    

Re: EvoHome Wifi help needed

Posted: Wednesday 26 April 2017 10:42
by ArjanPeeters
I got it to work, but i used a different rpi image.
And made the script excecutable, than i ran the script first time outside of domoticz.
That dit it for me.

Re: EvoHome Wifi help needed

Posted: Wednesday 26 April 2017 12:22
by OmeAnne
Did nothing with the DOS unix thingy??

Re: EvoHome Wifi help needed

Posted: Wednesday 26 April 2017 12:49
by ArjanPeeters
Nope. Not a thing.

Re: EvoHome Wifi help needed

Posted: Wednesday 26 April 2017 15:25
by OmeAnne
Looked at it again with a colleague and it seems there was a copy paste problem. It inserted a lot of tabs! I'll try to fix it when I'm home.