• Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Internal Error (500) after fresh Evok installation

    Official API - Evok
    3
    12
    5400
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      actiwerks last edited by

      I also noticed that I can't stop Evok service the way it is described in the Github (debugging section). I get "Failed to stop evok.service: The name org.freedesktop.PolicyKit1 was not provided by any .service files" - does this mean that Evok was not properly installed ?

      On top of that, I have the log file full of the following error :

      2017-11-07 23:10:21,222 - evok - ERROR - 'NoneType' object has no attribute 'do_scan'
      Traceback (most recent call last):
      File "/opt/evok/neuron.py", line 217, in scan_boards
      yield self.modbus_cache_map.do_scan()

      1 Reply Last reply Reply Quote 0
      • T
        TomasKnot last edited by TomasKnot

        Hi @actiwerks!

        The second error often happens because the systemctl command requires root privileges; you can fix it by running "sudo su"
        (sans the quotes) before the "systemctl stop evok" command (and any other time the "org.freedesktop.PolicyKit1" error appears). It is a general linux issue, which has nothing to do with EVOK as such.

        As for the first issue, it looks like EVOK can't see your Neuron at all. It would help to have three diagnostic files; could you please post (ideally by uploading to https://pastebin.com/ as they are rather long) the output from "python /opt/evok.py", your "/etc/evok.conf" file, and the output from "ps -fax"?

        1 Reply Last reply Reply Quote 0
        • Vesa Kauppinen
          Vesa Kauppinen last edited by

          Hi,

          I have same issue with M103

          evok.conf -> https://pastebin.com/kqbXDD7D

          ...and

          python evok.py -> https://pastebin.com/eBz9v4w6

          Vesa

          1 Reply Last reply Reply Quote 0
          • T
            TomasKnot last edited by TomasKnot

            @Vesa-Kauppinen

            From the log it looks like your I2C EEPROM module is not working correctly. The type of your Neuron device is stored in the EEPROM, and without it EVOK can't tell which model you have.

            If you run the "cat /sys/bus/i2c/devices/1-0057/eeprom" command, do you get a valid reply? It should look something like this (for L513):

            �������������������������������������������������������������������������������������������������U�L513������������������#
            

            The file is editable as well, so you should be able to change the id string characters to "M103" to get it to work

            Edit: Please use the code button (end of the compose post bar) if you do post the output here, as the characters break forum formatting otherwise.

            Vesa Kauppinen 1 Reply Last reply Reply Quote 0
            • Vesa Kauppinen
              Vesa Kauppinen last edited by

              Hi Tomas,

              Thank you for quick reply.

              My /sys/bus/i2c/devices directory has only i2c-1 -dir.....weird!

              Vesa

              T 1 Reply Last reply Reply Quote 0
              • T
                TomasKnot @Vesa Kauppinen last edited by

                @Vesa-Kauppinen

                Could you post the output of "i2cdetect 1" and "lsmod"? It does look like the EEPROM isn't available for some reason.

                1 Reply Last reply Reply Quote 0
                • Vesa Kauppinen
                  Vesa Kauppinen last edited by Vesa Kauppinen

                  I made fresh Rasbian install (RASPBIAN STRETCH LITE, 2017-09-07) and also fresh Evok install with these instructions:

                  sudo su
                  wget https://github.com/UniPiTechnology/evok/archive/master.zip
                  unzip master.zip
                  cd evok-master
                  bash install-evok.sh
                  

                  That Nginx based interface works fine but when i try use Evok rest api with terminal i get error:

                  --2017-11-16 11:25:58--  http://localhost:8080/rest/relay/1
                  Resolving localhost (localhost)... ::1, 127.0.0.1
                  Connecting to localhost (localhost)|::1|:8080... connected.
                  HTTP request sent, awaiting response... 500 Internal Server Error
                  2017-11-16 11:25:58 ERROR 500: Internal Server Error.
                  

                  i2cdetect 1

                       0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
                  00:          -- -- -- -- -- -- -- -- -- -- -- -- --
                  10: -- -- -- -- -- -- -- -- 18 -- -- -- -- -- -- --
                  20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
                  30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
                  40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
                  50: -- -- -- -- -- -- -- UU -- -- -- -- -- -- -- --
                  60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- UU
                  70: -- -- -- -- -- -- -- --
                  

                  and...

                  lsmod

                  Module                  Size  Used by
                  iptable_nat             2320  0
                  nf_conntrack_ipv4       8890  1
                  nf_defrag_ipv4          1824  1 nf_conntrack_ipv4
                  nf_nat_ipv4             6071  1 iptable_nat
                  nf_nat                 18854  1 nf_nat_ipv4
                  nf_conntrack          104634  3 nf_conntrack_ipv4,nf_nat_ipv4,nf_nat
                  cmac                    3239  0
                  bnep                   12051  2
                  hci_uart               20020  1
                  btbcm                   7916  1 hci_uart
                  bluetooth             365780  12 hci_uart,bnep,btbcm
                  spidev                  7373  4
                  brcmfmac              292632  0
                  brcmutil                9863  1 brcmfmac
                  cfg80211              544545  1 brcmfmac
                  rfkill                 20851  6 bluetooth,cfg80211
                  snd_bcm2835            24427  0
                  snd_pcm                98501  1 snd_bcm2835
                  snd_timer              23968  1 snd_pcm
                  snd                    70032  3 snd_timer,snd_bcm2835,snd_pcm
                  bcm2835_gpiomem         3940  0
                  i2c_bcm2835             7167  7
                  spi_bcm2835             7596  0
                  uio_pdrv_genirq         3923  0
                  fixed                   3285  0
                  uio                    10204  1 uio_pdrv_genirq
                  rtc_ds1307             13908  0
                  hwmon                  10552  1 rtc_ds1307
                  at24                    7587  0
                  nvmem_core             13774  1 at24
                  i2c_dev                 6913  14
                  i2c_bcm2708             5994  0
                  ip_tables              13161  1 iptable_nat
                  x_tables               20578  1 ip_tables
                  ipv6                  408900  36
                  

                  However, this wget http://localhost:8080/rest/all works and gives such an answer:

                  [  
                     {  
                        "counter_modes":[  
                           "Enabled",
                           "Disabled"
                        ],
                        "glob_dev_id":1,
                        "modes":[  
                           "Simple",
                           "DirectSwitch"
                        ],
                        "value":0,
                        "circuit":"1_01",
                        "debounce":50,
                        "counter":0,
                        "counter_mode":"Enabled",
                        "dev":"input",
                        "mode":"Simple"
                     },
                     {  
                        "counter_modes":[  
                           "Enabled",
                           "Disabled"
                        ],
                        "glob_dev_id":1,
                        "modes":[  
                           "Simple",
                           "DirectSwitch"
                        ],
                        "value":0,
                        "circuit":"1_02",
                        "debounce":50,
                        "counter":0,
                        "counter_mode":"Enabled",
                        "dev":"input",
                        "mode":"Simple"
                     },
                     {  
                        "counter_modes":[  
                           "Enabled",
                           "Disabled"
                        ],
                        "glob_dev_id":1,
                        "modes":[  
                           "Simple",
                           "DirectSwitch"
                        ],
                        "value":0,
                        "circuit":"1_03",
                        "debounce":50,
                        "counter":0,
                        "counter_mode":"Enabled",
                        "dev":"input",
                        "mode":"Simple"
                     },
                     {  
                        "counter_modes":[  
                           "Enabled",
                           "Disabled"
                        ],
                        "glob_dev_id":1,
                        "modes":[  
                           "Simple",
                           "DirectSwitch"
                        ],
                        "value":0,
                        "circuit":"1_04",
                        "debounce":50,
                        "counter":0,
                        "counter_mode":"Enabled",
                        "dev":"input",
                        "mode":"Simple"
                     },
                     {  
                        "counter_modes":[  
                           "Enabled",
                           "Disabled"
                        ],
                        "glob_dev_id":1,
                        "modes":[  
                           "Simple",
                           "DirectSwitch"
                        ],
                        "value":0,
                        "circuit":"2_05",
                        "debounce":50,
                        "counter":0,
                        "counter_mode":"Enabled",
                        "dev":"input",
                        "mode":"Simple"
                     },
                     {  
                        "counter_modes":[  
                           "Enabled",
                           "Disabled"
                        ],
                        "glob_dev_id":1,
                        "modes":[  
                           "Simple",
                           "DirectSwitch"
                        ],
                        "value":0,
                        "circuit":"2_04",
                        "debounce":50,
                        "counter":0,
                        "counter_mode":"Enabled",
                        "dev":"input",
                        "mode":"Simple"
                     },
                     {  
                        "counter_modes":[  
                           "Enabled",
                           "Disabled"
                        ],
                        "glob_dev_id":1,
                        "modes":[  
                           "Simple",
                           "DirectSwitch"
                        ],
                        "value":0,
                        "circuit":"2_07",
                        "debounce":50,
                        "counter":0,
                        "counter_mode":"Enabled",
                        "dev":"input",
                        "mode":"Simple"
                     },
                     {  
                        "counter_modes":[  
                           "Enabled",
                           "Disabled"
                        ],
                        "glob_dev_id":1,
                        "modes":[  
                           "Simple",
                           "DirectSwitch"
                        ],
                        "value":0,
                        "circuit":"2_06",
                        "debounce":50,
                        "counter":0,
                        "counter_mode":"Enabled",
                        "dev":"input",
                        "mode":"Simple"
                     },
                     {  
                        "counter_modes":[  
                           "Enabled",
                           "Disabled"
                        ],
                        "glob_dev_id":1,
                        "modes":[  
                           "Simple",
                           "DirectSwitch"
                        ],
                        "value":0,
                        "circuit":"2_01",
                        "debounce":50,
                        "counter":0,
                        "counter_mode":"Enabled",
                        "dev":"input",
                        "mode":"Simple"
                     },
                     {  
                        "counter_modes":[  
                           "Enabled",
                           "Disabled"
                        ],
                        "glob_dev_id":1,
                        "modes":[  
                           "Simple",
                           "DirectSwitch"
                        ],
                        "value":0,
                        "circuit":"2_03",
                        "debounce":50,
                        "counter":0,
                        "counter_mode":"Enabled",
                        "dev":"input",
                        "mode":"Simple"
                     },
                     {  
                        "counter_modes":[  
                           "Enabled",
                           "Disabled"
                        ],
                        "glob_dev_id":1,
                        "modes":[  
                           "Simple",
                           "DirectSwitch"
                        ],
                        "value":0,
                        "circuit":"2_02",
                        "debounce":50,
                        "counter":0,
                        "counter_mode":"Enabled",
                        "dev":"input",
                        "mode":"Simple"
                     },
                     {  
                        "counter_modes":[  
                           "Enabled",
                           "Disabled"
                        ],
                        "glob_dev_id":1,
                        "modes":[  
                           "Simple",
                           "DirectSwitch"
                        ],
                        "value":0,
                        "circuit":"2_08",
                        "debounce":50,
                        "counter":0,
                        "counter_mode":"Enabled",
                        "dev":"input",
                        "mode":"Simple"
                     },
                     {  
                        "glob_dev_id":1,
                        "modes":[  
                           "Simple",
                           "PWM"
                        ],
                        "value":0,
                        "circuit":"1_01",
                        "alias":"al_lights_kitchen",
                        "pending":false,
                        "relay_type":"digital",
                        "dev":"relay",
                        "mode":"Simple"
                     },
                     {  
                        "glob_dev_id":1,
                        "modes":[  
                           "Simple",
                           "PWM"
                        ],
                        "value":0,
                        "circuit":"1_02",
                        "alias":"al_lights_bedroom",
                        "pending":false,
                        "relay_type":"digital",
                        "dev":"relay",
                        "mode":"Simple"
                     },
                     {  
                        "glob_dev_id":1,
                        "modes":[  
                           "Simple",
                           "PWM"
                        ],
                        "value":0,
                        "circuit":"1_03",
                        "pending":false,
                        "relay_type":"digital",
                        "dev":"relay",
                        "mode":"Simple"
                     },
                     {  
                        "glob_dev_id":1,
                        "modes":[  
                           "Simple",
                           "PWM"
                        ],
                        "value":0,
                        "circuit":"1_04",
                        "pending":false,
                        "relay_type":"digital",
                        "dev":"relay",
                        "mode":"Simple"
                     },
                     {  
                        "glob_dev_id":1,
                        "modes":[  
                           "Simple"
                        ],
                        "value":0,
                        "circuit":"2_05",
                        "pending":false,
                        "relay_type":"physical",
                        "dev":"relay",
                        "mode":"Simple"
                     },
                     {  
                        "glob_dev_id":1,
                        "modes":[  
                           "Simple"
                        ],
                        "value":0,
                        "circuit":"2_04",
                        "pending":false,
                        "relay_type":"physical",
                        "dev":"relay",
                        "mode":"Simple"
                     },
                     {  
                        "glob_dev_id":1,
                        "modes":[  
                           "Simple"
                        ],
                        "value":0,
                        "circuit":"2_07",
                        "pending":false,
                        "relay_type":"physical",
                        "dev":"relay",
                        "mode":"Simple"
                     },
                     {  
                        "glob_dev_id":1,
                        "modes":[  
                           "Simple"
                        ],
                        "value":0,
                        "circuit":"2_06",
                        "pending":false,
                        "relay_type":"physical",
                        "dev":"relay",
                        "mode":"Simple"
                     },
                     {  
                        "glob_dev_id":1,
                        "modes":[  
                           "Simple"
                        ],
                        "value":0,
                        "circuit":"2_01",
                        "pending":false,
                        "relay_type":"physical",
                        "dev":"relay",
                        "mode":"Simple"
                     },
                     {  
                        "glob_dev_id":1,
                        "modes":[  
                           "Simple"
                        ],
                        "value":0,
                        "circuit":"2_03",
                        "pending":false,
                        "relay_type":"physical",
                        "dev":"relay",
                        "mode":"Simple"
                     },
                     {  
                        "glob_dev_id":1,
                        "modes":[  
                           "Simple"
                        ],
                        "value":0,
                        "circuit":"2_02",
                        "pending":false,
                        "relay_type":"physical",
                        "dev":"relay",
                        "mode":"Simple"
                     },
                     {  
                        "glob_dev_id":1,
                        "modes":[  
                           "Simple"
                        ],
                        "value":0,
                        "circuit":"2_08",
                        "pending":false,
                        "relay_type":"physical",
                        "dev":"relay",
                        "mode":"Simple"
                     },
                     {  
                        "glob_dev_id":1,
                        "unit":"V",
                        "value":0.0104380739939046,
                        "circuit":"1_01",
                        "range_modes":[  
                           "10.0"
                        ],
                        "modes":[  
                           "Voltage",
                           "Current"
                        ],
                        "range":"10.0",
                        "dev":"ai",
                        "mode":"Voltage"
                     },
                     {  
                        "modes":[  
                           "Voltage",
                           "Current",
                           "Resistance"
                        ],
                        "value":0.0,
                        "glob_dev_id":1,
                        "dev":"ao",
                        "circuit":"1_01",
                        "unit":"V",
                        "mode":"Voltage"
                     },
                     {  
                        "interval":15,
                        "value":22.8,
                        "circuit":"28094BDD0600005C",
                        "address":"28094BDD0600005C",
                        "time":1510831979.685484,
                        "typ":"DS18B20",
                        "lost":false,
                        "dev":"temp"
                     },
                     {  
                        "value":0,
                        "circuit":"1_01",
                        "dev":"led",
                        "glob_dev_id":1
                     },
                     {  
                        "value":0,
                        "circuit":"1_02",
                        "dev":"led",
                        "glob_dev_id":1
                     },
                     {  
                        "value":0,
                        "circuit":"1_03",
                        "dev":"led",
                        "glob_dev_id":1
                     },
                     {  
                        "value":0,
                        "circuit":"1_04",
                        "dev":"led",
                        "glob_dev_id":1
                     },
                     {  
                        "circuit":"1_01",
                        "value":0,
                        "glob_dev_id":1,
                        "dev":"wd",
                        "timeout":5000,
                        "was_wd_reset":0,
                        "nv_save":0
                     },
                     {  
                        "circuit":"2_01",
                        "value":0,
                        "glob_dev_id":1,
                        "dev":"wd",
                        "timeout":5000,
                        "was_wd_reset":0,
                        "nv_save":0
                     },
                     {  
                        "ver2":"1.0",
                        "dev":"neuron",
                        "glob_dev_id":1,
                        "sn":81,
                        "circuit":"1",
                        "model":"M103",
                        "board_count":2
                     },
                     {  
                        "glob_dev_id":1,
                        "conf_value":15,
                        "stopb_modes":[  
                           "One",
                           "Two"
                        ],
                        "stopb_mode":"One",
                        "circuit":"1_01",
                        "speed_modes":[  
                           "2400bps",
                           "4800bps",
                           "9600bps",
                           "19200bps",
                           "38400bps",
                           "57600bps",
                           "115200bps"
                        ],
                        "parity_modes":[  
                           "None",
                           "Odd",
                           "Even"
                        ],
                        "parity_mode":"None",
                        "dev":"uart",
                        "speed_mode":"38400bps"
                     },
                     {  
                        "glob_dev_id":0,
                        "circuit":"1_01",
                        "ap_state":"Disabled",
                        "dev":"wifi",
                        "eth0_masq":"Disabled"
                     }
                  ]
                  

                  Vesa

                  1 Reply Last reply Reply Quote 0
                  • T
                    TomasKnot last edited by TomasKnot

                    The id numbering scheme is x_yy, with x being the group (1,2,3) and yy being the id (i.e. 1_01 for the first relay).

                    Anyway from your i2cdetect (and the fact that EVOK runs as well) it looks like the EEPROM works fine now.

                    You can read more about the numbering in our EVOK documentation, subsection on "Note regarding device addressing" on the introduction page: https://evok.api-docs.io/1.0/jKcTKe5aRBCNjt8Az/introduction#note-regarding-device-addressing

                    1 Reply Last reply Reply Quote 0
                    • Vesa Kauppinen
                      Vesa Kauppinen last edited by

                      Aaaa....ok

                      wget http://localhost:8080/rest/relay/2_01
                      

                      Yep...this works fine!

                      So....how about Evok 2 with UniPi 1.1? Is there any plans to update that principle to UniPi 1.1?

                      Thank you!

                      Vesa

                      T 1 Reply Last reply Reply Quote 0
                      • Vesa Kauppinen
                        Vesa Kauppinen @TomasKnot last edited by

                        This post is deleted!
                        1 Reply Last reply Reply Quote 0
                        • T
                          TomasKnot @Vesa Kauppinen last edited by TomasKnot

                          @Vesa-Kauppinen
                          Glad to hear it works now!

                          EVOK 2.0 should work fine UniPi 1.1, but obviously much of the extra hardware functionality which Neuron has will be missing.

                          The UniPi 1.1 also has an EEPROM, it's just in a slightly different format. The reason that the installation needs to know which hardware you have is that we need to install certain different libraries to get the hardware to work correctly. Unfortunately this cannot be done automatically, as the EEPROM is not loaded during the installation yet.

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post