Use PowerShell to query your Bosch Home Connect Devices

Recently our Washdryer lost the function to dry, so we keep him to wash our clothes and needed to buy a new Dryer. The most important thing here (for me) was the possibility to have an API and to integrate with our Home Automation.

So after some research, “we” decided to buy a new dryer from Bosch with “Home Connect”. To be honest, my Girlfriend had no idea about this decision, she just wanted a new dryer 🙂

So, the Dryer was delivered and quickly connected to my Home Automation with Openhab.

But, can I use PowerShell to query the Bosch Home Connect API?

So I quickly started to do some tests and made it possible to start a Dryer Program by PowerShell 🙂

So, let’s see how this works


The Documentation can be found here: Home Connect API Documentation (

First, we need to create a Home Connect Account and then an API Program here: Register new Application | Home Connect Developer Program (

Make sure that you use “Device Flow” as “OAuth Flow”

For the Redirect URI, you can use localhost

When the APP is created, note the Client ID and the Secret



Now let’s see how to authenticate with the Home Connect API. Unfortunately, there is a manual step inside.

As you can read in the Docs, we have three steps.

  • Device Auth
  • User Approval – manual
  • Get Token

The following part will do the first step and return an URL, you need to open, log in and click Approve


$Body = @{
    "client_id"  = "$ClientID"
    "scope"   = "IdentifyAppliance Monitor Control "

$VerificationRepsonse=Invoke-RestMethod -Method POST -Uri $AuthURL -ContentType "application/x-www-form-urlencoded" -Body $Body


When this step is finished, you can continue the PowerShell Code

$Body = @{
    "client_id"  = "$ClientID"
    "grant_type"   = "device_code"
    "client_secret" = "$Secret"
    "device_code" = "$($VerificationRepsonse.device_code)"


$TokenRepsonse=Invoke-RestMethod -Method POST -Uri $AuthURL -ContentType "application/x-www-form-urlencoded" -Body $Body

$Header = @{
    "Authorization"  = "Bearer $($TokenRepsonse.access_token)"

Now we defined the $header Variable with our Request Token, so we are now authenticated and can go ahead.

Control Device

First, we need to Query the API for our Devices/Appliances.

$Appliances=Invoke-RestMethod -Uri "" -Method GET -Headers $Header


The Result shows a list of all Devices and their “haId” that the Unique ID what we need in the Next Steps.

So, now lets query the state of the Device with the following Code

$State=Invoke-RestMethod -Uri "$($" -Method GET -Headers $Header


What is important here, the that “RemoteControlStartAllowed” is “True” so that we can Start the Dryer by PowerShell.

This needs to be activated directly at the Dryer.

Start the Dryer

So, related to that Documentation we start a specific Program and need to build the JSON and Send a PUT Command.

#Start a Program
$JsonBody = @"

Invoke-RestMethod -Uri "$($" -Method PUT -Headers $Header -Body $JsonBody -ContentType "application/vnd.bsh.sdk.v1+json"

To check the Result, let’s run the GET command

$Program=Invoke-RestMethod -Uri "$($" -Method GET -Headers $Header

And now we see the Program is running and active

Also, my Home Connect App is telling me, that the Program is active.


You can find the Script in my GitHub Report for Bosch Home Connect: Seidlm/BOSCH-Home-Connect-PowerShell: BOSCH Home Connect PowerShell (

au2mate, everything
Michael Seidl, aka Techguy

BOSCH and Home-Connect, HomeConnect is a trademark of Robert Bosch BmbH or Bosch Corporation. I just used it here to have some fun.

2 thoughts on “Use PowerShell to query your Bosch Home Connect Devices”

  1. What I’m missing here: How does your Girlfriend now start the dryer? With PowerShell 🙂

Leave a Comment

Your email address will not be published. Required fields are marked *