Clone or download
Latest commit f88ca93 Sep 19, 2018
Permalink
Failed to load latest commit information.
.copy_over_.git/hooks Updated git hooks May 22, 2018
UnipiDali Updated Debian package configuration files Aug 13, 2018
boot/overlays Fixed installation script for newer kernels Sep 5, 2017
debian Updated changelog and Debian version Sep 10, 2018
etc First quick draft of a debian package Aug 10, 2018
evok Added the read_holding_registers method into the updated AsyncModbusG… Sep 7, 2018
misc First quick draft of a debian package Aug 10, 2018
opt/unipiap RC pre-release commit 1 Oct 13, 2017
pigpio Updated PIGPIO to V54 Jun 24, 2016
tornadorpc_evok Fixed errors with json_rpc and coroutines Mar 5, 2018
usr/lib/python2.7/UnipiDali Initial commit Nov 2, 2017
var RC pre-release commit 1 Oct 13, 2017
www/evok Updated refresh display method for Digital Input counter mode on UniP… Aug 30, 2018
.exrc Improved RPC handling and 2.0.1 release update Nov 23, 2017
.gitignore Added .pyc file filter to .gitignore Aug 8, 2017
.project Updated Eclipse project Mar 1, 2018
.pydevproject Fixed filtering for 1Wire sensors Feb 13, 2018
LICENSE Added more info, pigpio, readme, ... Nov 14, 2014
README.md Update README.md Sep 19, 2018
_config.yml Set theme jekyll-theme-slate Sep 8, 2017
dependencies.txt Final update for release candidate 1 Nov 1, 2017
history.txt Updated/added versioning May 21, 2018
install-evok.sh Removed unnecessary shutdown of the wlan0 adapter, to prevent a WiFi … Aug 27, 2018
issue_template.md Update issue_template.md Feb 6, 2018
requirements.txt Updated requirements.txt Aug 13, 2018
set_adc_coef.py Fixed some typos Nov 25, 2015
setup.py Updated setup.py Aug 13, 2018
uninstall-evok.sh Removed sudo commands Sep 30, 2015
version.txt Updated changelog and Debian version Sep 10, 2018

README.md

alt text

EVOK - the UniPi API

EVOK is the primary Web API for NEURON and UniPi 1.1 devices. It provides a RESTful interface over HTTP, a JSON-RPC interface, a WebSocket interface a SOAP interface and a bulk JSON interface to UniPi devices.

Evok is still in active development, so any testing, feedback and contributions are very much welcome and appreciated.

APIs included in EVOK:

  • RESTful WebForms API
  • RESTful JSON API
  • Bulk request JSON API
  • WebSocket API
  • SOAP API
  • JSON-RPC API

EVOK also supports sending notifications via webhook.

For more information see our documentation at api-docs.io.

Installation process for the latest (2.X.X) EVOK version on Neuron

Warning: if you have previously used the shell script install method noted below you will need to use a clean image!

In order to install EVOK on Neuron you will need an SD card with a standard Raspbian Jessie or Raspbian Stretch image. It is also necessary to enable SSH on the image by creating an empty file named "ssh" in the boot partition of your SD card (the partition should be visible on all systems which support FAT16, which includes Windows, Linux and OSX among others).

To install EVOK itself first connect to your Neuron using SSH (there is a large number of clients you can use, for windows we recommend using PUTTY). The default username for Raspbian is "pi" and the default password is "raspberry". After you connect to your Neuron execute the following commands:

NOTE: The installation process will overwrite default server configuration for NGINX

sudo su
echo "deb https://repo.unipi.technology/debian stretch main" >> /etc/apt/sources.list
wget https://repo.unipi.technology/debian/unipi_pub.gpg -O - | apt-key add
apt-get update
apt-get upgrade
reboot

sudo su
apt-get install nginx
rm -f /etc/nginx/sites-enabled/default
apt-get install unipi-modbus-tools
apt-get install evok
systemctl enable evok
reboot

It is possible that some (or all) of the above steps will already have been finished previously; in that case simply continue on with the next steps. Performing all the steps will ensure you have the latest version of the software installed.

You can use the following commands to update your EVOK package distribution to a new version:

