GithubHelp home page GithubHelp logo

emqx / neuron Goto Github PK

View Code? Open in Web Editor NEW
887.0 28.0 196.0 7.84 MB

Open source industrial IoT connectivity server

Home Page: https://neugates.io

License: GNU Lesser General Public License v3.0

C 81.62% Shell 0.29% CMake 1.16% C++ 1.47% Python 15.27% Smarty 0.08% PLpgSQL 0.11%
iot plc c mqtt modbus opcua siemens-s7 omron mitsubishi dtu

neuron's Introduction

Neuron

GitHub Release Docker Pulls codecov Slack Discord Twitter YouTube

Neuron is an Industrial IoT (IIoT) connectivity server for modern big data and AI/ML technology to leverage the power of Industrial 4.0. It supports one-stop access to dozens of industrial protocols and converts them into MQTT protocol and realize the interconnection between IIoT platforms and various industrial devices.

neuron-overview

The following are some important features of Neuron:

  • Edge native application with real-time capability to leverage the low latency network of edge side.
  • Loosely-coupled modularity architecture design for extending more functional services by pluggable modules.
  • Support hot plugins that can update device and application modules during runtime.
  • Support numerous protocols for industrial devices, including Modbus, OPCUA, Ethernet/IP, IEC104, BACnet and more.
  • Support simultaneous connection of a large number of industrial devices with different protocols.
  • Combine with the rule engine function provided by eKuiper to quickly implement rule-based device control or AI/ML analytics.
  • Support data access to industrial applications, such as MES or ERP, SCADA, historian and data analytics software via SparkplugB solution.
  • Has very low memory footprint, less than 10M, and CPU usage, can run on limited resource hardware like ARM, x86 and RISC-V.
  • Support installation of native executable or deployed in containerized enviornment.
  • Control industrial devices, and make changes to the parameters and data tags through HTTP API and MQTT API services.
  • Highly integrated with other EMQ products, including EMQX, NanoMQ, eKuiper.
  • The code of the core framework and Modbus, MQTT and eKuiper are licensed under open source LGPLv3. Commercial modules require a EMQ License to run.

For more information, please visit Neuron homepage.

Get Started

Run Neuron using Docker

docker run -d --name neuron -p 7000:7000 -p 7001:7001 -p 9081:9081 --privileged=true --restart=always emqx/neuron:latest

Next, please follow the getting started guide to tour the Neuron features.

Limitations

Neuron open source edition only includes Modbus and MQTT drivers.

Apply for a 15-day trial license to load all drivers.

More installation options

If you prefer to install and manage Neuron yourself, you can download the latest version from neugates.io/downloads?os=Linux.

For more installation options, see the Neuron installation documentation.

Documentation

The Neuron documentation is available at neugates.io/docs/en/latest/.

Get Involved

Build From Source

Install required dependencies

Install-dependencies

Build

$ git clone https://github.com/emqx/neuron
$ cd neuron
$ mkdir build && cd build
$ cmake .. && make

Install Dashboard

Download the latest neuron-dashboard.zip from the neuron-dashboard page, unzip it and put it to the dist directory under the Neuron executable directory.

Run

$ cd build
$ ./neuron

Log level

Change the log level in the rules in the zlog.conf file. Available levels include INFO, DEBUG, NOTICE, WARN, ERROR and FATAL.

License

See LICENSE.

neuron's People

Contributors

alvin1221 avatar alvinwong2018 avatar crazywisdom avatar eeff avatar fengzeroz avatar flyfish30 avatar gc87 avatar hobbes1069 avatar hxy7yx avatar jacky-xbb avatar jinfahua avatar joey8869 avatar kunyi avatar rory-z avatar wildwindyevan avatar yiqunc-emqx avatar yuxi311 avatar yzewei avatar zhoubox avatar zhouzaihang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

neuron's Issues

error: implicit conversion from 'enum MQTTErrors' to 'neu_err_code_e'

/builddir/build/BUILD/neuron-2.0.1/src/connection/mqtt_c_client.c:809:11: error: implicit conversion from 'enum MQTTErrors' to 'neu_err_code_e' [-Werror=enum-conversion]
  809 |     error = mqtt_publish(&client->mqtt, topic, payload, len, qos);
      |           ^

Fedora Rawhide x86_64
GCC 12.0.1

