After installation of a xG18 extention I get a Server Error 500 for the Rest Json
-
After installation of a xG18 extention I get a Server Error 500 for the Rest Json.
With a fresh install of EVOK everithing runs fine. Then I installed a xG18 module and made the configuration in the /etc/evok.conf as follow:[EXTENSION_xG18_1] global_id = 2 ; Mandatory, REQUIRED TO BE UNIQUE device_name = xG18 ; Mandatory, must match name of .yaml modbus map file in /etc/hw_definitions modbus_uart_port = /dev/extcomm/0/0 ; Mandatory ;neuron_uart_circuit = 1_01 ; Optional, allows associating extensions with specific Neuron UART-over-Modbus ports (not possible for non-Modbus $ ;allow_register_access = True ; Optional, False default, is mandatory with third-party devices ;address = 1 ; Optional, 1 default ;scan_frequency = 10 ; Optional, 10 default, scanning frequency in [Hz] ;scan_enabled = True ; Optional, True default ; Note that the following settings will be inherited by other devices sharing the same port, i.e. /dev/extcomm/0/0 ;baud_rate = 19200 ; Optional, NEEDS UNIPI IMAGE TO WORK WITH UNIPI SERIAL PORTS! USE API TO CONFIGURE UART MANUALLY IF USING STANDARD$ ;parity = N ; Optional, NEEDS UNIPI IMAGE TO WORK WITH UNIPI SERIAL PORTS! USE API TO CONFIGURE UART MANUALLY IF USING STANDARD$ ;stop_bits = 1 ; Optional, NEEDS UNIPI IMAGE TO WORK WITH UNIPI SERIAL PORTS! USE API TO CONFIGURE UART MANUALLY IF USING STANDARD$
After that the Extension appear in the EVOK Webfrontend. But when I made a
http://myunipi/json/all
I get a:
Do you have any Idea why? When I uncomment the xG18 section the Server Error disapeer.
-
Hello @Stoeffel,
please, send the whole configuration and the version of Evok you are using. The version can be accessed via:dpkg -l | grep evok
.Thank you,
Martin
-
Hello Martin
Thanks for reply. I made following steps after a sudo apt-get update and upgrade to find the problem:
sudo apt-get remove --purge evok && sudo apt-get install evok
... after that, the json Server runs well, but after uncomment the three Mandatory lines for my xG18 Extension and after a "sudo service evok restart"
the Server Quit with Error 500. I can reproduce this every time.dpkg -l | grep evok
any@anysps:~ $ dpkg -l | grep evok ii evok 2.3.8~stretch armhf UniPi API based on the Tornado webserver
cat /etc/evok.conf:
#!!! Do not use '#' for comments !!! [MAIN] ; !!! ALL MAIN SECTION OPTIONS ARE MANDATORY !!! config_version = 2.5 ; Configuration file version, DO NOT CHANGE! use_schema_verification = False ; Enabling this will deny any requests that do not match the JSON Schema; NOTE THAT THIS RESULTS IN A SIGNIFICANT INCREASE IN LATENCY AND SHOULD NOT BE USED EXCEPT FOR TESTING log_level = ERROR ; Minimum severity of messages to be logged; one of INFO, DEBUG, WARNING, ERROR, CRITICAL log_file = /var/log/evok.log ; Log file to use; will be cleared on boot port = 8080 ; !!! 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 !!! 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 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) !!! force_immediate_state_changes = False ; Outputs will return the value they are set to, rather than the value that the device is currently aware of websocket_all_filtered = False ; 'All' WebSocket requests will be subject to the filtering set by 'filter' [NEURON_1] global_id = 1 ; Mandatory, REQUIRED TO BE UNIQUE allow_register_access = False ; Optional, False default scan_frequency = 10 ; Optional, 10 default, scanning frequency in [Hz] scan_enabled = True ; Optional, True default ; Below you can find examples for connecting devices over UART; first example is a Neuron extension while the second is a custom third-party device ; Devices sharing a port use the port settings of the first device on that port (baud rate, parity, stop bits) ; !!! Note that device_name has to match a filename in the /etc/hw_definitions directory !!! See /etc/hw_definitions/CUSTOM_MODBUS_DEVICE.yaml for an example ;[EXTENSION_1] ;global_id = 2 ; Mandatory, REQUIRED TO BE UNIQUE ;device_name = xS10 ; Mandatory, must match name of .yaml modbus map file in /etc/hw_definitions ;modbus_uart_port = /dev/extcomm/0/0 ; Mandatory ;neuron_uart_circuit = 1_01 ; Optional, allows associating extensions with specific Neuron UART-over-Modbus ports (not possible for non-Modbus UART ports, e.g. /dev/ttyUSB0 or /dev/ttyS0) ;allow_register_access = True ; Optional, False default, is mandatory with third-party devices ;address = 1 ; Optional, 1 default ;scan_frequency = 10 ; Optional, 10 default, scanning frequency in [Hz] ;scan_enabled = True ; Optional, True default ; Note that the following settings will be inherited by other devices sharing the same port, i.e. /dev/extcomm/0/0 ;baud_rate = 19200 ; Optional, NEEDS UNIPI IMAGE TO WORK WITH UNIPI SERIAL PORTS! USE API TO CONFIGURE UART MANUALLY IF USING STANDARD RASPBIAN ;parity = N ; Optional, NEEDS UNIPI IMAGE TO WORK WITH UNIPI SERIAL PORTS! USE API TO CONFIGURE UART MANUALLY IF USING STANDARD RASPBIAN ;stop_bits = 1 ; Optional, NEEDS UNIPI IMAGE TO WORK WITH UNIPI SERIAL PORTS! USE API TO CONFIGURE UART MANUALLY IF USING STANDARD RASPBIAN [EXTENSION_xG18_1] global_id = 2 ; Mandatory, REQUIRED TO BE UNIQUE device_name = xG18 ; Mandatory, must match name of .yaml modbus map file in /etc/hw_definitions modbus_uart_port = /dev/extcomm/0/0 ; Mandatory ;neuron_uart_circuit = 1_01 ; Optional, allows associating extensions with specific Neuron UART-over-Modbus ports (not possible for non-Modbus UART ports, e.g. /dev/$ ;allow_register_access = True ; Optional, False default, is mandatory with third-party devices ;address = 1 ; Optional, 1 default ;scan_frequency = 10 ; Optional, 10 default, scanning frequency in [Hz] ;scan_enabled = True ; Optional, True default ; Note that the following settings will be inherited by other devices sharing the same port, i.e. /dev/extcomm/0/0 ;baud_rate = 19200 ; Optional, NEEDS UNIPI IMAGE TO WORK WITH UNIPI SERIAL PORTS! USE API TO CONFIGURE UART MANUALLY IF USING STANDARD RASPBIAN ;parity = N ; Optional, NEEDS UNIPI IMAGE TO WORK WITH UNIPI SERIAL PORTS! USE API TO CONFIGURE UART MANUALLY IF USING STANDARD RASPBIAN ;stop_bits = 1 ; Optional, NEEDS UNIPI IMAGE TO WORK WITH UNIPI SERIAL PORTS! USE API TO CONFIGURE UART MANUALLY IF USING STANDARD RASPBIAN ;[EXTENSION_2] ;global_id = 3 ; Mandatory, REQUIRED TO BE UNIQUE ;device_name = CUSTOM MODBUS DEVICE ; Mandatory, must match name of .yaml modbus map file in /etc/hw_definitions ;modbus_uart_port = /dev/extcomm/0/0 ; Mandatory ;neuron_uart_circuit = 1_01 ; Optional, allows associating extensions with specific Neuron UART-over-Modbus ports (not possible for non-Modbus UART ports, e.g. /dev/ttyUSB0 or /dev/ttyS0) ;allow_register_access = True ; Mandatory with third-party devices ;address = 1 ; Optional, 15 default ;scan_frequency = 2 ; Optional, 1 default, scanning frequency in [Hz] ;scan_enabled = True ; Optional, True default [OWBUS_1] owbus = /dev/i2c-1 ; Mandatory, scanned bus (--i2c=/dev/i2c-1:ALL or localhost:2122 or 'u' for USB dongle) interval = 3 ; Mandatory, [s] length of sensor reading scan_interval = 300 ; Mandatory, [s] How often the scanning is done ; See below for 1Wire extension module configuration ; Example for the 1W-4R/4DI extension module, 1W-8R is almost the same, only with inputs instead of relays ; ; - Map a new 1Wire sensor with the appropriate address, type and interval ; - The syntax can be either SENSOR or 1WDEVICE ; - Setting the correct reading interval is crucial to achieve ideal performance; the 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
-
Hello Martin
Do you need further information? I have a second installation with a new M203. If it helps I can try to repeat the issue there again.Kind regards Stefan