Installing evok manually
-
if you are like me and found the install-evok.sh to not be acceptable to your environment here is the quick and dirty you need to know. it would be nice if this team opened the wiki documentation and let people make this product better documented rather then just posts.
First get I2C working - this assumes your Pi is updated and running 1.3 kernel
sudo nano /etc/modules ```add the following on separate lines in the file.
i2c-bcm2708
i2c-devOpen boot config.txt
sudo nano /boot/config.txt
dtparam=i2c1=on
dtparam=i2c_arm=onsudo reboot
sudo i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- 18 -- -- -- -- -- -- --
20: 20 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --**that worked correct? if not go fix it…** install and get the unipi evok package first, if you dont have git
sudo apt-get install git
cd ~
git clone https://github.com/UniPiTechnology/evokget some foundation applications
sudo apt-get install -y python-ow python-pip
sudo pip install tornado toro jsonrpclibmake and install PiGPIO from source
cd~
git clone https://github.com/joan2937/pigpio PIGPIO
cd PIGPIO
make
make install'install' the files into the OS
cd ~/evok
sudo cp -r tornadorpc_evok /usr/local/lib/python2.7/dist-packages/
sudo cp -r evok/ /opt/
sudo mkdir -p /var/www/evok && sudo cp -r www/* /var/www/
sudo cp etc/evok.conf /etc/
sudo cp uninstall-evok.sh /opt/evok/create services and set script executable
sudo cp etc/init.d/evok /etc/init.d/
sudo cp etc/init.d/pigpiod /etc/init.d/
sudo chmod +x /etc/init.d/evok
sudo chmod +x /etc/init.d/pigpiod
sudo chmod +x /opt/evok/evok.pyset the services to start
sudo update-rc.d pigpiod defaults
sudo update-rc.d evok defaultsyou should go edit the ecok.conf because it uses port 80 by default and you dont want that
sudo nano /etc/evok.conf
find the "port = 80" and change it to something like "port = 8181" start the services now
sudo service pigpiod start
sudo service evok startthen load up a browser and if you used my recommendation browse to http//PI.IP:8181 now you can mess around with it a little and see that you did something next you likely want to read up on [https://github.com/UniPiTechnology/evok#api-examples](https://github.com/UniPiTechnology/evok#api-examples)
-
if you are like me and found the install-evok.sh to not be acceptable to your environment here is the quick and dirty you need to know. it would be nice if this team opened the wiki documentation and let people make this product better documented rather then just posts.
First get I2C working - this assumes your Pi is updated and running 1.3 kernel
sudo nano /etc/modules ```add the following on separate lines in the file.
i2c-bcm2708
i2c-devOpen boot config.txt
sudo nano /boot/config.txt
dtparam=i2c1=on
dtparam=i2c_arm=onsudo reboot
sudo i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- 18 -- -- -- -- -- -- --
20: 20 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --**that worked correct? if not go fix it…** install and get the unipi evok package first, if you dont have git
sudo apt-get install git
cd ~
git clone https://github.com/UniPiTechnology/evokget some foundation applications
sudo apt-get install -y python-ow python-pip
sudo pip install tornado toro jsonrpclibmake and install PiGPIO from source
cd~
git clone https://github.com/joan2937/pigpio PIGPIO
cd PIGPIO
make
make install'install' the files into the OS
cd ~/evok
sudo cp -r tornadorpc_evok /usr/local/lib/python2.7/dist-packages/
sudo cp -r evok/ /opt/
sudo mkdir -p /var/www/evok && sudo cp -r www/* /var/www/
sudo cp etc/evok.conf /etc/
sudo cp uninstall-evok.sh /opt/evok/create services and set script executable
sudo cp etc/init.d/evok /etc/init.d/
sudo cp etc/init.d/pigpiod /etc/init.d/
sudo chmod +x /etc/init.d/evok
sudo chmod +x /etc/init.d/pigpiod
sudo chmod +x /opt/evok/evok.pyset the services to start
sudo update-rc.d pigpiod defaults
sudo update-rc.d evok defaultsyou should go edit the ecok.conf because it uses port 80 by default and you dont want that
sudo nano /etc/evok.conf
find the "port = 80" and change it to something like "port = 8181" start the services now
sudo service pigpiod start
sudo service evok startthen load up a browser and if you used my recommendation browse to http//PI.IP:8181 now you can mess around with it a little and see that you did something next you likely want to read up on [https://github.com/UniPiTechnology/evok#api-examples](https://github.com/UniPiTechnology/evok#api-examples)
-
Hello,
i did the manual installation, step by step as detailed.
The board is listed in the I2C, the services are started, but when i use a browser to approach the board i got the following message:
ERR_CONNECTION_REFUSEDAny idea why that may be?
when i use the Python using JsonRPC program example, i get a similar error (see below):
extract:
s.relay_set(1,1)
File "/usr/local/lib/python3.4/site-packages/jsonrpclib/jsonrpc.py", line 639, in call
return self.__send(self.__name, args)
File "/usr/local/lib/python3.4/site-packages/jsonrpclib/jsonrpc.py", line 523, in _request
response = self._run_request(request)
File "/usr/local/lib/python3.4/site-packages/jsonrpclib/jsonrpc.py", line 556, in _run_request
verbose=self.__verbose
File "/usr/local/lib/python3.4/xmlrpc/client.py", line 1131, in request
return self.single_request(host, handler, request_body, verbose)
File "/usr/local/lib/python3.4/site-packages/jsonrpclib/jsonrpc.py", line 361, in single_request
self.send_request(connection, handler, request_body, verbose)
File "/usr/local/lib/python3.4/site-packages/jsonrpclib/jsonrpc.py", line 400, in send_request
self.send_content(connection, request_body)
File "/usr/local/lib/python3.4/site-packages/jsonrpclib/jsonrpc.py", line 425, in send_content
connection.endheaders()
File "/usr/local/lib/python3.4/http/client.py", line 1086, in endheaders
self._send_output(message_body)
File "/usr/local/lib/python3.4/http/client.py", line 924, in _send_output
self.send(msg)
File "/usr/local/lib/python3.4/http/client.py", line 859, in send
self.connect()
File "/usr/local/lib/python3.4/http/client.py", line 836, in connect
self.timeout, self.source_address)
File "/usr/local/lib/python3.4/socket.py", line 509, in create_connection
raise err
File "/usr/local/lib/python3.4/socket.py", line 500, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
-
Hello,
try shutting the evok service down by service evok stop or by kill command with the process id. Then run /opt/evok/evok.py and past the output here so we get more detailed info…
Thanks!
-
Dear Tomas,
i am working with python3.4 and therefore issues with evok.py because i think my 2.7 environment is not default env.
I will start from a fresh debian install and first get evok running before i try installing python3.4.
Should i have problems, then i come back online.Kind Regards,
Rudy
-
Dear Tomas,
took a fresh install from debian (2015/09/24) and it worked !
#had to deviate from yr installation script as follows:
#had to install the i2c-tools:
sudo apt-get install i2c-tools
#had to add sudo:
sudo makefile # for pigpiodThanks!
Rudy
-
Dear Rudy and Thomas,
I has a similar problem with tornado, toro, and jsonrpclib getting loaded into Python 3.5. I got around this problem by changing the following line in install-evok.sh file:
"pip install tornado toro jsonrpclib"
to
"/usr/bin/pip-2.7 install tornado toro jsonrpclib"It forced the install to Python 2.7 libraries
I updated build-essentials and python-dev for 2.7 (and all other versions) first:
"sudo apt-get install build-essential python-dev"