Crash caused by removing adapter.

  • System: Ubuntu Server 18.04
  • Architecture: X86_64
  • Lastest: commit 8ef22c8
  • Description: When deleting modbus-plus-tcp adapters, http response 503 errors, no response to correct requests and program crashes.

Here's the log:

log

Reading group error

  • system: ubuntu-20.04
  • arch: aarch64
  • version: 2.0.0-beta.1

After adding a tag to a subscribed group, an erroris reported when reading the tag value in this group, the error code is 3006.

mqtt plugin double-free

version: 2.0.1
os: ubuntu-20.04 x86_64

Double-free detected by asan when using CTL-C to end the neuron.

==851092==ERROR: AddressSanitizer: attempting double-free on 0x602000020f90 in thread T32:
    #0 0x7ff4e62cd40f in __interceptor_free ../../../../src/libsanitizer/asan/asan_malloc_linux.cc:122
    #1 0x7ff4d1586611 in mqtt_option_uninit /home/zp/Program/neuron/plugins/mqtt/util.c:45
    #2 0x7ff4d1584de2 in mqtt_routine_stop /home/zp/Program/neuron/plugins/mqtt/mqtt.c:505
    #3 0x7ff4d1585303 in mqtt_plugin_uninit /home/zp/Program/neuron/plugins/mqtt/mqtt.c:572
    #4 0x55d0f257a210 in neu_adapter_uninit /home/zp/Program/neuron/src/adapter/adapter.c:1874
    #5 0x55d0f2557149 in neu_manager_uninit_adapter /home/zp/Program/neuron/src/core/neu_manager.c:582
    #6 0x55d0f2557899 in stop_and_unreg_bind_adapters /home/zp/Program/neuron/src/core/neu_manager.c:655
    #7 0x55d0f255ab5d in manager_loop /home/zp/Program/neuron/src/core/neu_manager.c:1190
    #8 0x55d0f25c8aea in nni_thr_wrap (/home/zp/Program/neuron/build/neuron+0x9baea)
    #9 0x55d0f25cb987 in nni_plat_thr_main (/home/zp/Program/neuron/build/neuron+0x9e987)
    #10 0x7ff4e5d6e608 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x8608)
    #11 0x7ff4e5c75162 in __clone (/lib/x86_64-linux-gnu/libc.so.6+0x11f162)

0x602000020f90 is located 0 bytes inside of 7-byte region [0x602000020f90,0x602000020f97)
freed by thread T32 here:
    #0 0x7ff4e62cd40f in __interceptor_free ../../../../src/libsanitizer/asan/asan_malloc_linux.cc:122
    #1 0x7ff4d1582c43 in topics_cleanup /home/zp/Program/neuron/plugins/mqtt/mqtt.c:124
    #2 0x7ff4d1584dc0 in mqtt_routine_stop /home/zp/Program/neuron/plugins/mqtt/mqtt.c:503
    #3 0x7ff4d1585303 in mqtt_plugin_uninit /home/zp/Program/neuron/plugins/mqtt/mqtt.c:572
    #4 0x55d0f257a210 in neu_adapter_uninit /home/zp/Program/neuron/src/adapter/adapter.c:1874
    #5 0x55d0f2557149 in neu_manager_uninit_adapter /home/zp/Program/neuron/src/core/neu_manager.c:582
    #6 0x55d0f2557899 in stop_and_unreg_bind_adapters /home/zp/Program/neuron/src/core/neu_manager.c:655
    #7 0x55d0f255ab5d in manager_loop /home/zp/Program/neuron/src/core/neu_manager.c:1190
    #8 0x55d0f25c8aea in nni_thr_wrap (/home/zp/Program/neuron/build/neuron+0x9baea)
    #9 0x55d0f25cb987 in nni_plat_thr_main (/home/zp/Program/neuron/build/neuron+0x9e987)
    #10 0x7ff4e5d6e608 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x8608)

