Samsung Smart Air Conditioner - OpenHAB 2.0

Hi @jag!
I’ve got Samsung Windfree ACs installed yesterday as well, so I am now highly interested in seeing official support in openHAB3 for that. :slight_smile:
Would it make sense that your create a PR against openhab-addons for your binding? We could then collaborate on that PR and I could help getting the token retrieval as part of the binding as well as this currently seems to be a step that many people struggle with. Wdyt?

2 Likes

In moments like these, I wish I had the coding expertise to help you guys develop the official binding. Unfortunately, I don’t :frowning:
But for what it’s worth, I can offer my help with any beta testing needed :pray:

1 Like

Same here guys, happy to test any beta version on my test OH VM. Got a windfree AC readily available.

Hi @Kai
It would be a honor to have my binding as an official binding with OH.
I strongly agree about the token part. It takes som technical knowledge that not everybody has. I really ned some help with the PR.

2 Likes

@jag Small question,
Could it be that the process to getting the token fails, because we have our Windfree AC’s also connected to the Samsung SmartThings app?

I just realized that when I configured the OpenHAB Broadlink binding, we had to make sure not to connect our Broadlink RM devices to the phone app.

Hi @jag,

I have created an initial PR against the openHAB repo at Initial contribution of SamsungAC binding by kaikreuzer · Pull Request #10938 · openhab/openhab-addons · GitHub.
I did some clean-up of the code base and adjusted it to the required format. I also took the liberty to rename it to “samsungac” as this is what we had for openHAB 1.x (although those were older models, I know) - but digital inverters are also in refridgerators and tumble tryers from Samsung and I doubt that we’ll support those device types in the binding as well.

The PR isn’t yet working - still want to find a solution for the token retrieval and need to refactor the power consumption (as I’ve removed the dependency to sqlite, I don’t see the need for a database for this as it makes the binding much more complex - I’d hope that an in-memory cache should suffice).

Feel free (anyone) to do PRs against my PR with improvements, fixes, etc. I’m happy for any collaboration to get this binding in a mergeable state!

2 Likes

Thanks Kai and everyone for pushing this ahead!
In the meantime, have a look here as @Mario084 found another way of integrating the windfree ACs, not necessary completely self-hosted though as it is based on the SmartThings API, but maybe it helps?

Hi @Kai
Thank you so much for creating the PR.
I’ve not had the time to dive into your updates, yet.

Power consumption in the AC, are downloaded as a base64 encoded sqlite database.
Latest update int the database is extracted using the sqlite Java library. This dowload seemed to be kind of resource consuming in the AC, this download was done at a separate (lower) interval, not to overload the interanls in the AC.
Is there another way of reading the power consumption?

I will happily contribute to the binding.

Ah, thanks for the explanation, I didn’t yet fully understand how that was working. Ok, then I guess I have to re-add this dependency again as we won’t be able to parse the data otherwise.

Thanks for the link. Yeah, I definitely prefer the local integration and that’s what I’ll focus on. Using the SmartThings Web API might be a fallback, but this could possibly better be added to the SmartThings binding as a feature then.

Hello @Kai
I cloned your PR, samsungac. I found the binding to be functional (tested power on/off).
Have you updated the PR to make it work?

Great, I haven’t tried it myself yet, glad to hear that it is already (or rather still :wink: ) working.
No I didn’t find the time yet to further look into it, next step is still to re-add the consumption code.
Hope to find some time on the weekend.

Hm, some bad news @jag: I seem to have the same issue as @Mario084 - my AC is not listening on port 8888, but only on some random other port, which does not accept the token request.
Reading on the other thread, I fear that this is the case with all newer Samsung ACs and that there isn’t the possibility for a local connection, which is pretty frustrating. :frowning:
I’m hence not sure whether it really makes sense to further pursue this approach (at least for me) - it seems that this is only relevant for a few models - older ones that used XML are not supported and newer ones do not work either… I guess I have to look into the SmartThings Cloud API after all…

Hello Kai,

well I did go through the same process like you are doing now.
I think Samsung is focusing on SmartThings cloud and won´t support any local integration in the near future anymore.

But finally the integration of the AC´s using openhab is working as expected - even if we need to use the API from them.

Cheers

1 Like

I did some research last year, with windfree (2019+) samsung models. Unfortunately as you’re writing above, my conclusion (not 100%, but 90%) was they do NOT work anymore (local way, @jag binding). Currently (windfree models) initial provisioning via mobile app binds unit to your cloud smarthings account, and causes unit to push updates every dozen of seconds to the cloud (smartthings). Also steering unit (meaning on/off, temperature mode etc) is done by sending command to the cloud, where the unit few seconds later retrieves it (again, only because unit sends refresh reqs every few second to the cloud).

This is highly suboptimal, network hungry and not secure :slight_smile: I abandoned it.

However, there might be still a chance of playing cat&mouse game during provisioning and tricking unit into pushing updates to openhab, pretending we’re the cloud. There was wireless firmware initiative by some other guy in that direction, requiring some reveng/pentesting unit. I do have skills, yet no time to finish it. Maybe in few months.

Well, it is not “as expected” by me - I expected to be able to locally integrate and not share all my data continuously and for the lifetime of the AC with Samsung. If I’d known this before, I would have actually chosen another vendor for sure.
I very much agree with @rdslw here: “This is highly suboptimal, network hungry and not secure”.

there might be still a chance of playing cat&mouse […] pretending we’re the cloud

That would be awesome, but it sounds indeed very challenging to get it done. If you have the skills, that’s great - there’s no time rush, if this is something you look into in long winter nights, it’d still be appreciated. :wink:

Meanwhile I’d look into supporting the AC through the cloud API.

I totally agree with you, and stories like this one Samsung Washing Machine App Requires Access To Your Contacts and Location is why I don’t like storing personal info in commercial clouds. But I think it will be tricky to access the generation of devices from Samsung, without going through the cloud.

Does anyone have any updates on integrating Samsung A/Cs with OH?

I suppose I could follow in the footsteps of @Mario084 described in this thread:

… but support in a proper OH3 binding, either the existing SmartThings binding, but without the need for a gateway, or a separate binding for SmartThings cloud, would be much preferred.

I haven’t heard any updates here and I’d like to start a “SmartThings Cloud” binding - I just haven’t found the time for it yet. If anybody is willing and has the skills to collaborate on it, it would be highly appreciated!

I would be happy to collaborate, but I too have very limited time to spare on this.

I am embedded software developer, so implementing protocols comes naturally to me, although my primary language is C (I am well versed in Perl, Python and shell scripting as well). It has been many years since I coded Java, and I am not very confident about my abilities regarding OO design, so the overall structure of the code would better be contributed by someone else :slight_smile:

But I suppose I could try and set up a development environment, as a first step.