@TomasKnot or @Martin-Kudláček:
Is there anything that can be done with this? It is a real problem for us and are holding back production.
Andreas
@TomasKnot or @Martin-Kudláček:
Is there anything that can be done with this? It is a real problem for us and are holding back production.
Andreas
More info:
root@L513-sn24:/home/pi# systemctl status unipitcp
● unipitcp.service - Unipi Neuron/Axon Modbus/Tcp Server
Loaded: loaded (/lib/systemd/system/unipitcp.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2018-12-04 08:37:49 UTC; 4h 38min ago
Process: 847 ExecStartPre=/bin/sh -c if [ "${FIRMWARE_UPDATE}" = "1" ]; then /opt/unipi-bin/fwspi --auto; fi (code=exited, status=0/SUCCESS)
Main PID: 874 (unipi_tcp_serve)
CGroup: /system.slice/unipitcp.service
└─874 /opt/unipi-bin/unipi_tcp_server -p 502
Dec 04 08:37:49 raspberrypi systemd[1]: Starting Unipi Neuron/Axon Modbus/Tcp Server...
Dec 04 08:37:49 L513-sn24 systemd[1]: Started Unipi Neuron/Axon Modbus/Tcp Server.
root@L513-sn24:/home/pi# /opt/unipi-bin/fwspi -i 0
Boardset: 0 B-1000 (v1.0)
Baseboard: 0 B-1000 (v1.0)
Firmware: v5.31
root@L513-sn24:/home/pi# /opt/unipi-bin/fwspi -i 1
Boardset: 15 E-4Ai4Ao_U-6Di5Ro (v1.0)
Baseboard: 11 E-4Ai4Ao (v1.0)
Firmware: v5.31
root@L513-sn24:/home/pi# /opt/unipi-bin/fwspi -i 2
Boardset: 15 E-4Ai4Ao_U-6Di5Ro (v1.0)
Baseboard: 11 E-4Ai4Ao (v1.0)
Hi @TomasKnot .
Here's the 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 F
OR 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 "/e
tc/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
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) !!!
[NEURON_1]
global_id = 1 ; Mandatory, REQUIRED TO BE UNIQUE
allow_register_access = True
scan_frequency = 10 ; Optional, 10 default, scanning frequency in [Hz]
scan_enabled = True
; 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 = xS40 ; Mandatory
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 = 2 ; 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 = xS40 ; Mandatory
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 = 12 ; 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 --i2c=/dev/i2c-1:ALL ; 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
Andreas
Hello @Martin-Kudláček
The issue that I'm experiencing is that the communication between the units are unstable. The lights are blinking asynchronically and there seems to be no logic in it. Sometimes things works stable for a little while, then stops working again. I'm using EVOK which I'm mainly talking ws with from a Node-RED.
I've made a short video that you can watch here https://www.dropbox.com/s/9fg3tknug736xja/IMG_1966.m4v?dl=0
BR,
Andreas
Hi,
I have one L513 and 2 xS40s. They are having a lot of issues communicating, and often needs to be rebooted. I've been trying to read through the documentation, but can not find a straight forward explanation as to how to connect them all. The extensions have modbus address 2 and 12, 19.2/N on both. One of the xS40s have the the end bit set. On the L513 I use the first 485 port and have set the end bit on that one too. Does this sound correct? Is there anything else I should be aware off? Which modbus address does the L513 get?
Thanks,
Andreas
@martin-kudláček Thanks! That worked! Maybe you could update your docs?
BTW: Version is Repository:evok ActiveBranch:[master] PrecedingRelease:v.2.0.7b PrecedingRevision:326(aacb3a9) LatestCommit:Mon Sep 10 11:39:34 CEST 2018
Hi!
After enabling "allow_register_access" I can access port 502 with telnet locally, but all other connections are not responded to. This used to work, but after an upgrade it seems to binding to the loopback interface only.
evok.conf:
[NEURON_1]
global_id = 1 ; Mandatory, REQUIRED TO BE UNIQUE
allow_register_access = True
scan_frequency = 10 ; Optional, 10 default, scanning frequency in [Hz]
scan_enabled = True
Output from netstat -lptu
root@L513-sn24:/home/pi# netstat -lptu
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:http 0.0.0.0:* LISTEN 1001/nginx: master
tcp 0 0 0.0.0.0:http-alt 0.0.0.0:* LISTEN 773/python
tcp 0 0 0.0.0.0:ssh 0.0.0.0:* LISTEN 997/sshd
tcp 0 0 localhost:502 0.0.0.0:* LISTEN 867/unipi_tcp_serve
tcp6 0 0 [::]:http-alt [::]:* LISTEN 773/python
tcp6 0 0 [::]:ssh [::]:* LISTEN 997/sshd
udp 0 0 0.0.0.0:bootpc 0.0.0.0:* 982/dhcpcd
udp 0 0 0.0.0.0:48767 0.0.0.0:* 899/avahi-daemon: r
udp 0 0 0.0.0.0:mdns 0.0.0.0:* 899/avahi-daemon: r
udp6 0 0 [::]:mdns [::]:* 899/avahi-daemon: r
udp6 0 0 [::]:58202 [::]:* 899/avahi-daemon: r
That worked! It needs a reboot between the first update and the unipi-stuff. Thanks!
I installed
apt-get install raspberrypi-kernel-headers
Then removed evok and unipi-modbus-tools before I reinstalled them. New status is:
Sep 18 16:10:51 L513-sn24 systemd[1]: Starting EVOK ModBus/WebSocket/RPC Server...
Sep 18 16:10:51 L513-sn24 systemd[1]: Started EVOK ModBus/WebSocket/RPC Server.
Sep 18 16:10:53 L513-sn24 OWFS[5331]: DEFAULT: ow_arg.c:(110) Cannot access device /dev/i2c-1
Sep 18 16:10:53 L513-sn24 OWFS[5331]: DEFAULT: owlib.c:(52) No valid 1-wire buses found
This might be interesting:
root@raspberrypi:/home/pi# apt-get install unipi-modbus-tools
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
busybox neuron-kernel unipi-common
The following NEW packages will be installed:
busybox neuron-kernel unipi-common unipi-modbus-tools
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 456 kB of archives.
After this operation, 1153 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://raspbian.trivini.no/raspbian stretch/main armhf busybox armhf 1:1.22.0-19 [374 kB]
Get:2 https://repo.unipi.technology/debian stretch/main armhf unipi-common armhf 1.1.10 [9574 B]
Get:3 https://repo.unipi.technology/debian stretch/main armhf unipi-modbus-tools armhf 1.1.10 [41.6 kB]
Get:4 https://repo.unipi.technology/debian stretch/main armhf neuron-kernel armhf 1.15.20180914 [30.7 kB]
Fetched 456 kB in 1s (353 kB/s)
apt-listchanges: Can't set locale; make sure $LC_* and $LANG are correct!
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_CTYPE = "UTF-8",
LANG = "en_GB.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_GB.UTF-8").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
Selecting previously unselected package busybox.
(Reading database ... 34695 files and directories currently installed.)
Preparing to unpack .../busybox_1%3a1.22.0-19_armhf.deb ...
Unpacking busybox (1:1.22.0-19) ...
Selecting previously unselected package unipi-common.
Preparing to unpack .../unipi-common_1.1.10_armhf.deb ...
Adding 'diversion of /boot/overlays/ds2482.dtbo to /usr/share/rpikernelhack/overlays/ds2482.dtbo by rpikernelhack'
Adding 'diversion of /boot/overlays/neuronee.dtbo to /usr/share/rpikernelhack/overlays/neuronee.dtbo by rpikernelhack'
Adding 'diversion of /boot/overlays/neuron-spi.dtbo to /usr/share/rpikernelhack/overlays/neuron-spi.dtbo by rpikernelhack'
Adding 'diversion of /boot/overlays/neuron-spi-new.dtbo to /usr/share/rpikernelhack/overlays/neuron-spi-new.dtbo by rpikernelhack'
Adding 'diversion of /boot/overlays/unipiee.dtbo to /usr/share/rpikernelhack/overlays/unipiee.dtbo by rpikernelhack'
Unpacking unipi-common (1.1.10) ...
Selecting previously unselected package unipi-modbus-tools.
Preparing to unpack .../unipi-modbus-tools_1.1.10_armhf.deb ...
Unpacking unipi-modbus-tools (1.1.10) ...
Selecting previously unselected package neuron-kernel.
Preparing to unpack .../neuron-kernel_1.15.20180914_armhf.deb ...
Unpacking neuron-kernel (1.15.20180914) ...
Setting up busybox (1:1.22.0-19) ...
Processing triggers for man-db (2.7.6.1-2) ...
Setting up unipi-common (1.1.10) ...
Removing 'diversion of /boot/overlays/ds2482.dtbo to /usr/share/rpikernelhack/overlays/ds2482.dtbo by rpikernelhack'
Removing 'diversion of /boot/overlays/neuronee.dtbo to /usr/share/rpikernelhack/overlays/neuronee.dtbo by rpikernelhack'
Removing 'diversion of /boot/overlays/neuron-spi-new.dtbo to /usr/share/rpikernelhack/overlays/neuron-spi-new.dtbo by rpikernelhack'
Removing 'diversion of /boot/overlays/neuron-spi.dtbo to /usr/share/rpikernelhack/overlays/neuron-spi.dtbo by rpikernelhack'
Removing 'diversion of /boot/overlays/unipiee.dtbo to /usr/share/rpikernelhack/overlays/unipiee.dtbo by rpikernelhack'
Created symlink /etc/systemd/system/sysinit.target.wants/unipicheck.service → /lib/systemd/system/unipicheck.service.
update-initramfs: Generating /boot/initrd.img-4.14.50-v7+
WARNING: missing /lib/modules/4.14.50-v7+
Ensure all necessary drivers are built into the linux image!
depmod: ERROR: could not open directory /lib/modules/4.14.50-v7+: No such file or directory
depmod: FATAL: could not search modules: No such file or directory
hwclock: Cannot access the Hardware Clock via any known method.
hwclock: Use the --debug option to see the details of our search for an access method.
depmod: WARNING: could not open /var/tmp/mkinitramfs_uvP96k/lib/modules/4.14.50-v7+/modules.order: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_uvP96k/lib/modules/4.14.50-v7+/modules.builtin: No such file or directory
Setting up unipi-modbus-tools (1.1.10) ...
Created symlink /etc/systemd/system/unipispi.target.wants/unipihost.service → /lib/systemd/system/unipihost.service.
Created symlink /etc/systemd/system/unipispi.target.wants/unipitcp.service → /lib/systemd/system/unipitcp.service.
Job for unipihost.service failed because the control process exited with error code.
See "systemctl status unipihost.service" and "journalctl -xe" for details.
unipihost.service couldn't start.
Setting up neuron-kernel (1.15.20180914) ...
Anything I can do to assist - please let me know. I'm in a squeeze time wise.
And after a little while it times out:
Sep 18 15:03:52 L513-sn24 systemd[1]: evok.service: Service hold-off time over, scheduling restart.
Sep 18 15:03:52 L513-sn24 systemd[1]: Stopped EVOK ModBus/WebSocket/RPC Server.
Sep 18 15:03:52 L513-sn24 systemd[1]: evok.service: Start request repeated too quickly.
Sep 18 15:03:52 L513-sn24 systemd[1]: Failed to start EVOK ModBus/WebSocket/RPC Server.
Sep 18 15:03:52 L513-sn24 systemd[1]: evok.service: Unit entered failed state.
Sep 18 15:03:52 L513-sn24 systemd[1]: evok.service: Failed with result 'exit-code'.
Sep 18 15:03:45 L513-sn24 systemd[1]: Starting EVOK ModBus/WebSocket/RPC Server...
Sep 18 15:03:45 L513-sn24 systemd[1]: Started EVOK ModBus/WebSocket/RPC Server.
It seems as though it is starting, but the web interface will not show anything other than the basic stuff:
@martin-kudláček said in Can not install EVOK due to dependencies:
systemctl status evok
root@L513-sn24:/opt/evok/bin# systemctl status evok
● evok.service - EVOK ModBus/WebSocket/RPC Server
Loaded: loaded (/lib/systemd/system/evok.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2018-09-18 15:01:43 CEST; 17s ago
Process: 3879 ExecStopPost=/bin/rm -f /etc/nginx/sites-enabled/evok (code=exited, status=0/SUCCESS)
Process: 3876 ExecStopPost=/bin/cp -f /etc/nginx/sites-available/mervis /etc/nginx/sites-enabled/ (code=exited, status=1/FAILURE)
Process: 3873 ExecStopPost=/bin/mv -f /etc/nginx/sites-enabled/evok /etc/nginx/sites-available/ (code=exited, status=0/SUCCESS)
Process: 3869 ExecStopPost=/bin/rm -f /etc/evok-nginx.conf (code=exited, status=0/SUCCESS)
Process: 3866 ExecStart=/opt/evok/bin/python /opt/evok/lib/python2.7/site-packages/evok/evok.py (code=exited, status=255)
Process: 3863 ExecStartPre=/bin/ln -sf /etc/nginx/sites-enabled/evok /etc/evok-nginx.conf (code=exited, status=0/SUCCESS)
Process: 3860 ExecStartPre=/bin/rm -f /etc/nginx/sites-enabled/mervis (code=exited, status=0/SUCCESS)
Process: 3857 ExecStartPre=/bin/mv -f /etc/nginx/sites-enabled/mervis /etc/nginx/sites-available/ (code=exited, status=1/FAILURE)
Process: 3854 ExecStartPre=/bin/cp -f /etc/nginx/sites-available/evok /etc/nginx/sites-enabled/ (code=exited, status=0/SUCCESS)
Main PID: 3866 (code=exited, status=255)
Sep 18 15:01:43 L513-sn24 systemd[1]: evok.service: Service hold-off time over, scheduling restart.
Sep 18 15:01:43 L513-sn24 systemd[1]: Stopped EVOK ModBus/WebSocket/RPC Server.
Sep 18 15:01:43 L513-sn24 systemd[1]: evok.service: Start request repeated too quickly.
Sep 18 15:01:43 L513-sn24 systemd[1]: Failed to start EVOK ModBus/WebSocket/RPC Server.
Sep 18 15:01:43 L513-sn24 systemd[1]: evok.service: Unit entered failed state.
Sep 18 15:01:43 L513-sn24 systemd[1]: evok.service: Failed with result 'exit-code'
@martin-kudláček So I've made a fresh install and done exactly what the README.md says. I still end up getting the evok.py under /opt/evok/lib/python2.7/site-packages/evok/evok.py and it can not run:
root@L513-sn24:/opt/evok/bin# python /opt/evok/lib/python2.7/site-packages/evok/evok.py
Traceback (most recent call last):
File "/opt/evok/lib/python2.7/site-packages/evok/evok.py", line 5, in <module>
import tornado.httpserver
ImportError: No module named tornado.httpserver
@martin-kudláček Any hints as to when you expect this to be fixed? Right now our whole production is down, so any pointers on when you expect to have anything ready is much appreciated.
@martin-kudláček Thanks - I'll await you response then