Skip to content

Instantly share code, notes, and snippets.

@KunYi
Created February 26, 2024 09:58
Show Gist options
  • Save KunYi/8ac99c92ece2f80522275a164dbdabad to your computer and use it in GitHub Desktop.
Save KunYi/8ac99c92ece2f80522275a164dbdabad to your computer and use it in GitHub Desktop.
just log message route, demo modbus to mqtt
2024-02-26 17:49:05:351 [INFO] [neuron] driver.c:171 update driver: Modbus, group: Modbus, tag: Modbus, type: NEU_TYPE_UINT16, timestamp: 1708940945349 n_meta: 0
2024-02-26 17:49:05:371 [DEBUG] [neuron] driver.c:1695 Modbus-Modbus timer: 30
2024-02-26 17:49:05:767 [INFO] [neuron] metric_handle.c:121 GET /api/v2/metrics?category=app&node=MQTT [200]
2024-02-26 17:49:06:004 [DEBUG] [neuron] adapter.c:594 adapter(MQTT) recv msg from: Modbus (nil), type: NEU_REQRESP_TRANS_DATA
2024-02-26 17:49:06:004 [DEBUG] [neuron] adapter.c:117 adapter(MQTT) recv msg from: Modbus (nil), type: NEU_REQRESP_TRANS_DATA, 0
2024-02-26 17:49:06:004 [DEBUG] [MQTT] mqtt_client.c:255 pub [/neuron/MQTT, QoS0] 107 bytes
2024-02-26 17:49:06:371 [DEBUG] [Modbus] log.h:125 >>(12) 0x00 0x66 0x00 0x00 0x00 0x06 0x01 0x03 0x00 0x00 0x00 0x01
2024-02-26 17:49:06:373 [DEBUG] [Modbus] log.h:125 <<(6) 0x00 0x66 0x00 0x00 0x00 0x05
2024-02-26 17:49:06:373 [DEBUG] [Modbus] log.h:125 <<(11) 0x00 0x66 0x00 0x00 0x00 0x05 0x01 0x03 0x02 0x00 0x00
2024-02-26 17:49:06:373 [INFO] [neuron] driver.c:171 update driver: Modbus, group: Modbus, tag: Modbus, type: NEU_TYPE_UINT16, timestamp: 1708940946369 n_meta: 0
2024-02-26 17:49:06:393 [DEBUG] [neuron] driver.c:1695 Modbus-Modbus timer: 20
2024-02-26 17:49:07:004 [DEBUG] [neuron] adapter.c:594 adapter(MQTT) recv msg from: Modbus (nil), type: NEU_REQRESP_TRANS_DATA
2024-02-26 17:49:07:004 [DEBUG] [neuron] adapter.c:117 adapter(MQTT) recv msg from: Modbus (nil), type: NEU_REQRESP_TRANS_DATA, 0
2024-02-26 17:49:07:004 [DEBUG] [MQTT] mqtt_client.c:255 pub [/neuron/MQTT, QoS0] 107 bytes
2024-02-26 17:49:07:394 [DEBUG] [Modbus] log.h:125 >>(12) 0x00 0x67 0x00 0x00 0x00 0x06 0x01 0x03 0x00 0x00 0x00 0x01
2024-02-26 17:49:07:396 [DEBUG] [Modbus] log.h:125 <<(6) 0x00 0x67 0x00 0x00 0x00 0x05
2024-02-26 17:49:07:396 [DEBUG] [Modbus] log.h:125 <<(11) 0x00 0x67 0x00 0x00 0x00 0x05 0x01 0x03 0x02 0x00 0x00
2024-02-26 17:49:07:396 [INFO] [neuron] driver.c:171 update driver: Modbus, group: Modbus, tag: Modbus, type: NEU_TYPE_UINT16, timestamp: 1708940947389 n_meta: 0
2024-02-26 17:49:07:416 [DEBUG] [neuron] driver.c:1695 Modbus-Modbus timer: 20
2024-02-26 17:49:08:004 [DEBUG] [neuron] adapter.c:594 adapter(MQTT) recv msg from: Modbus (nil), type: NEU_REQRESP_TRANS_DATA
2024-02-26 17:49:08:005 [DEBUG] [neuron] adapter.c:117 adapter(MQTT) recv msg from: Modbus (nil), type: NEU_REQRESP_TRANS_DATA, 0
2024-02-26 17:49:08:005 [DEBUG] [MQTT] mqtt_client.c:255 pub [/neuron/MQTT, QoS0] 107 bytes
2024-02-26 17:49:08:207 [INFO] [neuron] metric_handle.c:121 GET /api/v2/metrics?category=driver&node=Modbus [200]
2024-02-26 17:49:08:416 [DEBUG] [Modbus] log.h:125 >>(12) 0x00 0x68 0x00 0x00 0x00 0x06 0x01 0x03 0x00 0x00 0x00 0x01
2024-02-26 17:49:08:419 [DEBUG] [Modbus] log.h:125 <<(6) 0x00 0x68 0x00 0x00 0x00 0x05
2024-02-26 17:49:08:419 [DEBUG] [Modbus] log.h:125 <<(11) 0x00 0x68 0x00 0x00 0x00 0x05 0x01 0x03 0x02 0x00 0x00
2024-02-26 17:49:08:419 [INFO] [neuron] driver.c:171 update driver: Modbus, group: Modbus, tag: Modbus, type: NEU_TYPE_UINT16, timestamp: 1708940948419 n_meta: 0
2024-02-26 17:49:08:439 [DEBUG] [neuron] driver.c:1695 Modbus-Modbus timer: 30
2024-02-26 17:49:08:878 [INFO] [neuron] metric_handle.c:121 GET /api/v2/metrics?category=app&node=MQTT [200]
2024-02-26 17:49:09:004 [DEBUG] [neuron] adapter.c:594 adapter(MQTT) recv msg from: Modbus (nil), type: NEU_REQRESP_TRANS_DATA
2024-02-26 17:49:09:004 [DEBUG] [neuron] adapter.c:117 adapter(MQTT) recv msg from: Modbus (nil), type: NEU_REQRESP_TRANS_DATA, 0
2024-02-26 17:49:09:005 [DEBUG] [MQTT] mqtt_client.c:255 pub [/neuron/MQTT, QoS0] 107 bytes
2024-02-26 17:49:09:440 [DEBUG] [Modbus] log.h:125 >>(12) 0x00 0x69 0x00 0x00 0x00 0x06 0x01 0x03 0x00 0x00 0x00 0x01
2024-02-26 17:49:09:442 [DEBUG] [Modbus] log.h:125 <<(6) 0x00 0x69 0x00 0x00 0x00 0x05
2024-02-26 17:49:09:442 [DEBUG] [Modbus] log.h:125 <<(11) 0x00 0x69 0x00 0x00 0x00 0x05 0x01 0x03 0x02 0x00 0x00
2024-02-26 17:49:09:442 [INFO] [neuron] driver.c:171 update driver: Modbus, group: Modbus, tag: Modbus, type: NEU_TYPE_UINT16, timestamp: 1708940949439 n_meta: 0
2024-02-26 17:49:09:463 [DEBUG] [neuron] driver.c:1695 Modbus-Modbus timer: 20
2024-02-26 17:49:10:004 [DEBUG] [neuron] adapter.c:594 adapter(MQTT) recv msg from: Modbus (nil), type: NEU_REQRESP_TRANS_DATA
2024-02-26 17:49:10:004 [DEBUG] [neuron] adapter.c:117 adapter(MQTT) recv msg from: Modbus (nil), type: NEU_REQRESP_TRANS_DATA, 0
2024-02-26 17:49:10:004 [DEBUG] [MQTT] mqtt_client.c:255 pub [/neuron/MQTT, QoS0] 107 bytes
2024-02-26 17:49:10:463 [DEBUG] [Modbus] log.h:125 >>(12) 0x00 0x6A 0x00 0x00 0x00 0x06 0x01 0x03 0x00 0x00 0x00 0x01
2024-02-26 17:49:10:465 [DEBUG] [Modbus] log.h:125 <<(6) 0x00 0x6A 0x00 0x00 0x00 0x05
2024-02-26 17:49:10:465 [DEBUG] [Modbus] log.h:125 <<(11) 0x00 0x6A 0x00 0x00 0x00 0x05 0x01 0x03 0x02 0x00 0x00
2024-02-26 17:49:10:465 [INFO] [neuron] driver.c:171 update driver: Modbus, group: Modbus, tag: Modbus, type: NEU_TYPE_UINT16, timestamp: 1708940950459 n_meta: 0
2024-02-26 17:49:10:485 [DEBUG] [neuron] driver.c:1695 Modbus-Modbus timer: 20
2024-02-26 17:49:11:004 [DEBUG] [neuron] adapter.c:594 adapter(MQTT) recv msg from: Modbus (nil), type: NEU_REQRESP_TRANS_DATA
2024-02-26 17:49:11:004 [DEBUG] [neuron] adapter.c:117 adapter(MQTT) recv msg from: Modbus (nil), type: NEU_REQRESP_TRANS_DATA, 0
2024-02-26 17:49:11:004 [DEBUG] [MQTT] mqtt_client.c:255 pub [/neuron/MQTT, QoS0] 107 bytes
2024-02-26 17:49:11:275 [INFO] [neuron] metric_handle.c:121 GET /api/v2/metrics?category=driver&node=Modbus [200]
2024-02-26 17:49:11:485 [DEBUG] [Modbus] log.h:125 >>(12) 0x00 0x6B 0x00 0x00 0x00 0x06 0x01 0x03 0x00 0x00 0x00 0x01
2024-02-26 17:49:11:488 [DEBUG] [Modbus] log.h:125 <<(6) 0x00 0x6B 0x00 0x00 0x00 0x05
2024-02-26 17:49:11:488 [DEBUG] [Modbus] log.h:125 <<(11) 0x00 0x6B 0x00 0x00 0x00 0x05 0x01 0x03 0x02 0x00 0x00
2024-02-26 17:49:11:488 [INFO] [neuron] driver.c:171 update driver: Modbus, group: Modbus, tag: Modbus, type: NEU_TYPE_UINT16, timestamp: 1708940951479 n_meta: 0
2024-02-26 17:49:11:508 [DEBUG] [neuron] driver.c:1695 Modbus-Modbus timer: 20
2024-02-26 17:49:12:004 [DEBUG] [neuron] adapter.c:594 adapter(MQTT) recv msg from: Modbus (nil), type: NEU_REQRESP_TRANS_DATA
2024-02-26 17:49:12:004 [DEBUG] [neuron] adapter.c:117 adapter(MQTT) recv msg from: Modbus (nil), type: NEU_REQRESP_TRANS_DATA, 0
2024-02-26 17:49:12:004 [DEBUG] [MQTT] mqtt_client.c:255 pub [/neuron/MQTT, QoS0] 107 bytes
2024-02-26 17:49:12:508 [DEBUG] [Modbus] log.h:125 >>(12) 0x00 0x6C 0x00 0x00 0x00 0x06 0x01 0x03 0x00 0x00 0x00 0x01
2024-02-26 17:49:12:510 [DEBUG] [Modbus] log.h:125 <<(6) 0x00 0x6C 0x00 0x00 0x00 0x05
2024-02-26 17:49:12:510 [DEBUG] [Modbus] log.h:125 <<(11) 0x00 0x6C 0x00 0x00 0x00 0x05 0x01 0x03 0x02 0x00 0x00
2024-02-26 17:49:12:510 [INFO] [neuron] driver.c:171 update driver: Modbus, group: Modbus, tag: Modbus, type: NEU_TYPE_UINT16, timestamp: 1708940952509 n_meta: 0
2024-02-26 17:49:12:530 [DEBUG] [neuron] driver.c:1695 Modbus-Modbus timer: 30
2024-02-26 17:49:13:004 [DEBUG] [neuron] adapter.c:594 adapter(MQTT) recv msg from: Modbus (nil), type: NEU_REQRESP_TRANS_DATA
2024-02-26 17:49:13:004 [DEBUG] [neuron] adapter.c:117 adapter(MQTT) recv msg from: Modbus (nil), type: NEU_REQRESP_TRANS_DATA, 0
2024-02-26 17:49:13:004 [DEBUG] [MQTT] mqtt_client.c:255 pub [/neuron/MQTT, QoS0] 107 bytes
2024-02-26 17:49:13:531 [DEBUG] [Modbus] log.h:125 >>(12) 0x00 0x6D 0x00 0x00 0x00 0x06 0x01 0x03 0x00 0x00 0x00 0x01
2024-02-26 17:49:13:533 [DEBUG] [Modbus] log.h:125 <<(6) 0x00 0x6D 0x00 0x00 0x00 0x05
2024-02-26 17:49:13:533 [DEBUG] [Modbus] log.h:125 <<(11) 0x00 0x6D 0x00 0x00 0x00 0x05 0x01 0x03 0x02 0x00 0x00
2024-02-26 17:49:13:533 [INFO] [neuron] driver.c:171 update driver: Modbus, group: Modbus, tag: Modbus, type: NEU_TYPE_UINT16, timestamp: 1708940953529 n_meta: 0
2024-02-26 17:49:13:553 [DEBUG] [neuron] driver.c:1695 Modbus-Modbus timer: 20
2024-02-26 17:49:14:004 [DEBUG] [neuron] adapter.c:594 adapter(MQTT) recv msg from: Modbus (nil), type: NEU_REQRESP_TRANS_DATA
2024-02-26 17:49:14:004 [DEBUG] [neuron] adapter.c:117 adapter(MQTT) recv msg from: Modbus (nil), type: NEU_REQRESP_TRANS_DATA, 0
2024-02-26 17:49:14:005 [DEBUG] [MQTT] mqtt_client.c:255 pub [/neuron/MQTT, QoS0] 107 bytes
2024-02-26 17:49:14:384 [INFO] [neuron] metric_handle.c:121 GET /api/v2/metrics?category=driver&node=Modbus [200]
2024-02-26 17:49:14:553 [DEBUG] [Modbus] log.h:125 >>(12) 0x00 0x6E 0x00 0x00 0x00 0x06 0x01 0x03 0x00 0x00 0x00 0x01
2024-02-26 17:49:14:556 [DEBUG] [Modbus] log.h:125 <<(6) 0x00 0x6E 0x00 0x00 0x00 0x05
2024-02-26 17:49:14:556 [DEBUG] [Modbus] log.h:125 <<(11) 0x00 0x6E 0x00 0x00 0x00 0x05 0x01 0x03 0x02 0x00 0x00
2024-02-26 17:49:14:556 [INFO] [neuron] driver.c:171 update driver: Modbus, group: Modbus, tag: Modbus, type: NEU_TYPE_UINT16, timestamp: 1708940954549 n_meta: 0
2024-02-26 17:49:14:576 [DEBUG] [neuron] driver.c:1695 Modbus-Modbus timer: 20
2024-02-26 17:49:15:004 [DEBUG] [neuron] adapter.c:594 adapter(MQTT) recv msg from: Modbus (nil), type: NEU_REQRESP_TRANS_DATA
2024-02-26 17:49:15:004 [DEBUG] [neuron] adapter.c:117 adapter(MQTT) recv msg from: Modbus (nil), type: NEU_REQRESP_TRANS_DATA, 0
2024-02-26 17:49:15:005 [DEBUG] [MQTT] mqtt_client.c:255 pub [/neuron/MQTT, QoS0] 107 bytes
2024-02-26 17:49:15:577 [DEBUG] [Modbus] log.h:125 >>(12) 0x00 0x6F 0x00 0x00 0x00 0x06 0x01 0x03 0x00 0x00 0x00 0x01
2024-02-26 17:49:15:579 [DEBUG] [Modbus] log.h:125 <<(6) 0x00 0x6F 0x00 0x00 0x00 0x05
2024-02-26 17:49:15:579 [DEBUG] [Modbus] log.h:125 <<(11) 0x00 0x6F 0x00 0x00 0x00 0x05 0x01 0x03 0x02 0x00 0x00
2024-02-26 17:49:15:579 [INFO] [neuron] driver.c:171 update driver: Modbus, group: Modbus, tag: Modbus, type: NEU_TYPE_UINT16, timestamp: 1708940955579 n_meta: 0
2024-02-26 17:49:15:600 [DEBUG] [neuron] driver.c:1695 Modbus-Modbus timer: 30
2024-02-26 17:49:16:004 [DEBUG] [neuron] adapter.c:594 adapter(MQTT) recv msg from: Modbus (nil), type: NEU_REQRESP_TRANS_DATA
2024-02-26 17:49:16:005 [DEBUG] [neuron] adapter.c:117 adapter(MQTT) recv msg from: Modbus (nil), type: NEU_REQRESP_TRANS_DATA, 0
2024-02-26 17:49:16:005 [DEBUG] [MQTT] mqtt_client.c:255 pub [/neuron/MQTT, QoS0] 107 bytes
2024-02-26 17:49:16:600 [DEBUG] [Modbus] log.h:125 >>(12) 0x00 0x70 0x00 0x00 0x00 0x06 0x01 0x03 0x00 0x00 0x00 0x01
2024-02-26 17:49:16:603 [DEBUG] [Modbus] log.h:125 <<(6) 0x00 0x70 0x00 0x00 0x00 0x05
2024-02-26 17:49:16:603 [DEBUG] [Modbus] log.h:125 <<(11) 0x00 0x70 0x00 0x00 0x00 0x05 0x01 0x03 0x02 0x00 0x00
2024-02-26 17:49:16:603 [INFO] [neuron] driver.c:171 update driver: Modbus, group: Modbus, tag: Modbus, type: NEU_TYPE_UINT16, timestamp: 1708940956599 n_meta: 0
2024-02-26 17:49:16:623 [DEBUG] [neuron] driver.c:1695 Modbus-Modbus timer: 20
2024-02-26 17:49:17:004 [DEBUG] [neuron] adapter.c:594 adapter(MQTT) recv msg from: Modbus (nil), type: NEU_REQRESP_TRANS_DATA
2024-02-26 17:49:17:005 [DEBUG] [neuron] adapter.c:117 adapter(MQTT) recv msg from: Modbus (nil), type: NEU_REQRESP_TRANS_DATA, 0
2024-02-26 17:49:17:005 [DEBUG] [MQTT] mqtt_client.c:255 pub [/neuron/MQTT, QoS0] 107 bytes
2024-02-26 17:49:17:495 [INFO] [neuron] metric_handle.c:121 GET /api/v2/metrics?category=driver&node=Modbus [200]
2024-02-26 17:49:17:623 [DEBUG] [Modbus] log.h:125 >>(12) 0x00 0x71 0x00 0x00 0x00 0x06 0x01 0x03 0x00 0x00 0x00 0x01
2024-02-26 17:49:17:626 [DEBUG] [Modbus] log.h:125 <<(6) 0x00 0x71 0x00 0x00 0x00 0x05
2024-02-26 17:49:17:626 [DEBUG] [Modbus] log.h:125 <<(11) 0x00 0x71 0x00 0x00 0x00 0x05 0x01 0x03 0x02 0x00 0x00
2024-02-26 17:49:17:626 [INFO] [neuron] driver.c:171 update driver: Modbus, group: Modbus, tag: Modbus, type: NEU_TYPE_UINT16, timestamp: 1708940957619 n_meta: 0
2024-02-26 17:49:17:646 [DEBUG] [neuron] driver.c:1695 Modbus-Modbus timer: 20
2024-02-26 17:49:18:004 [DEBUG] [neuron] adapter.c:594 adapter(MQTT) recv msg from: Modbus (nil), type: NEU_REQRESP_TRANS_DATA
2024-02-26 17:49:18:004 [DEBUG] [neuron] adapter.c:117 adapter(MQTT) recv msg from: Modbus (nil), type: NEU_REQRESP_TRANS_DATA, 0
2024-02-26 17:49:18:005 [DEBUG] [MQTT] mqtt_client.c:255 pub [/neuron/MQTT, QoS0] 107 bytes
2024-02-26 17:49:18:358 [INFO] [neuron] manager.c:677 manager recv msg from: default-dashboard to , type: NEU_REQ_GET_NODES_STATE
2024-02-26 17:49:18:359 [NOTICE] [neuron] manager.c:1443 reply NEU_RESP_GET_NODES_STATE to default-dashboard(neuron-10000) 0x615000060700
2024-02-26 17:49:18:359 [INFO] [neuron] adapter.c:642 adapter(default-dashboard) recv msg from: manager 0x615000060700, type: NEU_RESP_GET_NODES_STATE
2024-02-26 17:49:18:359 [NOTICE] [neuron] http.c:54 <0x615000060700> GET /api/v2/node/state [200]
2024-02-26 17:49:18:647 [DEBUG] [Modbus] log.h:125 >>(12) 0x00 0x72 0x00 0x00 0x00 0x06 0x01 0x03 0x00 0x00 0x00 0x01
2024-02-26 17:49:18:649 [DEBUG] [Modbus] log.h:125 <<(6) 0x00 0x72 0x00 0x00 0x00 0x05
2024-02-26 17:49:18:649 [DEBUG] [Modbus] log.h:125 <<(11) 0x00 0x72 0x00 0x00 0x00 0x05 0x01 0x03 0x02 0x00 0x00
2024-02-26 17:49:18:649 [INFO] [neuron] driver.c:171 update driver: Modbus, group: Modbus, tag: Modbus, type: NEU_TYPE_UINT16, timestamp: 1708940958649 n_meta: 0
2024-02-26 17:49:18:669 [DEBUG] [neuron] driver.c:1695 Modbus-Modbus timer: 30
2024-02-26 17:49:19:004 [DEBUG] [neuron] adapter.c:594 adapter(MQTT) recv msg from: Modbus (nil), type: NEU_REQRESP_TRANS_DATA
2024-02-26 17:49:19:005 [DEBUG] [neuron] adapter.c:117 adapter(MQTT) recv msg from: Modbus (nil), type: NEU_REQRESP_TRANS_DATA, 0
2024-02-26 17:49:19:005 [DEBUG] [MQTT] mqtt_client.c:255 pub [/neuron/MQTT, QoS0] 107 bytes
2024-02-26 17:49:19:670 [DEBUG] [Modbus] log.h:125 >>(12) 0x00 0x73 0x00 0x00 0x00 0x06 0x01 0x03 0x00 0x00 0x00 0x01
2024-02-26 17:49:19:673 [DEBUG] [Modbus] log.h:125 <<(6) 0x00 0x73 0x00 0x00 0x00 0x05
2024-02-26 17:49:19:673 [DEBUG] [Modbus] log.h:125 <<(11) 0x00 0x73 0x00 0x00 0x00 0x05 0x01 0x03 0x02 0x00 0x00
2024-02-26 17:49:19:673 [INFO] [neuron] driver.c:171 update driver: Modbus, group: Modbus, tag: Modbus, type: NEU_TYPE_UINT16, timestamp: 1708940959669 n_meta: 0
2024-02-26 17:49:19:693 [DEBUG] [neuron] driver.c:1695 Modbus-Modbus timer: 20
2024-02-26 17:49:20:004 [DEBUG] [neuron] adapter.c:594 adapter(MQTT) recv msg from: Modbus (nil), type: NEU_REQRESP_TRANS_DATA
2024-02-26 17:49:20:005 [DEBUG] [neuron] adapter.c:117 adapter(MQTT) recv msg from: Modbus (nil), type: NEU_REQRESP_TRANS_DATA, 0
2024-02-26 17:49:20:005 [DEBUG] [MQTT] mqtt_client.c:255 pub [/neuron/MQTT, QoS0] 107 bytes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment