bosch-thermostat / home-assistant-bosch-custom-component

HA custom component for Bosch thermostats
Apache License 2.0
205 stars 43 forks source link

New interface for BOSCH regarding heatpump witt K30 RF "wifi" connectkey #335

Open Marlov11 opened 8 months ago

Marlov11 commented 8 months ago

first of all a huge thank you ... contributions like yours help to move people and in fact to the best of my belief "the world" towards a better home, comfort, but not least the opportunity to save energy and resources ;o)

Bosch has change its remode unit for many heatpumps to K30 RF connect key, it works only with WIFI insted of LAN, it is an product that also is used one there gas broilers.

are there plans for supporting this in home-assistant-bosch-custom-component

looking forward to hearing form you

BR/ Martin

olyckne commented 8 months ago

Would be awesome if we can get support for it. If there's anything I can do to help out I gladly will.

I have investigated a bit but since the API only is in "try-out" I haven't figured out how to refresh the token yet. They are using their singleKey Id thing for it. https://developer.bosch.com/products-and-services/apis/bosch-thermotechnology-device-api/get-started

Tried to look at the traffic from the IOS app but they are using SSL pinning so not sure if I can?

Marlov11 commented 8 months ago

hi Mattias

thanks your answer ;o)

If there's anything I can do, just tell me, I have it installed here. Yes, Bosch, Siemens, etc. have created a login system they call Singlekey-id.. with email and code which can then be used on all their platforms..

The K 30 itself is equipped with a sticker with a QR code for connection to their app. "Bosch homecom" also has the following: login: 9 digits Passport: xxxx-xxxx-xxxx-xxxx mac: mac address ​

BR/Martin


Fra: Mattias Lyckne @.> Sendt: 12. oktober 2023 13:35 Til: bosch-thermostat/home-assistant-bosch-custom-component @.> Cc: Martin @.>; Author @.> Emne: Re: [bosch-thermostat/home-assistant-bosch-custom-component] New interface for BOSCH regarding heatpump witt K30 RF "wifi" connectkey (Issue #335)

Would be awesome if we can get support for it. If there's anything I can do to help out I gladly will.

I have investigated a bit but since the API only is in "try-out" I haven't figured out how to refresh the token yet. They are using their singleKey Id thing for it. https://developer.bosch.com/products-and-services/apis/bosch-thermotechnology-device-api/get-started

Tried to look at the traffic from the IOS app but they are using SSL pinning so not sure if I can?

— Reply to this email directly, view it on GitHubhttps://github.com/bosch-thermostat/home-assistant-bosch-custom-component/issues/335#issuecomment-1759437689, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASHNDCID22QBJ6AGMK522JDX67IX3ANCNFSM6AAAAAA55JG7CI. You are receiving this because you authored the thread.Message ID: @.***>

sdneusta commented 8 months ago

I would love to see support for K30RF too. We installed a Bosch i7800 heater and i thought it would be simple to integrate data into HA with this wlan gateway. But it isn't. Let me know if I could support you.

feffemannen commented 8 months ago

I've also tried to access the K30RF-module from home assistsant using bosch-thermostat but with no success. If I can be any help for implementing support for the module please let me know. /Fredrik

pszafer commented 8 months ago

First thing to do would be to sniff communication and check if it's using XMPP protocol at all. Newer bosch devices are connecting through Bosch Home Connect, it's different protocol and not compatible with the old one.

olyckne commented 8 months ago

@pszafer: Pretty sure it only connects to web API, but haven't been able to sniff the communication in the iOS app since its using SSL pinning. Maybe it's easier with the android app? I thinks its easier to decrypt an android app at least but Im a bit out of my competence here and don't own any android devices :)

nmap can't find any open ports on the device.

They have something called Bosch Homecom Pro that is a web ui but it seems to only be for business partners to be able to remotely control devices they have installed. Will need to investigate it a bit further but I think you need a business account or been invited by the supplier that installed your device (unfortunately mine was installed by a family friend that usually don't work with Bosch so I don't think he has that possibility). I mainly work with web development so for me at least it would make a huge difference with a web ui instead of native apps to figure this out :)

At least they have the tryout api and api specification here but as I said I haven't figured out how to refresh the token from singlekey. I have seen some code when searching Github though so maybe I just need to dig a bit more. The next thing is that I have no idea what zoneId is. Tried 0-100 getting either 404 och 403 from the try out api 🤷

It says "coming soon" on official API but apparently it's not on their agenda at all https://developer.bosch.com/products-and-services/apis/bosch-thermotechnology-device-api/tryout

pszafer commented 8 months ago

All mobile apps are using sort of web api. It's often working like this:

bosch device <---xmpp ---> bosch server <---https---> mobile app

with many newer devices it's working in both ways

bosch device <---xmpp ---> bosch server <---https---> mobile app
bosch device <---rest api ---> bosch server <---rest api---> mobile app

