This Intelligent Transportation Systems (ITS) MQTT client based on the JSon ETSI specification transcription provides a ready to connect project for the mobility

Overview

its-client

License: MIT Build Status crates.io

This Intelligent Transportation Systems (ITS) MQTT client based on the JSon ETSI specification transcription provides a ready to connect project for the mobility (connected and autonomous vehicles, road side units, vulnerable road users,...).

Let's connect your device or application to our Intelligent Transport Systems (ITS) platform!

Packages

We provide many packages into the same project.

JSon Schema

ETSI.org proposal of implementation using the JSon language (instead of ASN.1 by default).

Rust libits-client

The Rust library to build a client.

Rust libits-copycat

A Rust library example cloning each message and waiting 3 seconds before to send it as un new mobile thing.

Rust its-client

A Rust binary example to connect on ITS platform using the libits-copycat example.

Comments
  • python: shuffle its-client one directory down

    python: shuffle its-client one directory down

    Prepare directory structure to receive additional python clients.
    No functional change, just directory layout shuffling.


    How to test:

    1. The python-related workflows still work:
      • python_its-client.yml => Python its-client
      • docker.yml => Run the its client container => Run Python docker action
    opened by ymorin-orange 4
  • static mode not triggered by default

    static mode not triggered by default

    Into the config file, if you put a position to static: false AND you declare the other fields (latitude, heading,...), the its client stays on static mode (not using the GPS).

    bug 
    opened by tigroo 3
  • python/its-status: new client, to publish ITS status messages

    python/its-status: new client, to publish ITS status messages

    New features:

    • its-status: new python client to publish ITS status messages that match the status schema

    How to test:

    1. build and install python/its-status with standard setuptools procedure;
    2. create a configuration file, using its-status.cfg as startup point, adapt with your MQTT broker and credentials, enable the stdout emitter;
    3. subscribe an MQTT client to your broker, on the status topic, e.g. with mosquitto CLI clients:
      $ mosquitto_sub -h BROKER -p PORT -u USERNAME -P PASSWORD -i ID -t 'status/#'
      
    4. run its-status using your custom configuration file:
      $ its-status -c /path/to/its-status.custom.cfg
      

    Expected results:

    1. The its-status package is installed;
    2. You have a custom configuration file with your MQTT settings;
    3. The MQTT client is connected to your MQTT broker;
    4. The its-status program runs, and the messages are visible both on the its-status' own stdout, as well as on the MQTT client.
    opened by ymorin-orange 2
  • python/its-client: add more static position items

    python/its-client: add more static position items

    New features

    • python: add configuration items to fake altitude, heading, and speed

    How to test

    1. Create a test config file, replace the MQTT settings to match your setup:
      [broker]
      host=test_host
      port=18
      tls_port=88
      username=test_user
      password=test_password
      client_id=test_client_id
      
      [position]
      static=true
      latitude=44.50779
      longitude=2.209381
      heading=130.7275
      speed=0.103
      altitude=131.693
      
      [log]
      directory=.
      default_level=DEBUG
      
    2. Start the its-client with that config file:
      $ its-client -c /path/to/config/
      
    3. Check the values emitted in the MQTT broker shall match the values from the config file:
      $ mosquitto_sub -h test_host -p 18 -v -t '#'
      

    Notes: the black change can be seen in this job.

    opened by ymorin-orange 2
  • Cpm v1.2.0

    Cpm v1.2.0

    New features

    • schema: Provide CPM schema version 1.2.0
    • rust: apply changes to the data concerned structures: CollectivePerceptionMessage, PerceivedObject

    Closes #34

    How to test

    1. Check the schema validity
      schema/validate schema/cpm_schema_1-2-0.json
      

      => it must be valid JSON => it must be valid against its own schema "https://json-schema.org/draft/2020-12/schema"

    2. Build and run unit tests
      cargo clean; cargo build --all; cargo test --all
      

      => Build must be successfull => All tests must pass

    3. Run the example application
      	 cargo run --bin its-client -- --mqtt-host france1 --mqtt-port 11883 --mqtt-username <username> --mqtt-password <password> --mqtt-client-id ora_itsclient_test
      

      => Binary must run and behave correctly

    bug enhancement Rust 
    opened by nbuffon 2
  • Draft: CPM v1.1.3

    Draft: CPM v1.1.3

    New features

    • schema: Provide CPM schema version 1.1.3
    • rust: apply changes to the data concerned structures: CollectivePerceptionMessage, PerceivedObject

    Closes #34

    How to test

    1. Check the schema validity => it must be valid JSON => it must be valid against its own schema "https://json-schema.org/draft/2020-12/schema"
    2. Build and run unit tests
      cargo clean; cargo build --all; cargo test --all
      

      => Build must be successfull => All tests must pass

    3. Run the example application
      	 cargo run --bin its-client -- --mqtt-host france1 --mqtt-port 11883 --mqtt-username <username> --mqtt-password <password> --mqtt-client-id ora_itsclient_test
      

      => Binary must run and behave correctly

    enhancement Rust 
    opened by nbuffon 2
  • Cpm management

    Cpm management

    New features

    • ROI based CPM subscription
    • CPM message reception monitoring

    How to test

    1. Start the client and filter its output on CPM
      PYTHONPATH=.. ./main.py --mqtt-host <broker_ip> --mqtt-port <mqtt_port> --mqtt-username <username> --mqtt-password <password> --mqtt-client-id <unique_id> --log-level INFO --geo-position=static | grep cpm
      

      => You must see logs about CPM queue subscription

      2022-04-15 17:18:51,232 INFO: we subscribed on topic 5GCroCo/outQueue/v2x/cpm/+/1/2/0/2/2/2/0/2/3/1/0/3/1/1/2/0/0/0/#

    2. Send fake CPM You can use this script to generate a CPM that is inside the client's ROI => You must see logs about CPM reception

      2022-04-15 17:22:56,240 INFO: message received on topic 5GCroCo/outQueue/v2x/cpm/ora_car_fake-6176/1/2/0/2/2/2/0/2/3/1/0/3/1/1/2/0/0/0/3/2/3/0 2022-04-15 17:22:56,241 INFO: crunch-cli cpm received_on ora_broker_3101/5GCroCo/outQueue/v2x/cpm/ora_car_fake-6176 123456789/1650036176/lat:43.50779/lng:1.209381 at 1650036176242 2022-04-15 17:22:56,242 INFO: {"origin": "self", "source_uuid": "ora_car_fake-6176", "type": "cpm", "message": {"generation_delta_time": 1650036176, "number_of_perceived_objects": 1, "perceived_object_container": [{"time_of_measurement": 123, "object_confidence": 99, "distance": {"y_distance": 167, "x_distance": 1105}, "object_ref_point": 0, "speed_confidence": {"x_speed": 127, "y_speed": 127}, "distance_confidence": {"y_distance": 102, "x_distance": 102}, "object_id": 162, "speed": {"x_speed": 0, "y_speed": 0}}], "protocol_version": 1, "station_id": 123456789, "station_data_container": {"originating_vehicle_container": {"heading": 0, "vehicle_length": 1023, "confidence": {"heading": 127, "vehicle_length": 4, "yaw_rate": 8, "speed": 1}, "vehicle_width": 62, "yaw_rate": 32767, "speed": 0, "drive_direction": 2, "longitudinal_acceleration": 161}}, "management_container": {"confidence": {"altitude": 15, "position_confidence_ellipse": {"semi_major_confidence": 4095, "semi_major_orientation": 3601, "semi_minor_confidence": 4095}}, "reference_position": {"altitude": 800001, "latitude": 4350779, "longitude": 1209381, "station_type": 5}, "generation_delta_time": 9805, "message_id": 14, "sensor_information_container": [{"sensor_id": 0, "detection_area": {"vehicle_sensor": {"ref_point_id": 0, "y_sensor_offset": 0, "x_sensor_offset": -24, "vehicle_sensor_property_list": [{"horizontal_opening_angle_start": 3486, "horizontal_opening_angle_end": 114, "range": 600}]}}, "type": 3}]}, "version": "1.0.0", "timestamp": 1650036176}}

    3. Stop the client (not to flood the data files)
    4. Check that CPM reception has been monitored
      cat /data/its_client/monitoring.csv | grep cpm
      

      => CPM reception must have been monitored

      crunch-cli cpm received_on ora_broker_3101/5GCroCo/outQueue/v2x/cpm/ora_car_fake-6176 123456789/1650036176/lat:43.50779/lng:1.209381 at 1650036176242

    5. Check the reception.txt data file
      cat /data/its_client/reception.txt | grep cpm
      

      => Received CPM payload must be present

      {"origin": "self", "source_uuid": "ora_car_fake-6176", "type": "cpm", "message": {"generation_delta_time": 1650036176, "number_of_perceived_objects": 1, "perceived_object_container": [{"time_of_measurement": 123, "object_confidence": 99, "distance": {"y_distance": 167, "x_distance": 1105}, "object_ref_point": 0, "speed_confidence": {"x_speed": 127, "y_speed": 127}, "distance_confidence": {"y_distance": 102, "x_distance": 102}, "object_id": 162, "speed": {"x_speed": 0, "y_speed": 0}}], "protocol_version": 1, "station_id": 123456789, "station_data_container": {"originating_vehicle_container": {"heading": 0, "vehicle_length": 1023, "confidence": {"heading": 127, "vehicle_length": 4, "yaw_rate": 8, "speed": 1}, "vehicle_width": 62, "yaw_rate": 32767, "speed": 0, "drive_direction": 2, "longitudinal_acceleration": 161}}, "management_container": {"confidence": {"altitude": 15, "position_confidence_ellipse": {"semi_major_confidence": 4095, "semi_major_orientation": 3601, "semi_minor_confidence": 4095}}, "reference_position": {"altitude": 800001, "latitude": 4350779, "longitude": 1209381, "station_type": 5}, "generation_delta_time": 9805, "message_id": 14, "sensor_information_container": [{"sensor_id": 0, "detection_area": {"vehicle_sensor": {"ref_point_id": 0, "y_sensor_offset": 0, "x_sensor_offset": -24, "vehicle_sensor_property_list": [{"horizontal_opening_angle_start": 3486, "horizontal_opening_angle_end": 114, "range": 600}]}}, "type": 3}]}, "version": "1.0.0", "timestamp": 1650036176}}

    enhancement Python 
    opened by nbuffon 2
  • schema: use dots in floating-point notation

    schema: use dots in floating-point notation

    To help our international, non-french users, use english notation for floating point, rather than the french one, in the description of the fields in the schemas.

    Fixes: #42

    opened by ymorin-orange 1
  • python/its-client: mirror MQTT traffic to another broker

    python/its-client: mirror MQTT traffic to another broker

    New features:

    • its-client: mirror MQTT traffic to another broker

    How to test:

    1. build and install python/its-clients with standard setuptools procedure;
    2. Start a local broker and listen on it:
      $ mosquitto -c /dev/null -p 11883 -d
      $ mosquitto_sub -p 11883 -t '5GCroCo/#'
      
    3. Uncomment and update the mirror-boker section in its_client.cfg:
      [mirror-broker]
      host = localhost
      port = 11883
      mirror-self = false
      
    4. Start its-client with that config file (warning, the path to the config file is in fact the path to the directory containing the config file):
      $ its-client -c /path/to/its_client/
      

    Note: do not forget to kill the MQTT broker that is in the background...


    Expected results:

    1. The its-client package is installed
    2. The MQTT broker starts, the MQTT listeners, well, listens...
    3. The its-client.cfg config file is updated
    4. its-client starts, the MQTT listener reports messages both in the inQueue and outQueue.
    opened by ymorin-orange 1
  • Replace commas by dots in schemas examples/descriptions

    Replace commas by dots in schemas examples/descriptions

    As mentioned in PR !38 some values in parameters' description are using commas instead of dots (0,1 instead of 0.1) All schemas have to be checked for such typos

    opened by nbuffon 1
  • build(deps): bump regex from 1.5.4 to 1.5.6 in /rust

    build(deps): bump regex from 1.5.4 to 1.5.6 in /rust

    Bumps regex from 1.5.4 to 1.5.6.

    Changelog

    Sourced from regex's changelog.

    1.5.6 (2022-05-20)

    This release includes a few bug fixes, including a bug that produced incorrect matches when a non-greedy ? operator was used.

    1.5.5 (2022-03-08)

    This releases fixes a security bug in the regex compiler. This bug permits a vector for a denial-of-service attack in cases where the regex being compiled is untrusted. There are no known problems where the regex is itself trusted, including in cases of untrusted haystacks.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 1
  • python/its-client: send own messages to the outQueue of the lcoal broker

    python/its-client: send own messages to the outQueue of the lcoal broker

    Bug fix:

    • #57

    How to test:

    Pre-requisites: an MQTT broker running

    1. Check the messages on your MQTT broker, displaying topic (%t) and payload (%p):
      $ mosquitto_sub -t '#' -F '%t %p'
      
    2. Configure its-client to connect to your MQTT broker as a mirror broker, without mirroring self; run its-client
    3. Configure its-client to connect to your MQTT broker as a mirror broker, with mirroring self; run its-client

    Expected results:

    1. The messages are displayed as they are emitted
    2. The messages are all on the outQueue
    3. The messages are all on the outQueue, and the CAM is duplicated from the one on the inQueue.
    opened by ymorin-orange 0
  • python/its-client: mirrored self-message queued in inQueue instead of outQueue

    python/its-client: mirrored self-message queued in inQueue instead of outQueue

    Current behaviour:

    Messages published to the central broker are sent on queue inQueue (in as seen from the central broker). Currently, we also mirror that message on the local broker, on the same queue.


    Expected behaviour:

    Consumers expects messages on the outQueue (out as seen from the central broker), so messages sent should be mirrored locally on the outQueue.

    bug Python 
    opened by ymorin-orange 0
  • python/its-info: new client to send info messages

    python/its-info: new client to send info messages

    Features:

    • its-info: a new client to send ETSI information messages

    How to test:

    Preparatory steps: have a MQTT broker running.

    1. Build and install the package in python/its-info/ with the standard setup-tools procedure:
      $ cd python/its-info/
      $ pip3 wheel .
      $ pip3 install its_info-0.0.0-py3-none-any.whl
      

      Note where the its-info is installed, e.g. ${HOME}/.local/bin

    2. Update the configuration its-info.cfg to match your local setup, especially the MQTT broker settings; choose a short period, like a few seconds.
    3. Run a MQTT client that listens on the info topic (or whatever you configued in its-info.cfg):
      $ mosquitto_sub -h BROKER -p PORT -u USERNAME -P PASSWORD -i ID -t info
      
    4. Run the client:
      $ ${HOME}/.local/bin/its-info --config its-info.cfg
      
    5. Terminate its-info (with Ctrl-C)
    6. Stop and restart the MQTT client

    Expected results:

    1. The wheel is built and installed.
    2. The configuration file is set for your local setup.
    3. The MQTT client listens for messages.
    4. The its-info clients runs (it's silent), the MQTT client display info messages.
    5. The info message is no longer updated.
    6. The MQTT clint displays the last info message that was retained in the broker.
    opened by ymorin-orange 1
  • python/its-status: re-architect main loop and data capturing

    python/its-status: re-architect main loop and data capturing

    Features:

    • switch from a signal(7) to a timerfd(2) to drive the main loop
    • run plugins in their own individual threads

    How to test:

    See #43


    Expected results:

    See #43

    opened by ymorin-orange 0
  • CPM's perceived object requires optional `originating_vehicle_container`

    CPM's perceived object requires optional `originating_vehicle_container`

    The method collective_perception_message.rs::mobile_perceived_object_list() requires the optional container OriginatingVehicleContainer to be present

    The problem is that perceived object are managed as MobilePerceivedObjects which need a heading that is not provided in perceived object
    For our first need there was an arbitrary heading computing based on the vehicle that perceived the object

    Problem is that CPM are not only detected by vehicles but also RSU that do not have a heading

    Two problems here:

    1. POs detected by something else than a vehicle are not accessible as an empty vec is returned
    2. We need to decide what to do about the MobilePerceivedObject's heading member (the best way is probably to set is as an `Option)
    bug Rust 
    opened by nbuffon 1
Owner
Orange
Open Source by Orange
Orange
QUIC proxy that allows to use QUIC to connect to an SSH server without needing to patch the client or the server.

quicssh-rs ?? quicssh-rs is a QUIC proxy that allows to use QUIC to connect to an SSH server without needing to patch the client or the server. quicss

Jun Ouyang 18 May 5, 2023
Converts Hikvision camera events to MQTT

HikSink streams Hikvision camera and NVR events (motion, line crossing, tamper, illegal logins, etc.) to MQTT messages for consumption by home automat

Corner Bit 48 Dec 27, 2022
TeleMQ is an experimental MQTT broker implemented in Rust language.

TeleMQ TeleMQ is an experimental MQTT broker implemented in Rust language. The broker implements MQTT version 3.1.1 specification. License This projec

null 12 Dec 27, 2022
MQTT over QUIC

MQuicTT ?? This is a pre-alpha project, tread carefully ?? A rustlang utility/library for MQTT over QUIC. QUIC allows us to send data over multiple co

null 29 Dec 16, 2022
Small MQTT router. Allows creating multiple inputs/outputs and run action when input triggers.

MQRT Small MQTT router. Allows creating multiple inputs/outputs and run action when input triggers. Features multi-(input/output) multiple actions tie

Nazar Gondaruk 0 Jan 4, 2022
Export statistics of Mosquitto MQTT broker (topic: $SYS) to Prometheus

Preface The Mosquitto MQTT broker provides a number of statistics on the special $SYS/# topic (see mosquitto(8)). Build requirements As a Rust program

Bobobo-bo Bo-bobo 2 Dec 15, 2022
Pure rust mqtt cilent

NOTE: Archived. No further development under this repo. Follow progress of a different implementation here Pure rust MQTT client which strives to be s

Ather Energy Pvt Ltd 201 Dec 2, 2022
Subscribe to MQTT topics and push them to InfluxDB 1.x or v2

MQTT 2 InfluxDB Subscribe to MQTT topics and push them to InfluxDB 1.x or v2 Something like Telegraf for MQTT like it does with inputs.mqtt_consumer a

null 2 Feb 20, 2022
Convert TeleInfo frames from a Linky meter's serial port to Home Assistant-compatible MQTT messages.

teleinfo2mqtt-rs Convert TeleInfo frames from a Linky meter's serial port to Home Assistant-compatible MQTT messages. Overview sequenceDiagram par

Stanislas 4 Mar 19, 2024
Library + CLI-Tool to measure the TTFB (time to first byte) of HTTP requests. Additionally, this crate measures the times of DNS lookup, TCP connect and TLS handshake.

TTFB: CLI + Lib to Measure the TTFB of HTTP/1.1 Requests Similar to the network tab in Google Chrome or Mozilla Firefox, this crate helps you find the

Philipp Schuster 24 Dec 1, 2022
MuonFP is an enterprise ready, TCP passive fingerprinter written in Rust that has no external dependencies such as WireShark or other open source software.

MuonFP is a TCP passive fingerprinter written in Rust that has no external dependencies such as WireShark or other open source software. The program w

Sundruid 8 Sep 22, 2024
IDP2P is a peer-to-peer identity protocol which enables a controller to create, manage and share its own proofs as well as did documents

IDP2P Experimental, inspired by ipfs, did:peer and keri Background See also (related topics): Decentralized Identifiers (DIDs) Verifiable Credentials

null 5 Oct 31, 2022
Simple project to test grpc between ruby (client) and rust (server)

grpc-example Simple project to test grpc between ruby (client) and rust (server). Usage To simplify a lot this project uses docker and docker compose

Bruno Arueira 2 Oct 14, 2021
A simple web server(and library) to display server stats over HTTP and Websockets/SSE or stream it to other systems.

x-server-stats A simple web server(and library) to display server stats over HTTP and Websockets/SSE or stream it to other systems. x-server(in x-serv

Pratyaksh 11 Oct 17, 2022
Futures implementation for JSON-RPC

futures-jsonrpc Futures + JSON-RPC A lightweight remote procedure call protocol. It is designed to be simple! And, with futures, even more flexible! T

Victor Lopes 12 May 19, 2022
JSON-RPC endpoint proxy that dumps requests/responses for debugging

json_rpc_snoop How to build Ensure you have cargo installed and in your PATH (the easiest way is to visit https://rustup.rs/) make This will create t

null 10 Dec 14, 2022
A Rust based DNS client, server, and resolver

Trust-DNS A Rust based DNS client, server, and Resolver, built to be safe and secure from the ground up. This repo consists of multiple crates: Librar

Benjamin Fry 2.7k Dec 30, 2022
A minimalist socket-based client/server in Rust to illustrate a tutorial

The basics of unix sockets This repository serves as a reference for this tutorial blogpost How to run Install Rust and Cargo, and then do: cargo run

Emmanuel Bosquet 4 Dec 4, 2022
A runtime for writing reliable asynchronous applications with Rust. Provides I/O, networking, scheduling, timers, ...

Tokio A runtime for writing reliable, asynchronous, and slim applications with the Rust programming language. It is: Fast: Tokio's zero-cost abstracti

Tokio 18.7k Dec 30, 2022