previously allocated by thread T18 (nng:task) here:
    #0 0x7ff4e62563ed in __interceptor_strdup ../../../../src/libsanitizer/asan/asan_interceptors.cc:445
    #1 0x7ff4e614c4bf in decode_object /home/zp/Program/neuron/src/utils/json.c:126
    #2 0x7ff4e614dba2 in neu_json_decode_value /home/zp/Program/neuron/src/utils/json.c:389
    #3 0x7ff4e6155c83 in neu_parse_param /home/zp/Program/neuron/src/parser/neu_json_fn.c:165
    #4 0x7ff4d1587884 in mqtt_option_init /home/zp/Program/neuron/plugins/mqtt/util.c:125
    #5 0x7ff4d158475b in mqtt_routine_start /home/zp/Program/neuron/plugins/mqtt/mqtt.c:434
    #6 0x7ff4d1585630 in mqtt_plugin_config /home/zp/Program/neuron/plugins/mqtt/mqtt.c:604
    #7 0x55d0f257ad75 in neu_adapter_set_setting /home/zp/Program/neuron/src/adapter/adapter.c:2029
    #8 0x55d0f255fcf7 in neu_manager_adapter_set_setting /home/zp/Program/neuron/src/core/neu_manager.c:2073
    #9 0x55d0f2571c9c in adapter_command /home/zp/Program/neuron/src/adapter/adapter.c:1074
    #10 0x7ff4e612b5c7 in neu_plugin_set_node_setting /home/zp/Program/neuron/src/base/neu_plugin_common.c:537
    #11 0x55d0f259cc16 in handle_set_node_setting /home/zp/Program/neuron/plugins/restful/adapter_handle.c:121
    #12 0x55d0f25d654c in http_sconn_rxdone (/home/zp/Program/neuron/build/neuron+0xa954c)
    #13 0x55d0f25c8103 in nni_taskq_thread (/home/zp/Program/neuron/build/neuron+0x9b103)
    #14 0x55d0f25c8aea in nni_thr_wrap (/home/zp/Program/neuron/build/neuron+0x9baea)
    #15 0x55d0f25cb987 in nni_plat_thr_main (/home/zp/Program/neuron/build/neuron+0x9e987)
    #16 0x7ff4e5d6e608 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x8608)

modbus-tcp connection status issue.

  • System: Ubuntu Server 18.04
  • Architecture: X86_64
  • Lastest commit: f52bd3c
  • Description: When the simulator is started/disconnected, the connection status of the adapter is not refreshed in time, but can't refreshed by resubmitting the configuration.

log

Here's the log
log

S7 support 2.0.0-rc1

It's documented in Neuron docs that you have support for the s7 protocol, but I can't seem to find the code implementation, can someone point me to the correct location?

Neuron (armv7) crashed after receivcing http login request.

Here's the log:

2022-01-19 18:47:35 [2012] INFO  [neuron] plugins/restful/http.c:76 http_get_body: body: {
    "name": "admin",
    "pass": "0000"
}
2022-01-19 18:47:35 [2012] ERROR [neuron] src/utils/neu_jwt.c:98 neu_jwt_new: jwt incorrect algorithm: 22, errno: 2
panic: appending node already on a list or not inited
This message is indicative of a BUG.
Report this at https://github.com/nanomsg/nng/issues
2022-01-19 18:47:35 [2012] WARN  [neuron] src/main.c:87 sig_handler: recv sig: 6
Aborted

Crash when deleting node.

  • System: Ubuntu Server 18.04
  • Architecture: X86_64
  • Lastest commit: 884a36d
  • Description: Creating an adapter of type modbus-plus-tcp and deleting it without setting this adapter will cause the program to crash.

Here's the log:

4-core cpu runs full, cpu load 8+

System: Ubuntu18
Architecture: arm64, 4 core CPU
Version No: V2.0.1
Description:
4 south modbus-plus-tcp, 4 north mqtt, a total of 94 tags, submitted once every 15 seconds, there are 57 neuron sub-threads in the system, and the system cs1000+ per second. The source usage is shown in the figure below.

捕获38

The RESTFul API for getting tags returned wrong result

Version

Branch main, commit 8ef7623

Precodition

  1. Add an arbitrary node, the resulting node_id is 6
  2. Add goup grp-test to the node, then add tag with name tag-test in group grp-test
  3. Add group grp to the node, then add tags with name tag0, tag1, tag2, tag3 in group grp

Result

calling API `/tags?node_id=6&group_config_name=grp returns

{
  "tags": [
    {"type": 13, "name": "tag-test", "id": 5, "group_config_name": "grp-test", "attribute": 2, "address": "0/0/1"},
    {"type": 13, "name": "tag0", "id": 1, "group_config_name": "grp", "attribute": 2, "address": "0/0/1"},
    {"type": 13, "name": "tag1", "id": 2, "group_config_name": "grp", "attribute": 1, "address": "0/0/1,1.1.1"},
    {"type": 14, "name": "tag2", "id": 3, "group_config_name": "grp", "attribute": 1, "address": "0/0/1,1.1.2"},
    {"type": 7, "name": "tag3", "id": 4, "group_config_name": "grp", "attribute": 2, "address": "0/0/5"}
  ]
}

post /api/v2/node/setting with wrong scene 2

在已创建的南向modbus-rtu协议设备上进行配置时,根据客户端页面查看配置并没有host和port参数。然后通过接口请求时发现。如果没带上参数host和port参数,会导致部分参数配置失效。但是接口请求并无报错,为正常返回结果。
实际场景中验证了下发参数中没有带上host和port参数会导致device参数配置失败,仅针对于modbus-rtu协议的南向设备。
翻译:
When configuring on the created southbound modbus-rtu protocol device, according to the configuration on the client page, there are no host and port parameters. Then it is found when requested through the interface. If the parameter host and port parameters are not included, some parameter configurations will be invalid. However, there is no error in the interface request, and the result is returned normally.
In the actual scenario, it has been verified that the host and port parameters are not included in the delivered parameters, which will cause the device parameter configuration to fail. This is only for southbound devices of the modbus-rtu protocol.

Plugin persistence unsuccessful.

  • System: Ubuntu Server 18.04
  • Architecture: X86_64
  • Lastest commit: e67f1b3
  • Description: Adding a plugin is successfully written to the persistence file, but after restarting, the newly added plugin is not retrieved.

Here's the log file:

neuron.log

Nodes: You can watch from 16:50 onwards.

CMake Error at CMakeLists.txt:74 (find_package):

CMake Error at CMakeLists.txt:74 (find_package):
Could not find a package configuration file provided by "nng" with any of
the following names:

nngConfig.cmake
nng-config.cmake

Add the installation prefix of "nng" to CMAKE_PREFIX_PATH or set "nng_DIR"
to a directory containing one of the above files. If "nng" provides a
separate development package or SDK, be sure it has been installed.

Crash when writing data to modbus-tcp-plus using mqtt interface

  • Node name: modbus01
  • Group config name:group01
  • Datatags:
  1. data0 1!4001 INT16 Read, Write
  2. data1 1!4002 INT32 Read, Write
  • Topic: neuron/upload123/write/req
  • Payload json:
{
    "uuid": "E21AEE51-1269-B228-E9E5-CD252CE10877",
    "node_name": "modbus01",
    "group_config_name": "group01",
    "tags": [
      {
        "value": -10,
        "name": "data0"
      }
    ]
}
  • LOG:
    2022-04-02 10:08:14 [31659] INFO [neuron] src/connection/mqtt_c_client.c:217 publish_callback: Received publish('neuron/upload123/write/req'): {
    "uuid": "E21AEE51-1269-B228-E9E5-CD252CE10877",
    "node_name": "modbus01",
    "group_config_name": "group01",
    "tags": [
    {
    "value": -10,
    "name": "data0"
    }
    ]
    } }
    ]
    }
    2022-04-02 10:08:14 [31659] ERROR [neuron] src/utils/json.c:102 decode_object: json decode: command failed
    2022-04-02 10:08:14 [31659] INFO [neuron] plugins/mqtt/command/read_write.c:308 command_rw_write_request: WRITE uuid:E21AEE51-1269-B228-E9E5-CD252CE10877, group config name:group01
    2022-04-02 10:08:14 [31659] INFO [neu_manager] src/core/neu_manager.c:981 manager_loop: Forward write command to driver pipe: 1287889942
    2022-04-02 10:08:14 [31659] DEBUG [modbus01] modules/plugins/modbus/modbus_req.c:250 write_value_callback: send write cmd, seq: 0, slave: 1, function: 16, start address: 0, n_register: 1, n_byte: 2
    2022-04-02 10:08:14 [31659] INFO [neuron] src/adapter/adapter.c:1649 adapter_response: Get response from plugin modbus01
    2022-04-02 10:08:14 [31659] INFO [neu_manager] src/core/neu_manager.c:1014 manager_loop: Forward write response to app pipe: 1287889941
    ASAN:DEADLYSIGNAL
    =================================================================
    ==31659==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000018 (pc 0x7f3736dcbb70 bp 0x7f37342eb2b0 sp 0x7f37342eb1c0 T33)
    ==31659==The signal is caused by a READ memory access.
    ==31659==Hint: address points to the zero page.
    #0 0x7f3736dcbb6f in wrap_write_response_json_object /home/gc/workbench/neuron/plugins/mqtt/command/read_write.c:434
    #1 0x7f3736dcbf0d in command_rw_write_response /home/gc/workbench/neuron/plugins/mqtt/command/read_write.c:468
    #2 0x7f3736dd9641 in command_write_response /home/gc/workbench/neuron/plugins/mqtt/command/command.c:584
    #3 0x7f3736dc6c77 in mqtt_plugin_request /home/gc/workbench/neuron/plugins/mqtt/mqtt.c:615
    #4 0x55782776e9fb in adapter_loop /home/gc/workbench/neuron/src/adapter/adapter.c:1152
    #5 0x5578277b7be5 in nni_thr_wrap (/home/gc/workbench/neuron/build/neuron+0x83be5)
    #6 0x5578277ba95e in nni_plat_thr_main (/home/gc/workbench/neuron/build/neuron+0x8695e)
    #7 0x7f37488ff6da in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x76da)
    #8 0x7f374862871e in __clone (/lib/x86_64-linux-gnu/libc.so.6+0x12171e)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/gc/workbench/neuron/plugins/mqtt/command/read_write.c:434 in wrap_write_response_json_object
Thread T33 created by T28 here:
#0 0x7f37496e5d2f in __interceptor_pthread_create (/usr/lib/x86_64-linux-gnu/libasan.so.4+0x37d2f)
#1 0x5578277ba9c6 in nni_plat_thr_init (/home/gc/workbench/neuron/build/neuron+0x869c6)
#2 0x5578277b7ceb in nni_thr_init (/home/gc/workbench/neuron/build/neuron+0x83ceb)
#3 0x5578277c7d17 in nng_thread_create (/home/gc/workbench/neuron/build/neuron+0x93d17)
#4 0x55782777a97a in neu_adapter_init /home/gc/workbench/neuron/src/adapter/adapter.c:1953
#5 0x55782775663c in neu_manager_init_adapter /home/gc/workbench/neuron/src/core/neu_manager.c:533
#6 0x55782775b16b in neu_manager_add_node /home/gc/workbench/neuron/src/core/neu_manager.c:1384
#7 0x5578277693c1 in persister_singleton_load_data /home/gc/workbench/neuron/src/adapter/adapter.c:489
#8 0x55782776c525 in adapter_loop /home/gc/workbench/neuron/src/adapter/adapter.c:878
#9 0x5578277b7be5 in nni_thr_wrap (/home/gc/workbench/neuron/build/neuron+0x83be5)
#10 0x5578277ba95e in nni_plat_thr_main (/home/gc/workbench/neuron/build/neuron+0x8695e)
#11 0x7f37488ff6da in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x76da)

Thread T28 created by T26 here:
#0 0x7f37496e5d2f in __interceptor_pthread_create (/usr/lib/x86_64-linux-gnu/libasan.so.4+0x37d2f)
#1 0x5578277ba9c6 in nni_plat_thr_init (/home/gc/workbench/neuron/build/neuron+0x869c6)
#2 0x5578277b7ceb in nni_thr_init (/home/gc/workbench/neuron/build/neuron+0x83ceb)
#3 0x5578277c7d17 in nng_thread_create (/home/gc/workbench/neuron/build/neuron+0x93d17)
#4 0x55782777a97a in neu_adapter_init /home/gc/workbench/neuron/src/adapter/adapter.c:1953
#5 0x55782775663c in neu_manager_init_adapter /home/gc/workbench/neuron/src/core/neu_manager.c:533
#6 0x557827756f4d in reg_and_start_static_adapters /home/gc/workbench/neuron/src/core/neu_manager.c:631
#7 0x557827758276 in manager_loop /home/gc/workbench/neuron/src/core/neu_manager.c:806
#8 0x5578277b7be5 in nni_thr_wrap (/home/gc/workbench/neuron/build/neuron+0x83be5)
#9 0x5578277ba95e in nni_plat_thr_main (/home/gc/workbench/neuron/build/neuron+0x8695e)
#10 0x7f37488ff6da in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x76da)

Thread T26 created by T0 here:
#0 0x7f37496e5d2f in __interceptor_pthread_create (/usr/lib/x86_64-linux-gnu/libasan.so.4+0x37d2f)
#1 0x5578277ba9c6 in nni_plat_thr_init (/home/gc/workbench/neuron/build/neuron+0x869c6)
#2 0x5578277b7ceb in nni_thr_init (/home/gc/workbench/neuron/build/neuron+0x83ceb)
#3 0x5578277c7d17 in nng_thread_create (/home/gc/workbench/neuron/build/neuron+0x93d17)
#4 0x55782775a867 in neu_manager_create /home/gc/workbench/neuron/src/core/neu_manager.c:1233
#5 0x557827750817 in main /home/gc/workbench/neuron/src/main.c:241
#6 0x7f3748528bf6 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21bf6)

==31659==ABORTING

Occasional program exit when changing mqtt_setting.

  • System: Ubuntu Server 18.04
  • Architecture: X86_64
  • Lastest commit: d537773

Here's the log:

2022-03-10 17:23:32 [20574] DEBUG [neuron] plugins/mqtt/plugin_mqtt.c:378: Publish error code:0, topic('neuron/1/read/resp'): {"node_id": 3, "node_name": "modbus-tcp-2", "group_config_name": "group-1", "timestamp": 1646904212296, "tags": [{"value": 123, "id": 8, "error": 0}, {"value": 0, "id": 9, "error": 0}]}
2022-03-10 17:23:33 [20574] INFO [neuron] plugins/restful/http.c:76: body: {"node_id":4,"params":{"client-id":"1","ssl":false,"host":"broker.emqx.io","port":1883,"username":"","password":"","ca-path":"","ca-file":""}}
2022-03-10 17:23:33 [20574] INFO [neuron] src/adapter/adapter.c:1197: Get command from plugin 30, default-dashboard-adapter
2022-03-10 17:23:33 [20574] DEBUG [neuron] plugins/modbus/modbus_point.c:289: cmd trans success, id: 1, function: 3, addr: 0, n_reg: 3
2022-03-10 17:23:33 [20574] INFO [neuron] plugins/modbus/modbus_point.c:544: get result16.... 123, 0 0
2022-03-10 17:23:33 [20574] INFO [neuron] plugins/modbus/modbus_point.c:559: get result32.... 0.000000, 0 1
2022-03-10 17:23:33 [20574] INFO [neuron] src/adapter/adapter.c:1631: Get response from plugin modbus-tcp-2
2022-03-10 17:23:33 [20574] INFO [neu_manager] src/core/neu_manager.c:951: dispatch databuf to 1 subscribes in sub_pipes
2022-03-10 17:23:33 [20574] DEBUG [neu_manager] src/core/neu_manager.c:975: Forward databuf to pipe: 1308884347
2022-03-10 17:23:33 [20574] INFO [neuron] src/adapter/adapter.c:1197: Get command from plugin 28, mqtt-1
2022-03-10 17:23:33 [20574] INFO [mqtt-1] plugins/mqtt/plugin_mqtt.c:576: send request to plugin: mqtt-plugin, type:8
2022-03-10 17:23:33 [20574] DEBUG [neuron] plugins/mqtt/command/read_write.c:264: config:group-1, node:modbus-tcp-2, self_id:3, sender:3, time:1931739583
2022-03-10 17:23:33 [20574] INFO [neuron] plugins/mqtt/plugin_mqtt.c:541: Config plugin: mqtt-plugin
2022-03-10 17:23:33 [20574] INFO [neu_manager] src/core/neu_manager.c:1279: Forward event 8197 to default-persist-adapter pipe: 1308884343
2022-03-10 17:23:33 [20574] DEBUG [neuron] src/persist/persist.c:392: pwersister write {"node_id":4,"params":{"client-id":"1","ssl":false,"host":"broker.emqx.io","port":1883,"username":"","password":"","ca-path":"","ca-file":""}} to persistence/adapters/mqtt-1/settings.json.tmp

Change mqtt settings, program crashes.

  • System: ubuntu 18.04
  • Arch: X86_64
  • Commit: f3ed006
  • Operation steps:
    • Add a second subscription
    • Delete the first subscription
    • mqttx call mqtt read, not responding
    • On the dashboard, modify the mqtt settings, click 'Submit' and the program exits.

Here's the logs:
mqtt-setting-load

should apply License

2.License

Neuron cannot read/write/upload data without uploading a license. Please apply for a license in the interface first, as shown in the image below. In the top right corner of the page, select License from the About drop-down box to go to the License screen.

post /api/v2/node/setting with wrong scene

通过请求api的方式去配置mqtt的北向设备过程中,heartbeat-topic没有传,虽然返回结果并没有报错,但是其它参数也没有设置成功。
翻译(translate):
In the process of configuring the northbound device of mqtt by requesting api, the heartbeat-topic was not transmitted. Although the returned result did not report an error, other parameters were not set successfully.

Limited number of characters for MQTT url

I find it really constraining that the MQTT URL of neuron 2.0-rc.1 is limited to a maximum number of characters. This constraint should be removed before release of version 2.

Assertion `adapter->plugin_info.plugin != NULL' failed

