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
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login