• Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. Raph7454
    R
    • Profile
    • Following 0
    • Followers 0
    • Topics 3
    • Posts 9
    • Best 0
    • Controversial 0
    • Groups 0

    Raph7454

    @Raph7454

    0
    Reputation
    475
    Profile views
    9
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    Raph7454 Unfollow Follow

    Latest posts made by Raph7454

    • RE: Novice in CODESYS

      Thank you Martin

      I've already do it.

      Is there a project example ?

      posted in CODESYS
      R
      Raph7454
    • RE: Novice in CODESYS

      Hi Martin

      UniPi 1.1 and a EMO R8 extension relays card

      Best regards
      Raphaël

      posted in CODESYS
      R
      Raph7454
    • Novice in CODESYS

      hello,

      I am novice in Codesys UniPi for Raspberry
      I have already installed all packages from the Data sheet CODESYS For UniPi that works (I purchased CODESYS Control for Rapsberry Pi SL)
      But i would like to have a example project to learn if it's possible please (activate Relays, 1 wire, ...) And how can I download the project compiled into my Raspberry ?

      Thank you very much

      Raphaël

      posted in CODESYS
      R
      Raph7454
    • RE: API Listen PORT EVOK

      Yes I restart EVOK

      Here is my evok.conf file :

      #!!! Do not use '#' for comments !!!

      [MAIN]
      config_version = 2.4
      use_experimental_api = False ; Currently in Alpha - known issues
      regenerate_api_docs = False ; Active only with the experimental API setting
      log_level = ERROR ; One of INFO, DEBUG, WARNING, ERROR, CRITICAL
      log_file = /var/log/evok.log ; Log file to use; will be cleared on boot
      port = 1974 ; !!! Internal API port - only change if you are certain you know what you are doing; FOR OUR WEB INTERFACE THE PORT SHOULD BE CHANGED IN "/etc/evok-nginx.conf" INSTEAD !!!
      ;modbus_port = 0
      ;modbus_address = *
      webhook_enabled = False ; Enables webhook notification - see e.g. https://sendgrid.com/blog/whats-webhook/
      webhook_address = http://127.0.0.1:80 ; Put your server endpoint address here (e.g. http://123.123.123.123:/wh )
      webhook_device_mask = ["input","wd"] ; List of device types to notify on (written as a JSON list) - adding AI will generate a large amount of messages!
      webhook_complex_events = False ; EVOK will send POST requests with the same data as WebSocket, rather than an empty GET request
      wifi_control_enabled = False ; !!! REQUIRES THE UNIPIAP WIFI CONTROLLER TO BE INSTALLED !!! Will allow evok to control the internal Neuron wifi
      soap_server_enabled = False ; Enables the simple SOAP server; use only if you need the functionality
      soap_server_port = 8081 ; !!! IF SOAP SERVER IS ENABLED, THIS PORT NEEDS TO BE UNIQUE (i.e. different from the port setting above) !!!

      [OWBUS_1]
      owbus = /dev/i2c-1 --i2c=/dev/i2c-1:ALL ; scanned bus (--i2c=/dev/i2c-1:ALL or localhost:2122 or 'u' for USB dongle)
      interval = 3 ; [s] default sensor reading
      scan_interval = 300 ; [s] how often is made searching

      ;[SENSOR_1] ; onewire thermometer
      ;bus = 1 ; link to OWBUS_X
      ;address = 28527B930500001F
      ;type = DS18B20
      ;interval = 1

      [I2CBUS_1]
      busid = 1 ;[integer] id of bus /dev/i2c-X

      ;[EPROM_1] ;EPROM device will not be used anymore, eprom should be handled by kernel module
      ;i2cbus = 1
      ;address = 0x50
      ;size = 256

      [MCP_1]
      i2cbus = 1 ; link to I2CBUS_X
      address = 0x20 ; i2c address

      [RELAY_1]
      mcp = 1 ; link to MCP_X
      pin = 7

      [RELAY_2]
      mcp = 1 ; link to MCP_X
      pin = 6

      [RELAY_3]
      mcp = 1
      pin = 5

      [RELAY_4]
      mcp = 1
      pin = 4

      [RELAY_5]
      mcp = 1
      pin = 3

      [RELAY_6]
      mcp = 1
      pin = 2

      [RELAY_7]
      mcp = 1
      pin = 1

      [RELAY_8]
      mcp = 1
      pin = 0

      [AICHIP_1]
      i2cbus =1
      address = 0x68

      [AI_1]
      chip=1
      channel=0
      bits=18
      gain=1
      ;correction = 5.558737622
      ;correction = 5.564920867
      corr_rom = 1
      corr_addr = 0xf0
      interval=2

      [AI_2]
      chip=1
      channel=1
      bits=18
      gain=1
      ;correction = 5.558737622
      ;correction = 5.564920867
      corr_rom = 1
      corr_addr = 0xf4
      interval=1

      [GPIOBUS_1]

      [AO_1]
      gpiobus = 1
      frequency = 100

      [DI_1]
      gpiobus = 1
      pin=4
      debounce = 0
      ;Enable counting on rising/falling edge or disable it
      ;By default(or parameter not present) this function is disabled
      ;Can be turned on on all on-board digital inputs (not inputs on 1Wire or other extensions)
      ;counter_mode = rising
      ;counter_mode = falling
      ;counter_mode = disabled

      [DI_2]
      gpiobus = 1
      pin=17
      debounce = 0

      [DI_3]
      gpiobus = 1
      pin=27
      debounce = 0

      [DI_4]
      gpiobus = 1
      pin=23
      debounce = 0

      [DI_5]
      gpiobus = 1
      pin=22
      debounce = 0

      [DI_6]
      gpiobus = 1
      pin=24
      debounce = 0

      [DI_7]
      gpiobus = 1
      pin=11
      debounce = 0

      [DI_8]
      gpiobus = 1
      pin=7
      debounce = 0

      [DI_9]
      gpiobus = 1
      pin=8
      debounce = 0

      [DI_10]
      gpiobus = 1
      pin=9
      debounce = 0

      [DI_11]
      gpiobus = 1
      pin=25
      debounce = 0

      [DI_12]
      gpiobus = 1
      pin=10
      debounce = 0

      ;[DI_13]
      ;gpiobus = 1
      ;pin=31
      ;debounce = 0

      ;[DI_14]
      ;gpiobus = 1
      ;pin=30
      ;debounce = 0

      ;
      ;Example of 8xRelay extension module addon (EMO-R8) on address 0x21
      ;
      [MCP_2]
      i2cbus = 1
      address = 0x21

      [RELAY_9]
      mcp = 2
      pin = 7

      [RELAY_10]
      mcp = 2
      pin = 6

      [RELAY_11]
      mcp = 2
      pin = 5

      [RELAY_12]
      mcp = 2
      pin = 4

      [RELAY_13]
      mcp = 2
      pin = 3

      [RELAY_14]
      mcp = 2
      pin = 2

      [RELAY_15]
      mcp = 2
      pin = 1

      [RELAY_16]
      mcp = 2
      pin = 0

      ;
      ;Example of Analog Output extension module EMO-Ao4/12
      ;
      ;[PCA9685_1]
      ;i2cbus = 1
      ;address = 0x40
      ;frequency = 400
      ;
      ;[AO_2]
      ;pca = 1
      ;channel = 0
      ;
      ;[AO_3]
      ;pca = 1
      ;channel = 1
      ;
      ;[AO_4]
      ;pca = 1
      ;channel = 2
      ;
      ;[AO_5]
      ;pca = 1
      ;channel = 3

      ;Example of 1W-4R/4DI extension module, 1W-8R is almost the same just replace inputs with relays
      ;
      ; - First map a new 1Wire sensor with appropriate address, type, and interval
      ; - Can use both SENSOR or 1WDEVICE syntax
      ; - Reading interval is crucial to achieve expected performance, default interval is 15s
      ;
      ;[1WDEVICE_2]
      ;bus = 1
      ;address = 29F39A17000000BC
      ;type = DS2408
      ;interval = 1
      ;
      ;[1WRELAY_10]
      ;sensor = 2
      ;pin = 0
      ;
      ;[1WRELAY_11]
      ;sensor = 2
      ;pin = 1
      ;
      ;[1WRELAY_12]
      ;sensor = 2
      ;pin = 2
      ;
      ;[1WRELAY_13]
      ;sensor = 2
      ;pin = 3
      ;
      ;[1WINPUT_20]
      ;sensor = 2
      ;pin = 4
      ;
      ;[1WINPUT_21]
      ;sensor = 2
      ;pin = 5
      ;
      ;[1WINPUT_22]
      ;sensor = 2
      ;pin = 6
      ;
      ;[1WINPUT_23]
      ;sensor = 2
      ;pin = 7

      Thanks !
      Raph

      posted in Official EVOK API
      R
      Raph7454
    • RE: API Listen PORT EVOK

      Thank you Tomas, it works !

      Another problem :
      I bought a 8 relays add-on EMO R8, and enable in /etc/evok.conf the second mcp
      [MCP_2]
      i2cbus = 1
      address = 0x21)

      [RELAY_9]
      mcp = 2
      pin = 7

      and so on... until [RELAY_16]

      but it does'nt work !
      With RPC in Python :
      if I try : s.relay_set(9,1)
      I have a protocol error in return ProtocolError: (-32603, u'Internal Error')

      And in a POST Request : the server returns "Invalid device circuit number 9"

      Any idea ?

      Regards

      posted in Official EVOK API
      R
      Raph7454
    • RE: API Listen PORT EVOK

      Hi Tomas !

      Thank you.
      I've already installed EVOK, and what is the procedure to change the website port to 88 for example ?
      in /etc/evok.conf ??

      If I understand you correctly, when NGINX is deleted the website is disable but the GET and POST requests still work ?
      the requests should be directed to the port 8080
      ex : http://my_ad_ip:8080/rest/relay/1

      Thank you
      Raph

      posted in Official EVOK API
      R
      Raph7454
    • API Listen PORT EVOK

      Hi,

      I don't really understand the difference between the two listen ports (API, REST,... ??)

      I would like to change the listen port, which is used for the GET and POST requests in REST, and the same is used for the simple web page demo for example.

      I can't install apache2 in my Raspberry because of an error on the port 80 already used by EVOK...

      I am using UniPi V1.1

      Can you help me please ?
      Thank you

      Regards
      Raph

      posted in Official EVOK API
      R
      Raph7454
    • RE: 1-Wire rpc Problem

      Hi Tomas !

      Thank you so much for your help

      I work with Raspberry PI 3 and Raspbian Stretch 9.4.
      I have installed Evok two weeks ago.

      What do you mean about "image" please, can I just make a manually re-install of Evok API ? what's the best way to do that please ? I am a beginner with Linux OS..

      I see your files : "tknot Fixed 1Wire RPC for UniPi 1.1" in https://github.com/UniPiTechnology/evok/tree/master/evok

      Thanks
      Best regards

      posted in Official EVOK API
      R
      Raph7454
    • 1-Wire rpc Problem

      Hi,

      I am un Unipi V1.1 User and I would like using 1-Wire devices with python scripts.
      It doesn't work !

      Here is my script and the error :

      from jsonrpclib import Server
      s=Server("http://127.0.0.1/rpc")
      s.owbus_scan(1)

      Traceback (most recent call last):
      File "<pyshell#2>", line 1, in <module>
      s.owbus_scan(1)
      ProtocolError: (-32603, u'Internal Error')

      However, in the web interface, the Device DS18S20 works perfectly.

      Thank you for your help !

      posted in Official EVOK API
      R
      Raph7454