my system info: UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
when i use neuron-2.0.1-linux-amd64.tar.gz
and run ./neuron
it failed:
/home/runner/work/neuron/neuron/src/adapter/adapter.c:1385: neu_adapter_create: Assertion `adapter->plugin_info.plugin != NULL' failed.

tests seem to be running during the cmake --build process

I'm attempting to package Neuron for Fedora in my COPR[1]. I've got it building but for some reason the tests seem to be running during the cmake --build process and not waiting for me to run ctest. This is causing the tests to run before the build process is 100% complete and frequently timing out on aarch64 builds which are far more resource constrained than other arches. Any pointers?
CMake Error at /usr/share/cmake/Modules/GoogleTestAddTests.cmake:83 (message):
Error running test executable.

Path: '/builddir/build/BUILD/neuron-2.0.1/redhat-linux-build/tests/json_persistence_test'
Result: Process terminated due to timeout
Output:
  Running main() from /builddir/build/BUILD/googletest-release-1.11.0/googletest/src/gtest_main.cc
  JsonAdapter.
    AdapterPersistenceDecode
  JsonPlugin.
    PluginPersistenceDecode
  JsonDatatags.
    DatatagPersistenceDecode
    DatatagPersistenceEncode
  JsonSubs.
    SubsPersistenceDecode
  JsonGroupConfigs.
    GroupConfigsPersistenceDecode
  JsonAdapterTest.
    AdapterPersistenceEncode
  JsonPluginTest.
    PluginPersistenceEncode
  JsonSubscriptionsTest.
    SbuscriptionsPersistenceEncode
  JsonGroupConfigTest.
    GroupConfigPersistenceEncode

Call Stack (most recent call first):
/usr/share/cmake/Modules/GoogleTestAddTests.cmake:179 (gtest_discover_tests_impl)
[1] https://copr.fedorainfracloud.org/coprs/hobbes1069/IIoT/build/4508992/

From @hobbes1069

The web page keep loading when I apply another north application(ekuiper)

context:

  1. 4 south application;
  2. 2 north devices;
  3. 2 data streaming rules;
# ./neuron --version
Neuron 2.1.0 (31dbfb1 2022-06-30)

Neuron can have only one data streaming, default name:neuronStream.
when I new a south application(plugin select ekuiper),and apply this application. the page no responding,and other page always keep loading.

de3c423a767721bf87cba915d1d9a2bb_682927676492_v_1661234876557088.mp4

neuron2.0.1 dashborad south refresh error

System: XuanTie 21.06 (kaitai)
Architecture: armv7l
Description: In the test of 3000 points, the acquisition frequency is 100ms. When the number of drives is too large, resulting in the error of the South refresh of the front end of the neuron, for example: 100 drives, 30 points under each drive, and the acquisition frequency is 100ms, the following errors will appear:
image
image

CPU and memory usage:
image

Data monitoring show wrong results

Version

Branch main, commit e32e6f84

Precodition

  1. Add an arbitrary node, say modbus
  2. Add goup grp-test to the node, then add write-only tag with name tag-test in group grp-test
  3. Add group grp to the node, then add read-only tag with name tag in group grp

Result

In dashbaord's data monitoring tab, monitor node modbus and group grp, the result does not make sense.
Screenshot from 2022-05-23 22-10-52

node rename, node configuration is lost

  • System: ubuntu 20.04
  • Arch: aarch64
  • version: 2.0.0-beta.1

Rename node and restart neuron, node related configuration is lost.

node persistent folder not rename.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.