||
2020-08-31T09:48:22 - VERBOSE - preProcessor - Connecting module "preProcessor" to 127.0.0.1:1883 ...
2020-08-31T09:48:22 - DEBUG - preProcessor - Starting worker "preProcessor" ...
2020-08-31T09:48:22 - DEBUG - moduleManager - Starting module "fileExporter" ...
2020-08-31T09:48:22 - VERBOSE - fileExporter - Connecting module "fileExporter" to 127.0.0.1:1883 ...
2020-08-31T09:48:22 - DEBUG - fileExporter - Starting worker "fileExporter" ...
2020-08-31T09:48:22 - DEBUG - mqtt - Connected "fileExporter" to 127.0.0.1:1883
2020-08-31T09:48:22 - DEBUG - mqtt - Connected "preProcessor" to 127.0.0.1:1883
2020-08-31T09:48:27 - INFO - job - Starting job "getValues" for port "com1" ...
2020-08-31T09:48:27 - SPAM - schedulerUsb - Published message with QoS 0 to "openadms/com1"
2020-08-31T09:48:27 - DEBUG - job - Next observation starts in 1.0 s
2020-08-31T09:48:27 - SPAM - com1 - Received message of type "observation" from "job"
Exception in thread com1:
Traceback (most recent call last):
File "/usr/local/python3.8/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/home/chaoshu/Desktop/openadms-node-master/core/module.py", line 93, in run
self._worker.handle(message) # Fire and forget.
File "/home/chaoshu/Desktop/openadms-node-master/core/prototype.py", line 155, in handle
handler_func(header, payload)
File "/home/chaoshu/Desktop/openadms-node-master/core/prototype.py", line 74, in do_handle_observation
obs = self.process_observation(Observation(payload))
File "/home/chaoshu/Desktop/openadms-node-master/modules/port.py", line 476, in process_observation
self._create()
File "/home/chaoshu/Desktop/openadms-node-master/modules/port.py", line 425, in _create
self._serial_port_config = self._get_port_config()
File "/home/chaoshu/Desktop/openadms-node-master/modules/port.py", line 569, in _get_port_config
return SerialPortConfiguration(
File "/home/chaoshu/Desktop/openadms-node-master/modules/port.py", line 322, in __init__
5: serial.FIVEBITS,
AttributeError: module 'serial' has no attribute 'FIVEBITS'
解决:
pipenv install pySerial
2020-08-31T14:53:19 - ERROR - preProcessor - Invalid regular expression for response "draft" in observation "getValues" of target "gnss" from sensor "gnss" on port "com1"
responsePattern的填写规则可以在如下网站进行验证:
https://regex101.com/r/aHVNIQ/1
比如:GGA语句的正则表达式 (?P<gga>\$.*)
MQTT is used for message passing between OpenADMS Node modules. You cannot send MQTT messages directly to the database server. Make sure that the port in the MQTT configuration matches the MQTT broker settings (i. e., port 1883
). Port 5432
is probably the PostgreSQL port. If you want to export observation data to an OpenADMS Server instance, use the CloudExporter module. See config/examples/cloud.json
for an example.
The regular expression in the responsePattern
field is invalid. Try the pattern (?P<gga>\$.*)
instead. Also, make sure the responseDelimiter
matches:
"requestSets": { "draft": { "enabled": true, "request": "", "response": "", "responseDelimiter": "\r\n", "responsePattern": "(?P<gga>\$.*)", "sleepTime": 1.0, "timeout": 1.0 } }, "responseSets": { "gga": { "type": "string", "unit": "none" } }
You can test the regular expression on regex101.com.
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-9-21 01:03
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社