Samsung Smart Air Conditioner - OpenHAB 2.0

@alexxio, I have done some checking for NULL values, could you download the latest version, and give it a try?
The link is not changed.

thank you! seems ok now!

1 Like

I spoke too early :frowning: the problem still persists.
Do you need any information from me to try to fix it?

Thx for the update.
I do struggle with my IDE, I’m going to have a look into the problem as soon as my IDE is working again.

Hi Jan and all
I am trying the samsungdigitalinverter snapshot 3.0 but I cannot figure how to get the keystore pkcs12. Is there any tutorial or file to downlod somewere?
Does the digital inverter binding works with old 2878 devices too?

Thanks

I’m not familiar with the 2878 device.
Instructions for creating the keystore can be found here.

Hi Jan,

Thanks for your binding! I successfully installed and configured it on my 2.5 release build system. The binding generally working fine. Please let me feedback some observation that might help your development:

1, The Temperature and Inverter Temperature values does not seem to be updating. The Temperature returned by the binding is not the same as the front panel displays for the measured temperature.

2, There is an error message turning up time to time:

2020-01-06 22:30:29.695 [ERROR] [andler.SamsungDigitalInverterHandler] - Exception occurred during execution: Division undefined
java.lang.ArithmeticException: Division undefined
        at java.math.BigDecimal.divide(BigDecimal.java:1667) ~[?:1.8.0_222]
        at org.openhab.binding.samsungdigitalinverter.handler.SamsungDigitalInverterHandler.lambda$0(SamsungDigitalInverterHandler.java:189) ~[?:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_222]
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:1.8.0_222]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_222]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:1.8.0_222]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_222]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_222]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_222]

These are just cosmetic issues. The controls are working just fine.

Thanks again!

Thanks again Jan, I missed that part, now keystore is ok but I have a simple error message Invalid Http response and I cannot figure out what is missing here. Something related to powerusage maybe?

01:28:31.303 [ERROR] [handler.SamsungDigitalInverterHandler] - Invalid Http response
01:28:31.308 [ERROR] [handler.SamsungDigitalInverterHandler] - Exception occurred during execution: null
java.lang.NullPointerException: null
        at java.io.FileOutputStream.write(FileOutputStream.java:313) ~[?:1.8.0_152]
        at org.openhab.binding.samsungdigitalinverter.handler.SamsungDigitalInverterHandler.getPowerUsage(SamsungDigitalInverterHandler.java:220) ~[?:?]
        at org.openhab.binding.samsungdigitalinverter.handler.SamsungDigitalInverterHandler.lambda$0(SamsungDigitalInverterHandler.java:179) ~[?:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_152]
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:1.8.0_152]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_152]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:1.8.0_152]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_152]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_152]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_152]

I am able to connect using test python script, but trying openssl i get this message, don’t know if is relevant: SSL_CTX_use_certificate:ca md too weak

Is there something I can try?

Thanks again
D.

You can try accessing your AC with curl?
You need to replace the content between the brackets, including the brackets.
Please paste output here.

curl -k -H "Content-Type: application/json" -H "Authorization: Bearer <Replace with you key>" --cert /etc/openhab2/services/cert.pem --insecure -X GET https://<ip of samsung digital inverter>:8888/devices

Sorry to bother you…

curl: (58) could not load PEM client certificate, OpenSSL error error:140AB18E:SSL routines:SSL_CTX_use_certificate:ca md too weak, (no key found, wrong pass phrase, or wrong file format?)

Googling for this message point me in asking for a stronger certificate :-/

I have one of the older devices that listens on 2878 too, it doesn’t seem to work with this binding.

The correct certificate is here, further up in the thread.

Has anyone managed to get this working for the older Port 2878 devices recently?

I can successfully communicate via OpenSSL directly to the devices, but can’t get the binding to work - simply receive the following errors when sending any command:

==> /var/log/openhab2/openhab.log <==

2020-02-16 18:50:51.497 [INFO ] [.samsungac.internal.SamsungAcBinding] - No refresh interval configured, using default: 60000 ms

2020-02-16 18:51:59.089 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'samsungac.items'

==> /var/log/openhab2/events.log <==

2020-02-16 18:52:05.366 [ome.event.ItemCommandEvent] - Item 'ac_power' received command ON

==> /var/log/openhab2/openhab.log <==

2020-02-16 18:52:05.526 [WARN ] [.samsungac.internal.SamsungAcBinding] - Could not send value: 'On' to property:'AC_FUN_POWER', try 1/5

2020-02-16 18:52:05.646 [WARN ] [.samsungac.internal.SamsungAcBinding] - Could not send value: 'On' to property:'AC_FUN_POWER', try 2/5

2020-02-16 18:52:05.742 [WARN ] [.samsungac.internal.SamsungAcBinding] - Could not send value: 'On' to property:'AC_FUN_POWER', try 3/5

2020-02-16 18:52:05.841 [WARN ] [.samsungac.internal.SamsungAcBinding] - Could not send value: 'On' to property:'AC_FUN_POWER', try 4/5

I deleted my ac thing (it was formely added via samsungac.cfg in the service directory) and now if I add it via paperUI (I think the cfg fle gets ignored) I get this error:

Status: OFFLINE - CONFIGURATION_ERROR Server returned HTTP response code: 400 for URL: https://192.168.10.3:8888//devices

Also when adding the thing I get in the log:

Server returned HTTP response code: 400 for URL: https://192.168.10.3:8888//files/usage.db

I have a working sh script using pem certificate…so the AC is working

I generated the pkcs12 as per documentation (adding the -nokeys option becauser there is no key file)

Latest openhab 2.5.2 with latest 3.0.0 snapshot of the binding

Any clue?

The URLs reported in the logs contain a double slash after the port…could it be the problem?

The // has been replaced with / in latest release, available here: https://www.dropbox.com/s/6awh757auaus5xt/org.openhab.binding.samsungdigitalinverter-2.5.1-SNAPSHOT.jar?dl=0

But the AC handles // just fine, no change in response.

Note that the new version is created using the 2.5.1 snapshot. My runtime is 2.5.2, and the AC woks fine. The power usage has been modified. Total power consumption is the only one in the new version.

1 Like

Thank you!
The new version seems to work!

Hi @jag, many thanks for your contribution to the community. I’ve not used it yet but plan to in the future.

Got 2 questions for you:

  • Will this binding be available in the openhab binding website/be installable within PaperUI?
  • Is there somewhere we can send you a donation for your hard work?

Hi @Nickmman. I have plans to include the binding in bistro, but have not done it yet. The Source code is available, via link in this thread. Thanks for the offer for donations, but I’ve made the binding as a part of my hobby, and as an exercise.
No donations accepted😉

1 Like

Hi All,

Anyone managed to get this working for Port 2878 devices?

Hello @bt91, do you have som sample outputs from your AC?
The binding has only been used with Samsung Digital Inverter, and works with the json response fro said device. If you could paste in some response text I could have a look.