sudo su
apt-get update
apt-get upgrade
reboot

sudo su
apt-get install unipi-modbus-tools
reboot

Legacy installation process using a shell script (REQUIRED FOR UNIPI 1.1!)

In order to install EVOK on Neuron you will need an SD card with a standard Raspbian Jessie or Raspbian Stretch image. It is also necessary to enable SSH on the image by creating an empty file named "ssh" in the boot partition of your SD card (the partition should be visible on all systems which support FAT16, which includes Windows, Linux and OSX among others).

To install EVOK itself first connect to your Neuron using SSH (there is a large number of clients you can use, for windows we recommend using PUTTY). The default username for Raspbian is "pi" and the default password is "raspberry". After you connect to your Neuron execute the following commands:

sudo su
wget https://github.com/UniPiTechnology/evok/archive/v.2.0.7c.zip
unzip v.2.0.7c.zip
cd evok-v.2.0.7c
bash install-evok.sh

The installation script should take care of everything else, but be aware there may be some issues with limited and/or broken functionality. Please report any bugs you find on the github repository.

Installing EVOK on AXON PLCs

EVOK is installed slightly differently on Axon PLCs than on Neuron PLCs. The Axon installation process is based entirely around premade packages which are already enabled on the device, all that's required is to login to the PLC via SSH (there is a large number of clients you can use, for windows we recommend using PUTTY). The default username for Axon PLCs is "unipi" and the default password is "unipi.technology". After you connect to your Axon PLC execute the following commands:

sudo su
apt-get update
apt-get upgrade
reboot

sudo su
apt-get install unipi-modbus-tools
apt-get install evok
systemctl enable evok
reboot

It is possible that some (or all) of the above steps will already have been finished previously; in that case simply continue on with the next steps. Performing all the steps will ensure you have the latest version of the software installed.

You can use the following commands to update your EVOK package distribution to a new version:

sudo su
apt-get update
apt-get upgrade
reboot

Installation process for Evok v.1.X.X

Access to GPIOs is done using the fantastic PIGPIO library. Make sure to install it first before use.

EVOK v.1.X.X also requires a few other python libraries that are not installed on Raspbian by default:

Download the latest release from our repository via wget (alternatively you can clone the repository using git):

wget https://github.com/UniPiTechnology/evok/archive/v.1.0.2.tar.gz
tar -zxvf v.1.0.2.tar.gz && mv evok-* evok  

Please note that the folder that you downloaded the package into is not used later and can be safely deleted after the installation. Configuration files are installed directly into /etc/, /opt/ and /boot/

Run the installation script using the following instructions

cd evok
chmod +x install-evok.sh uninstall-evok.sh
sudo ./install-evok.sh

Instructions for use

The EVOK API can be accessed in several different ways, including SOAP, REST, Bulk JSON, JSON, WebSocket et al.

For details on how to do so please see our documentation at api-docs.io.

Debugging

When reporting a bug or posting questions to our forum please set proper logging levels in /etc/evok.conf, restart your device and check the log file (/var/log/evok.log). For more detailed log information you can also run evok by hand. To do that you need to first stop the service by executing the

sudo systemctl stop evok

command and then run it manually as root user

sudo python /opt/evok/evok.py

and look through/paste the output of the script.

NOTE: Running EVOK manually is not possible if using the .deb package installation system; the log file should be used instead

Uninstallation

Debian package installation

To uninstall EVOK please remove the evok package using the following apt command

sudo su
apt-get remove evok
reboot

Script installation

To uninstall EVOK please run the uninstallation script which is located in the /opt/evok/ folder.

sudo su
bash uninstall-evok.sh

Note that after uninstalling Evok you have to reboot your device to ensure all the files and settings are gone.

The installation script also enables the I2C subsystem (if it is not otherwise enabled before), but the uninstallation script does not disable it again.

Developer Note

Do you feel like contributing to EVOK, or perhaps have a neat idea for an improvement to our system? Great! We are open to all ideas. Get in touch with us via email to info at unipi DOT technology

License

Apache License, Version 2.0


Raspberry Pi is a trademark of the Raspberry Pi Foundation