I am experimenting with the UniPi and I have to say, it is indeed very easy with the evok-api.
Within minutes was the board installed, the evok-api build and the webinterface running!
One small comment about the install script:
use with the "sudo apt-get" and the "sudo pip" the -E option of sudo. This way the script also
will work in a network with a proxy. (if the proxy env is set of course)
But I need a little help with my next experiment:
I want to "skip" the evok-api and try to use python and the PIGPIO lib to read the input
and switch the relay direct. I keep using the PIGPIO Deamon which came wit the install.
And also I import the pigpio.py which came with the evok-api.
My bigest problem is that I do not fuly understand the I2C Bus principals with the UniPi
And that the evok-api is compleetly open, is fantastic! But I could not extract the complete
code for a very simple proof of concept.
So can somebody help me and post a minimal block of code for reading a Digital Input
and switch one of the relays ?
Code: Select all
i2cbus = 1
address = 0x20
pi = pigpio.pi()
handle = pi.i2c_open(i2cbus, address, 0)
> and here I get stock <
if __name__ == '__main__':