Skip to content
This repository has been archived by the owner on Oct 11, 2022. It is now read-only.

Implement service calls to talk to the API #23

Open
DavidMStraub opened this issue May 23, 2019 · 12 comments
Open

Implement service calls to talk to the API #23

DavidMStraub opened this issue May 23, 2019 · 12 comments
Labels
enhancement New feature or request

Comments

@DavidMStraub
Copy link
Owner

The currently implemented program switches are of limited use as they do not allow to change settings. For more fine-grained control, the easiest and most flexible solution IMO is to implement service calls that directly talk to the HomeConnect API.

@alexpilotti
Copy link

I'm really looking forward to this one as turning on the oven with predefined settings is the one of the primary benefits of this great integration. As a workaround IFTTT does the job but not very reliably.

@DavidMStraub
Copy link
Owner Author

Don't forget commands (#92).

@DavidMStraub
Copy link
Owner Author

Working on it.

DavidMStraub added a commit that referenced this issue Jun 26, 2020
@DavidMStraub
Copy link
Owner Author

I pushed some code, but honestly haven't even tested it ... if anyone feels adventurous, grateful for feedback :)

@Krocko
Copy link
Contributor

Krocko commented Jun 26, 2020

I get the following error:

Logger: homeassistant.util.package
Source: util/package.py:98 
First occurred: 22:55:51 (1 occurrences) 
Last logged: 22:55:51

Unable to install package homeconnect==0.6: ERROR: Could not find a version that satisfies the requirement homeconnect==0.6 (from versions: 0.1, 0.2, 0.2.1, 0.2.2, 0.3, 0.3.1, 0.3.2, 0.3.3, 0.4, 0.4.1, 0.4.2, 0.4.3, 0.4.4, 0.5) ERROR: No matching distribution found for homeconnect==0.6 WARNING: You are using pip version 20.0.2; however, version 20.1.1 is available. You should consider upgrading via the '/usr/local/bin/python3 -m pip install --upgrade pip' command.

and:

Logger: homeassistant.setup
Source: setup.py:139 
First occurred: 22:55:51 (1 occurrences) 
Last logged: 22:55:51

Setup failed for home_connect_beta: Requirements for home_connect_beta not found: ['homeconnect==0.6'].

@DavidMStraub
Copy link
Owner Author

Oops, forgot to push to PyPI. Fixed. Thanks for flagging!

@DavidMStraub
Copy link
Owner Author

FYI, after fixing a few more things, I can now dispatch calls to the API, but I cannot test it extensively as I don't have enough devices I can control. So would be grateful for feedback.

@asev
Copy link

asev commented Jan 3, 2021

This is great improvement. Looking forward!
I can't pass integer option. Integration sends it as string to API and gets:
Failed to call service home_connect_beta/set_option_selected. {'key': 'SDK.Error.InvalidOptionValue', 'description': 'Key BSH.Common.Option.StartInRelative has unexpected type or value 7200'}

@asev
Copy link

asev commented Jan 3, 2021

One more thing. I don't know why, but delayed dishwasher start can't be set for selected program.
The only way I was able to achieve that is by calling /homeappliances/{haid}/programs/active with body:

{
  "data": {
    "key": "Dishcare.Dishwasher.Program.NightWash",
    "options": [
      {
        "key": "BSH.Common.Option.StartInRelative",
        "value": 7200
      }
    ]
  }
}

The problem is that I can't do that with this integration.

@badguy99
Copy link
Contributor

@asev I've got some code working on my Home Assistant that gets this to work. As you say the dishwasher only support setting delayed start by calling /homeappliances/{haid}/programs/active with option in the body.
I'll put a pull request up here to add it shortly. It works fine with my dishwasher at least.

@badguy99
Copy link
Contributor

@DavidMStraub Just wondering if there were plans to port the code you've put in for this, along with what I put in under #122 to Home Assistant core?

@mikesumbler
Copy link

Not sure I am going to be that helpful (slash may just irritate) - I have a Bosch Fridge Freezer. At the moment I can see the power status and door status (open/closed) in HA but nothing on mode (Eco, freshness, vaction) nor the temperature sensors (fridge & freezer). In integrating the device setting api should I be able to see these . Happy to be a guinea pig.
Thanks
Mike

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants