Neuron with JSONPRC and python
-
I would like to control the Neuron with evok / jsonrpc.
I had downloaded from github the following:
wget https://github.com/UniPiTechnology/evok/archive/v1.0.0.tar.gzafter Installation without any errors I can't communicate with the Neuron.
But if I put the SD-Card into an Raspberry with Unipi-Board it works
-
@Juergen Support for Neuron in evok is not yet released. Please see https://github.com/UniPiTechnology/evok#testing-latest-git-versions
-
after downloading the new version i can control the Neuron with the web Interface.
But if i run the following program:
#!/usr/bin/env python
import jsonrpclib
s=jsonrpclib.Server('http://192.168.200.133:8088/rpc')
print("S:", s)
print("Version", jsonrpclib.config.version)
print(">>", s.relay_get(1))
s.relay_set(1,1)i get this error:
('S:', <ServerProxy for 192.168.200.133:8088/rpc>)
('Version', 2.0)
Traceback (most recent call last):
File "./MDE.py", line 6, in <module>
print(">>", s.relay_get(1))
File "/usr/local/lib/python2.7/dist-packages/jsonrpclib/jsonrpc.py", line 288, in call
return self.__send(self.__name, args)
File "/usr/local/lib/python2.7/dist-packages/jsonrpclib/jsonrpc.py", line 238, in _request
check_for_errors(response)
File "/usr/local/lib/python2.7/dist-packages/jsonrpclib/jsonrpc.py", line 567, in check_for_errors
raise ProtocolError((code, message))
jsonrpclib.jsonrpc.ProtocolError: (-32603, u'Internal Error')Any ideas ?
best regards Jürgen
-
@Juergen Relay 1 does not exists. Check the web interface of evok for correct identification. The correct identification is eg. 2_1