Navigation

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. Regulvar
    R
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Regulvar

    @Regulvar

    0
    Reputation
    3
    Posts
    448
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    Regulvar Follow

    Best posts made by Regulvar

    This user hasn't posted anything yet.

    Latest posts made by Regulvar

    • RE: Relay Command with Python

      Thanks this is working for a while…
      Regards,

      posted in Official EVOK API
      R
      Regulvar
    • RE: Relay Command with Python

      Hi

      I'm trying to command a relay with python using the jsonrpclib, my relay is worked well but I have an error.
      Can you help me?

      from jsonrpclib import Server
      
      s=Server("http://IPAdressUnipi/rpc")
      
      relay1=s.relay_get(1)
      print relay1[0]
      value=int(1-relay1[0])
      print value
      
      if value:
              s.relay_set(1,1)
      else:
              s.relay_set(1,0)
      
      

      Traceback (most recent call last):
      File "unipi.py", line 12, in <module>
      s.relay_set(1,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 239, in _request
      return response['result']
      TypeError: 'NoneType' object has no attribute 'getitem'

      posted in Official EVOK API
      R
      Regulvar
    • Relay Command with Python

      Hi

      I'm trying to command a relay with python using the jsonrpclib, my relay is worked well but I have an error.
      Can you help me?

      from jsonrpclib import Server
      
      s=Server("http://IPAdressUnipi/rpc")
      
      relay1=s.relay_get(1)
      print relay1[0]
      value=int(1-relay1[0])
      print value
      
      if value:
              s.relay_set(1,1)
      else:
              s.relay_set(1,0)
      
      

      Traceback (most recent call last):
      File "unipi.py", line 12, in <module>
      s.relay_set(1,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 239, in _request
      return response['result']
      TypeError: 'NoneType' object has no attribute 'getitem'

      posted in Official EVOK API
      R
      Regulvar