Skip to main content

Bosch XDK

This code will create a new machine on the peaq network and register it with the network. The machine's ID will then be printed to the console.

To run this code, you will need to install the peaq Python SDK and the Bosch XDK Python SDK. You can do this by running the following commands:


import peaq
import bosch_xdk

# Initialize the peaq client
client = peaq.Client()

# Connect to the peaq network
client.connect()

# Initialize the Bosch XDK client
xdk_client = bosch_xdk.Client()

# Connect to the Bosch XDK
xdk_client.connect()

# Get the Bosch XDK's device ID
device_id = xdk_client.device_id

# Create a new machine
machine = peaq.Machine(
name="My Bosch XDK",
description="A Bosch XDK running the peaq network",
device_id=device_id,
)

# Register the machine with the peaq network
machine.register()

# Get the machine's ID
machine_id = machine.id

# Print the machine's ID
print("Machine ID:", machine_id)