-
Notifications
You must be signed in to change notification settings - Fork 1
record of one hour of messages #20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
model_update remote sysid exp
725791f to
d651271
Compare
|
@8ohamed I first replayed the recorded values ....
[data1.jsonl] → cpsens/recorded/1/data (len=92)
[data2.jsonl] → cpsens/recorded/2/data (len=92)
[data1.jsonl] → cpsens/recorded/1/data (len=92)
[data2.jsonl] → cpsens/recorded/2/data (len=92)
.....and then I used the following config and the experiments fail {
"MQTT": {
"host": "mqtt.eclipseprojects.io",
"port": 1883,
"userId": "",
"password": "",
"ClientID": "test_client_id",
"QoS": 1,
"TopicsToSubscribe": ["cpsens/recorded/1/data", "cpsens/recorded/2/data"]
}
}The tracelog of the failure is: (.venv) $ python .\src\examples\example.py --config .\config\replay.json accelerometers
JSON configuration loaded successfully.
on_connect: Connected with response code Success
Subscribing to topic: cpsens/recorded/1/data
on_subscribe: Subscription ID 1 with QoS levels [ReasonCode(Suback, 'Granted QoS 1')]
Data requested []
(.venv) $python .\src\examples\example.py --config .\config\replay.json align-readings
JSON configuration loaded successfully.
Traceback (most recent call last):
File "C:\Users\foo\git\example-shm\src\examples\example.py", line 76, in <module>
cli(obj={})
File "C:\Users\foo\git\example-shm\.venv\Lib\site-packages\click\core.py", line 1161, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\foo\git\example-shm\.venv\Lib\site-packages\click\core.py", line 1082, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "C:\Users\foo\git\example-shm\.venv\Lib\site-packages\click\core.py", line 1697, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\foo\git\example-shm\.venv\Lib\site-packages\click\core.py", line 1443, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\foo\git\example-shm\.venv\Lib\site-packages\click\core.py", line 788, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\foo\git\example-shm\.venv\Lib\site-packages\click\decorators.py", line 33, in new_func
return f(get_current_context(), *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\foo\git\example-shm\src\examples\example.py", line 35, in align_readings
align_acceleration_readings(ctx.obj["CONFIG"])
File "C:\Users\foo\git\example-shm\src\examples\aligning_readings.py", line 13, in align_acceleration_readings
selected_topics = [all_topics[i] for i in topic_indexes]
~~~~~~~~~~^^^
IndexError: list index out of range |
|
@8ohamed The following error comes $poetry run python src/examples/example.py model-update-remote-sysid
JSON configuration loaded successfully.
JSON configuration loaded successfully.
Waiting for OMA data...
Failed to connect to MQTT broker. Code: Not authorized
Failed to connect to MQTT broker. Code: Not authorized
Failed to connect to MQTT broker. Code: Not authorizedthis comes only when MQTT authentication is required. For replay scenario, the test.mosquitto.org does not require authentication and it works well. The problem appears only when authentication is required. |
|
There is a deprecated API in python .\record\record.py
C:\Users\foo\git\example-shm\record\record.py:54: DeprecationWarning: Callback API version 1 is deprecated, update to latest version
client = mqtt.Client(client_id=MQTT_CONFIG["ClientID"], protocol=mqtt.MQTTv311)
Recording for 30 seconds...
Connected with result code 0
Subscribed to cpsens/d8-3a-dd-37-d2-7e/3160-A-042_sn_999998/1/acc/raw/data
Subscribed to cpsens/d8-3a-dd-37-d2-7e/3160-A-042_sn_999998/1/acc/raw/metadata
Subscribed to cpsens/d8-3a-dd-37-d2-7e/3160-A-042_sn_999998/2/acc/raw/data
C:\Users\foo\git\example-shm\record\record.py:42: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
timestamp = datetime.utcnow().isoformat()
Recording complete. |
|
Hi @prasadtalasila the API warning is resolved.
|
@8ohamed the code is working well for the replay scenario. The replay scenario is using test MQTT server without any credentials. The problem comes when I run the code with credentials. I tried running the distributed code with HBK stream and then the authentication failure happens. |
|
@prasadtalasila Then you should only run |

I have added the folder conaining 1 hour of data for 2 topics, and a script to publish them. So we can run the experiments without changes, except for the mqtt config. I have changed the production.json.template accordingly.
This branch and the "pre-data" branch shouldn't be merged into main.