if there is xmpp possible then my component can work. Otherwise you'd have figure it out different way.

impello-msoukup commented 7 months ago

The wifi module is simple XMPP client. This module establish connection with the XMPP server. Bosch HomeCom Easy app using HTTP APIs exposed on the Bosch server. We have to wait for opening of these APIs for end users.

FleshDK commented 7 months ago

Any update on this one? Really missing this in Energy view :)

Tornbloj commented 6 months ago

Shouldn't we try to push the guys over at Bosch? It is insane that the don't have an open API! support.boschdeveloperportal@bosch.com

olyckne commented 6 months ago

Shouldn't we try to push the guys over at Bosch? It is insane that the don't have an open API! support.boschdeveloperportal@bosch.com

I emailed them a while ago but never got an answer, but it's not a bad idea. There's also this thread in their forum https://community.developer.bosch.com/t5/Developer-Board/Bosch-Thermotechnology-Device-API-support-for-integration-with/td-p/19610

I mean, the API does exist so not sure why they just doesn't release it. At least some of the documentation already exists so we mainly need to know how to fetch and refresh the token. Using the app for a while now and its really slow and not that stable so maybe that's the reason they don't feel ready or they want to finish their web ui for the pro market first 🤷

olyckne commented 6 months ago

After digging a bit deeper and not just sniffing the traffic from the app but looking at what traffic comes and goes from the actual K30 device it talks to xmpp.k30.ticx.boschtt.net (139.15.179.138). Maybe if we can figure out _accesskey_prefix, _rrc_contact_prefix, _rrc_gateway_prefix we can get somewhere that way instead of the API?

I tried to just switch xmpp_host but it couldn't connect.

https://github.com/bosch-thermostat/bosch-thermostat-client-python/blob/dev/bosch_thermostat_client/connectors/ivt.py#L9-L12

pszafer commented 5 months ago

I'll close that. If you're willing to work on that, I'd be happy to reopen.

myxor commented 5 months ago

I have a Buderus MX 300 gateway which seems to work the same way. I see connections to xmpp.k30.ticx.boschtt.net and http.k30.ticx.boschtt.net.

@olyckne Maybe we should work together on this?

olyckne commented 5 months ago

@myxor Sure, both my time and knowledge about this is quite limited though. Do you know a way forward?

rbott commented 5 months ago

I have started to reverse engineer the Bosch HomeCom App to gain some insights, but did not get very far.

I have the code (at least the parts that are "readable") and documentation of all findings in a private repo for now. I currently lack the time to push this forward, but I am happy to provide access to this repo so that others can contribute as well.

olyckne commented 5 months ago

@rbott you can give me access if you want to. I have tried reverse engineer myself and haven't found anything yet.

Maybe we should create a channel in the discord group to collaborate more easily?

I schedule my water to heat at night and way too often recently I wake up and nothing has happened and I need to heat it manually when the electricity costs ten times more. Really tired of not being able to automate and having to use the terrible app.

pszafer commented 5 months ago

@olyckne I created channel for you on discord. You can get in touch in this topic https://discord.com/channels/651488327630979131/1201135886880997398

Blach89 commented 4 months ago

any news ?

UniCizin commented 3 months ago

I am interested in this too and want to Help. Anything i can do?

pszafer commented 2 months ago

Let's reopen it, so there won't be new issues every few days asking for same thing

mardeck commented 1 month ago

Hello everyone, don't beat me, but is there anything new on the topic? I don't get an answer from Bosch...

pszafer commented 1 month ago

nothing new

albanetwork commented 1 month ago

+1 for K30RF Support.

macmannen commented 1 month ago

+1 for K30RF here too!

Could a financial cobtribution help? Something we could set up?

ondfrukt commented 1 month ago
jaronheskamp commented 1 month ago

+1

MCBrakel commented 1 month ago

+1

sth519 commented 1 month ago

+1 from me too

albanetwork commented 1 month ago

+1 for K30RF here too!

Could a financial cobtribution help? Something we could set up?

Ill Support it too.

benni336 commented 2 weeks ago

Hey, I hope you won't beat me for the OT comment. But I somehow thought it is related and I didn't found another suitable space. Instead of focusing on (yet another) non-local gateway. Do anyone of you think there is a chance using the local CAN-Bus to read and write data? There is a project doing that for Viessmann as several people were "pissed" by Viessmann monetarizing the Server API. But as the K30 RF is using a standardized way of communication with the heating system, there is probably a good chance that grabbing the data before the K30RF is more successfull than trying to sniff the SSL encrypted communication between App and Server.

I would appreciate your comments.

olyckne commented 2 weeks ago

I found this one that seems to be working with my system if I understand correctly

https://github.com/emsesp/EMS-ESP32

F1R3F1GHTR commented 1 week ago

+1 for K30RF