Skip to content

An example that submits mocked TCU data to B-ON platform

Notifications You must be signed in to change notification settings

inomotech/b-on-connector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

B-ON connector

This is a repository with an example of a connector. It contains a notebook that connects to the B-ON platform and submits mocked TCU data.

Setup

Environment requirements

  1. Install python 3.12.
  2. Install poetry: pip install poetry==2.1.2.
  3. Install poetry dependencies: poetry install.

Prerequisites

  1. Get the certificates folder from B-ON. Put it in the repository root.
  2. Get the connector metadata from B-ON: B_ON_MQTT_ENDPOINT, TENANT, THING_IMEI.

Running the B-ON connector

  1. Start the jupyter lab: poetry run jupyter-lab.
  2. Open the notebook b-on_connector.ipynb.
  3. Update the connector metadata in the notebook: B_ON_MQTT_ENDPOINT, TENANT, THING_IMEI.
  4. Optionally change the values for position, odometer and battery.
  5. Run the notebook: Run > Run All Cells

Vehicle signals

Status message Details MQTT topic Message parameters Other details
VehicleACChargeCurrent This message is used to transmit the current flow on the vehicle’s AC side. {TENANT}/vehicleStatus/{THING_IMEI}/vehicle/acChargeCurrent
Signal(
timestamp = timestamp,
value_per_phase = ValuePerPhase(phase1=value1, phase2=value2, phase3=value3),
)
Scaling factor: 100
VehicleACChargeVoltage This message is used to transmit the voltage present on the vehicle’s AC side. {TENANT}/vehicleStatus/{THING_IMEI}/vehicle/acChargeVoltage
Signal(
timestamp = timestamp,
value_per_phase = ValuePerPhase(phase1=value1, phase2=value2, phase3=value3),
)
Scaling factor: 10
VehicleACCurrentRealized This message is used to transmit the charge power currently realized by the vehicle. The value transmitted here is not including any derating but is referring to the value set in the respective command message. {TENANT}/vehicleStatus/{THING_IMEI}/vehicle/chargingPowerRealized
Signal(
timestamp = timestamp,
ac_current_realized = ACCurrentRealized(realized_ac_current=value1, type=value2, rpc_id=value3, slice_id=value4),
)
VehicleAmbientTemperature This message is used to transmit the temperature of vehicle’s outside environment temperature sensor. {TENANT}/vehicleStatus/{THING_IMEI}/vehicle/ambientTemperature
Signal(
timestamp = timestamp,
integer_number = value,
)
Scaling factor: 10
VehicleBatteryTemperature This message is used to transmit the temperature of vehicle’s battery pack. {TENANT}/vehicleStatus/{THING_IMEI}/battery/batteryTemperature
Signal(
timestamp = timestamp,
integer_number = value,
)
Scaling factor: 10
VehicleCabinTemperature This message is used to transmit the temperature of vehicle’s driver cabin. {TENANT}/vehicleStatus/{THING_IMEI}/vehicle/cabinTemperature
Signal(
timestamp = timestamp,
integer_number = value,
)
Scaling factor: 10
VehicleChargePlugStatus This message is used to transmit the state of the vehicle’s charge plug/socket. {TENANT}/vehicleStatus/{THING_IMEI}/vehicle/chargePlugStatus
Signal(
timestamp = timestamp,
charge_plug_status = value,
)
VehicleChargingDCPowerMax This message is used to transmit the charge power realizable by the vehicle at the moment. {TENANT}/vehicleStatus/{THING_IMEI}/vehicle/chargingDCPowerMax
Signal(
timestamp = timestamp,
charging_dc_power_max = ChargingDcPowerMax(derating_justified=value1, derating_unjustified=value2),
)
VehicleDCChargeCurrent This message is used to transmit the current flow on the vehicle’s DC side. {TENANT}/vehicleStatus/{THING_IMEI}/vehicle/dcChargeCurrent
Signal(
timestamp = timestamp,
integer_number = value,
)
Scaling factor: 100
VehicleDCChargeVoltage This message is used to transmit the voltage present on the vehicle’s DC side. {TENANT}/vehicleStatus/{THING_IMEI}/vehicle/dcChargeVoltage
Signal(
timestamp = timestamp,
integer_number = value,
)
Scaling factor: 100
VehicleIgnitionStatus This message is used to transmit the state of the vehicle’s ignition. {TENANT}/vehicleStatus/{THING_IMEI}/vehicle/ignitionStatus
Signal(
timestamp = timestamp,
ignition_status = value,
)
VehicleOdometer This message is used to transmit the odometer value. {TENANT}/vehicleStatus/{THING_IMEI}/vehicle/odometer
Signal(
timestamp = timestamp,
integer_number = value,
)
Scaling factor: 10
VehicleOnlineStatus This message is used to transmit the vehicle’s connectivity state to the backend. This message shall be sent at least every 15 minutes to act as a keep-alive message for the backend. {TENANT}/vehicleStatus/{THING_IMEI}/vehicle/onlineStatus
Signal(
timestamp = timestamp,
online_status = value,
)
VehiclePositionStatus This message is used to transmit the vehicle’s location. {TENANT}/vehicleStatus/{THING_IMEI}/vehicle/positionStatus
Signal(
timestamp = timestamp,
position = Position(lat=value1, lon=value2),
)
VehiclePreconditioningStatus This message is used to transmit information about the vehicle’s preconditioning. {TENANT}/vehicleStatus/{THING_IMEI}/vehicle/preconditioningStatus
Signal(
timestamp = timestamp,
preconditioning_status= PreconditioningStatus(
preconditioning_schedule_request_id=value1,
preconditioning_schedule_slice_id=value2,
slice_status=value3,
),
)
VehicleStateOfCharge This message transmits the current state of charge of the vehicle’s battery. {TENANT}/vehicleStatus/{THING_IMEI}/battery/stateOfCharge
Signal(
timestamp = timestamp,
integer_number = value,
)
Scaling factor: 10
VehicleVINStatus This message transmits the current VIN of the vehicle the telematic unit is connected to. Since in some cases telematic units can be switched between vehicles, this message is used to signal that to the backend, allowing the status messages reported by the telematic unit to be associated with the correct vehicle. {TENANT}/vehicleStatus/{THING_IMEI}/vehicle/vinStatus
Signal(
timestamp = timestamp,
text = value),
)

Data exploration

  1. Open the B-ON platform and log in.
  2. Explore the Vehicle assets and their data.

About

An example that submits mocked TCU data to B-ON platform

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors