Skip to content
This repository has been archived by the owner on May 17, 2021. It is now read-only.

Samsung AC:Second AC gets Current Temp reading from first AC #2182

Closed
RemcoteWinkel opened this issue Feb 23, 2015 · 21 comments
Closed

Samsung AC:Second AC gets Current Temp reading from first AC #2182

RemcoteWinkel opened this issue Feb 23, 2015 · 21 comments

Comments

@RemcoteWinkel
Copy link

I am experiencing confusion in the Samsung AC binding. Apart from my bedroom being heated to living room temperatures when living is on (bedroom is set on as well), I see a double setting of current temperature i.e. from the logs it seems the first AC is set with a current reading from the second.

[openhab.cfg]

################## SAMSUNG AC Binding

Host and port of the first AC to control

samsungac:Remco.host=192.168.1.181
samsungac:Remco.mac=BC8CCD54FE41
samsungac:Remco.token=2613a007-f322-4093-a05f-49386c403177

samsungac:Esther.host=192.168.1.126

samsungac:Esther.mac=BC8CCD5E5D0F

samsungac:Esther.token=

samsungac:Woon.host=192.168.1.147
samsungac:Woon.mac=BC8CCD7456CF
samsungac:Woon.token=6acb7502-bb0f-429c-912c-72355b5bf052

[x.items]
// AC
Number r_ac_current_temp "Current temp [%.1f]" {samsungac="[Remco|AC_FUN_TEMPNOW]"}
Switch r_ac_power {samsungac="[Remco|AC_FUN_POWER]"}
Number r_ac_mode "Convenience mode" {samsungac="[Remco|AC_FUN_COMODE]"}
Number r_ac_op_mode "Operation mode" {samsungac="[Remco|AC_FUN_OPMODE]"}
Number r_ac_set_temp "Set temp [%.1f]" {samsungac="[Remco|AC_FUN_TEMPSET]"}
Number r_ac_direction "Direction" {samsungac="[Remco|AC_FUN_DIRECTION]"}
Number r_ac_windlevel "Windlevel" {samsungac="[Remco|AC_FUN_WINDLEVEL]"}

/*
Number e_ac_current_temp "Current temp [%.1f]" {samsungac="[Esther|AC_FUN_TEMPNOW]"}
Switch e_ac_power {samsungac="[Esther|AC_FUN_POWER]"}
Number e_ac_mode "Convenience mode" {samsungac="[Esther|AC_FUN_COMODE]"}
Number e_ac_op_mode "Operation mode" {samsungac="[Esther|AC_FUN_OPMODE]"}
Number e_ac_set_temp "Set temp [%.1f]" {samsungac="[Esther|AC_FUN_TEMPSET]"}
Number e_ac_direction "Direction" {samsungac="[Esther|AC_FUN_DIRECTION]"}
Number e_ac_windlevel "Windlevel" {samsungac="[Esther|AC_FUN_WINDLEVEL]"}
*/

Number w_ac_current_temp "Current temp [%.1f]" {samsungac="[Woon|AC_FUN_TEMPNOW]"}
Switch w_ac_power {samsungac="[Woon|AC_FUN_POWER]"}
Number w_ac_mode "Convenience mode" {samsungac="[Woon|AC_FUN_COMODE]"}
Number w_ac_op_mode "Operation mode" {samsungac="[Woon|AC_FUN_OPMODE]"}
Number w_ac_set_temp "Set temp [%.1f]" {samsungac="[Woon|AC_FUN_TEMPSET]"}
Number w_ac_direction "Direction" {samsungac="[Woon|AC_FUN_DIRECTION]"}
Number w_ac_windlevel "Windlevel" {samsungac="[Woon|AC_FUN_WINDLEVEL]"}

[x.sitemap]
Frame label="Air conditioner"{
Text item=w_ac_current_temp icon="temperature" label="Huidig [%.1f °C]"
Setpoint item=w_ac_set_temp minValue=16 maxValue=28 step=1 icon="temperature" label="Set"
Switch item=w_ac_power icon="heating" label="Power"
// Switch item=w_ac_mode label="Mode" icon="sofa" mappings=[0="Off", 1="Quiet", 2="Sleep", 3="Smart", 4="SoftCool", 5="TurboMode", 6="WindMode1", 7="WindMode2", 8="WindMode3"]
Switch item=w_ac_mode label="Mode" icon="sofa" mappings=[0="Off", 1="Quiet", 2="Sleep", 3="Smart", 4="SoftCool", 5="TurboMode"]
Switch item=w_ac_op_mode icon="" mappings=[0="Auto", 1="Cool", 2="Dry", 3="Wind", 4="Heat"]
Switch item=w_ac_direction icon="Richting" mappings=[0="Auto", 1="SwingUD", 2="Rotation", 3="Fixed"]
Switch item=w_ac_windlevel icon="Ventilator" mappings=[0="Auto", 1="Low", 2="Mid", 3="High", 4="Turbo"]
}

Frame label="Air conditioner"{
Text item=r_ac_current_temp icon="temperature" label="Huidig [%.1f °C]"
Setpoint item=r_ac_set_temp minValue=16 maxValue=28 step=1 icon="temperature" label="Set"
Switch item=r_ac_power icon="heating" label="Power"
// Switch item=r_ac_mode label="Mode" icon="sofa" mappings=[0="Off", 1="Quiet", 2="Sleep", 3="Smart", 4="SoftCool", 5="TurboMode", 6="WindMode1", 7="WindMode2", 8="WindMode3"]
Switch item=r_ac_mode label="Mode" icon="sofa" mappings=[0="Off", 1="Quiet", 2="Sleep", 3="Smart", 4="SoftCool", 5="TurboMode"]
Switch item=r_ac_op_mode icon="" mappings=[0="Auto", 1="Cool", 2="Dry", 3="Wind", 4="Heat"]
Switch item=r_ac_direction icon="Richting" mappings=[0="Auto", 1="SwingUD", 2="Rotation", 3="Fixed"]
Switch item=r_ac_windlevel icon="Ventilator" mappings=[0="Auto", 1="Low", 2="Mid", 3="High", 4="Turbo"]
}

[events.log]
015-02-23 22:54:10 - r_ac_current_temp state updated to 19
2015-02-23 22:54:10 - w_ac_mode state updated to 0
2015-02-23 22:54:10 - w_ac_op_mode state updated to 4
2015-02-23 22:54:10 - w_ac_direction state updated to 3
2015-02-23 22:54:10 - w_ac_power state updated to OFF
2015-02-23 22:54:10 - w_ac_windlevel state updated to 0
2015-02-23 22:54:10 - w_ac_set_temp state updated to 20
2015-02-23 22:54:11 - v_d_3 state updated to 49
2015-02-23 22:54:12 - r_ac_current_temp state updated to 22
2015-02-23 22:54:12 - w_ac_mode state updated to 0
2015-02-23 22:54:12 - w_ac_op_mode state updated to 4
2015-02-23 22:54:12 - w_ac_direction state updated to 4
2015-02-23 22:54:12 - w_ac_power state updated to OFF
2015-02-23 22:54:12 - w_ac_windlevel state updated to 0
2015-02-23 22:54:12 - w_ac_set_temp state updated to 20

Mind the double seting of r_ac_current_temp

@teichsta
Copy link
Member

@steintore could you take care of this? Appreciate your support! Best, Thomas E.-E.

@RemcoteWinkel
Copy link
Author

Some debug data (abbreviated item names):
20:37:14.347 INFO o.b.o.s.c.AirConditioner[:149]- Got response:''
20:37:14.369 INFO o.b.o.s.c.ResponseParser[:159]- Response is:
20:37:14.448 DEBUG o.o.b.s.i.SamsungAcBinding[:324]- r_ac_d gets updated to: 3
20:37:14.458 DEBUG o.o.b.s.i.SamsungAcBinding[:324]- r_ac_p gets updated to: OFF
20:37:14.467 DEBUG o.o.b.s.i.SamsungAcBinding[:324]- w_ac_st gets updated to: 20
20:37:14.475 DEBUG o.o.b.s.i.SamsungAcBinding[:324]- r_ac_ct gets updated to: 14
20:37:14.483 DEBUG o.o.b.s.i.SamsungAcBinding[:324]- r_ac_m gets updated to: 0
20:37:14.490 DEBUG o.o.b.s.i.SamsungAcBinding[:324]- w_ac_w gets updated to: 0
20:37:14.498 DEBUG o.o.b.s.i.SamsungAcBinding[:324]- w_ac_om gets updated to: 4
20:37:16.582 INFO o.b.o.s.c.AirConditioner[:149]- Got response:''
20:37:16.602 INFO o.b.o.s.c.ResponseParser[:159]- Response is:
20:37:16.686 DEBUG o.o.b.s.i.SamsungAcBinding[:324]- r_ac_d gets updated to: 4
20:37:16.697 DEBUG o.o.b.s.i.SamsungAcBinding[:324]- r_ac_p gets updated to: OFF
20:37:16.705 DEBUG o.o.b.s.i.SamsungAcBinding[:324]- w_ac_st gets updated to: 20
20:37:16.714 DEBUG o.o.b.s.i.SamsungAcBinding[:324]- r_ac_ct gets updated to: 15
20:37:16.721 DEBUG o.o.b.s.i.SamsungAcBinding[:324]- r_ac_m gets updated to: 0
20:37:16.728 DEBUG o.o.b.s.i.SamsungAcBinding[:324]- w_ac_w gets updated to: 0
20:37:16.736 DEBUG o.o.b.s.i.SamsungAcBinding[:324]- w_ac_om gets updated to: 4

@RemcoteWinkel
Copy link
Author

Extra information, tested on both 1.6.1 as well as 16.2. Debug post is from 1.6.2

Currently running on a Olimex A20 with Debian Weezy, will try from a Ubuntu machine in a minute.

Linux version 3.4.90+ (root@debian) (gcc version 4.7.1 (Debian 4.7.1-7) ) #11 SMP PREEMPT Wed Aug 20 08:20:32 EEST 2014
java version "1.6.0_34"
OpenJDK Runtime Environment (IcedTea6 1.13.6) (6b34-1.13.6-1~deb7u1)
OpenJDK Zero VM (build 23.25-b01, mixed mode)

Support is greatly appreciated, I am happy to test. I have three units inside (connected to a multi split unit outside.) The 'Woon' one is a AR18HSSDBWKNEU the others are AR07HSSDBWKNEU. Bought Samsung partly because of the WiFi option ;-)

@RemcoteWinkel
Copy link
Author

Same results on Ubuntu machine

java version "1.7.0_75"
OpenJDK Runtime Environment (IcedTea 2.5.4) (7u75-2.5.4-1~trusty1)
OpenJDK Client VM (build 24.75-b04, mixed mode, sharing)
Linux version 3.13.0-44-generic (buildd@komainu) (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) ) #73-Ubuntu SMP Tue Dec 16 00:23:46 UTC 2014

21:07:17.178 INFO o.b.o.s.c.AirConditioner[:149] - Got response:''
21:07:17.181 INFO o.b.o.s.c.ResponseParser[:159] - Response is:
21:07:17.192 DEBUG o.o.b.s.i.SamsungAcBinding[:324] - w_ac_w gets updated to: 0
21:07:17.198 INFO runtime.busevents[:26] - w_ac_w state updated to 0
21:07:17.201 DEBUG o.o.b.s.i.SamsungAcBinding[:324] - r_ac_m gets updated to: 0
21:07:17.207 INFO runtime.busevents[:26] - r_ac_m state updated to 0
21:07:17.211 DEBUG o.o.b.s.i.SamsungAcBinding[:324] - w_ac_om gets updated to: 4
21:07:17.215 INFO runtime.busevents[:26] - w_ac_om state updated to 4
21:07:17.223 DEBUG o.o.b.s.i.SamsungAcBinding[:324] - w_ac_st gets updated to: 20
21:07:17.224 INFO runtime.busevents[:26] - w_ac_st state updated to 20
21:07:17.225 DEBUG o.o.b.s.i.SamsungAcBinding[:324] - r_ac_p gets updated to: OFF
21:07:17.258 INFO runtime.busevents[:26] - r_ac_p state updated to OFF
21:07:17.259 DEBUG o.o.b.s.i.SamsungAcBinding[:324] - r_ac_d gets updated to: 3
21:07:17.260 INFO runtime.busevents[:26] - r_ac_d state updated to 3
21:07:17.270 DEBUG o.o.b.s.i.SamsungAcBinding[:324] - r_ac_ct gets updated to: 14
21:07:17.271 INFO runtime.busevents[:26] - r_ac_ct state updated to 14
21:07:19.431 INFO o.b.o.s.c.AirConditioner[:149] - Got response:''
21:07:19.433 INFO o.b.o.s.c.ResponseParser[:159] - Response is:
21:07:19.439 DEBUG o.o.b.s.i.SamsungAcBinding[:324] - w_ac_w gets updated to: 0
21:07:19.440 INFO runtime.busevents[:26] - w_ac_w state updated to 0
21:07:19.441 DEBUG o.o.b.s.i.SamsungAcBinding[:324] - r_ac_m gets updated to: 0
21:07:19.442 INFO runtime.busevents[:26] - r_ac_m state updated to 0
21:07:19.443 DEBUG o.o.b.s.i.SamsungAcBinding[:324] - w_ac_om gets updated to: 4
21:07:19.448 INFO runtime.busevents[:26] - w_ac_om state updated to 4
21:07:19.453 DEBUG o.o.b.s.i.SamsungAcBinding[:324] - w_ac_st gets updated to: 20
21:07:19.456 INFO runtime.busevents[:26] - w_ac_st state updated to 20
21:07:19.459 DEBUG o.o.b.s.i.SamsungAcBinding[:324] - r_ac_p gets updated to: OFF
21:07:19.465 INFO runtime.busevents[:26] - r_ac_p state updated to OFF
21:07:19.469 DEBUG o.o.b.s.i.SamsungAcBinding[:324] - r_ac_d gets updated to: 4
21:07:19.475 INFO runtime.busevents[:26] - r_ac_d state updated to 4
21:07:19.477 DEBUG o.o.b.s.i.SamsungAcBinding[:324] - r_ac_ct gets updated to: 15
21:07:19.485 INFO runtime.busevents[:26] - r_ac_ct state updated to 15

@steintore
Copy link
Contributor

Thanks for all the information, I'll have a look at this.

@steintore
Copy link
Contributor

Hi @RemcoteWinkel .

I think I've solved the problem and have a jar-file you can test. Is there an email or something where I can send it to?

Also I've added the possibility to fetch the error code from the AC, then you can make openHAB act (eg. turn the ac on and off) when there's an error with the AC (as it is quite often with mine)
The item will then be:
String ac_error "Error" {samsungac="[Livingroom|AC_FUN_ERROR]"}

Please let me know if both work or not, then I'll fix the pull request as soon as I can.

@RemcoteWinkel
Copy link
Author

Hi Stein,
Yes, please send to x at xx dot xx
I will post the results in this thread.
Regards,
Remco.

@RemcoteWinkel
Copy link
Author

Hi,

Seems to work fine! I get different readings now:

2015-02-25 22:34:31 - w_ac_m state updated to 0
2015-02-25 22:34:31 - w_ac_d state updated to 3
2015-02-25 22:34:31 - w_ac_st state updated to 20
2015-02-25 22:34:31 - w_ac_w state updated to 0
2015-02-25 22:34:31 - w_ac_om state updated to 4
2015-02-25 22:34:31 - w_ac_ct state updated to 14
2015-02-25 22:34:31 - w_ac_p state updated to OFF
2015-02-25 22:34:33 - r_ac_m state updated to 0
2015-02-25 22:34:33 - r_ac_d state updated to 4
2015-02-25 22:34:33 - r_ac_st state updated to 20
2015-02-25 22:34:33 - r_ac_w state updated to 0
2015-02-25 22:34:33 - r_ac_om state updated to 4
2015-02-25 22:34:33 - r_ac_ct state updated to 15
2015-02-25 22:34:33 - r_ac_p state updated to OFF

(w temp actual is 20.5 and r temp actual is 16.7. The 'w' unit is fitted to and outside wall and near ventilation hole (currently 5.5 out there), the 'r' unit is fitted to an inside wall, probably that explains. When running the temperatures will probably match better).

I did have to make a change in the setpoint item though to make the current set temperature being displayed and settable in the browser correctly:

 Setpoint item=w_ac_st step=1 minValue=16 maxValue=28

instead of

Setpoint item=w_ac_st minValue=16 maxValue=28 step=1 icon="temperature" label="Set"

Don't know the cause of that, but you might want to alter the example in the wiki page. (Or it is my own mistake somewhere).

Thanks for the change. I am out of time now, will test more deeply tomorrow (with AC running) and post some debug information.

Thanks for the support.

Remco.

@RemcoteWinkel
Copy link
Author

Hi

Tested the "Remco" AC under openHAB control. Results:

Reading:
Power = ok
Current temperature = ok
Set temperature = ok
Direction = nok, result is 4, your mapping goes up to 3. See setting results
Operation mode = ok
Mode = Returns 0, nok, might be ok, no remote control intervention yet. Retest after remote control intervention (Quiet mode) result = ok
Operation mode = ok

Setting:
Set power = ok
Set temperature = ok
Set mode = ok
Set operation mode = not tested, but read test after remote control test ok
Set direction = nok:
0 (auto) results in horizontal swing only
1 (swingUD) results in vertical swing only
2 (rotation) results in horizontal and vertical swing
3 (fixed) results in fixed position
4 (after remote intervention) is horizontal swing only but not provided for
set ventilator = ok

The direction needs some more investigation When I set the AC to auto operation , the room needed cooling after heating up and both directions began to swing, but the setting went to 4 again. When heating after a single power on as well. Perhaps the 4 signals last?

Will investgate further tomorrow. I sent the debug logs to your email for furhter investigation if you like. Testing started at 23:15.

@RemcoteWinkel
Copy link
Author

Will also investigate the error code tomorrow. Luckily the AC holds up fine untill now. (Installed last november).

@steintore
Copy link
Contributor

Hi,

The DIRECTION property has 5 values (0-4).
0 Auto
1 SwingUD
2 Rotation
3 Fixed
4 SwingLR - or horizontal swing as you mention.

It might be that your Air Conditioner return another code for horizontal swing than mine?

Could you try to increase the log-level of the samsungac-binding to debug, it might give you some more information about what is happening.

@RemcoteWinkel
Copy link
Author

Thanks,

Excuse me for my ignorance, I now understand UD (up-down) ;-). As a novice I only know how to increase logging by starting with the start_debug command, is that what you mean? Or is there another method?

About our AC types. I actually have two different types of unit (smaller ones in the bedrooms), I will also test on the other type. I have been testing with a small one (Samsung AR07HSSDBWKNEU).

The error items returns NULL in logging and empty in the UI. Lucky me. To really test I should create an error situation. (I was told by the mechanics I would get an error when trying to heat one room and cool another. Will give that a try sometime.)

@RemcoteWinkel
Copy link
Author

I noticed something. The wiki page has this example:

Switch item=ac_direction icon="wind" mappings=[0="Auto", 1="SwingUD", 2="Rotation", 3="Fixed"]

Shouldn't that not be (from what I now learned from your post):

Switch item=ac_direction icon="wind" mappings=[0="Auto", 1="SwingUD", 2="Rotation", 3="Fixed", 4="SwingLR"]

@RemcoteWinkel
Copy link
Author

Hi.

Just performed a test with the 5 swing types and a adjusted item definition as described in my previous post. Works as expected. I didn't know what type of behaviour to expect from auto so that I didn't test, the other values went fine!

I have a request too. Perhaps I should open another ticket.

My AC also has a "virus doctor" (aka S-Plasma ion) and a " autoclean" option. I think they are in:

Attr ID="AC_ADD_SPI" Type="RW" Value="Off"
Attr ID="AC_ADD_AUTOCLEAN" Type="RW" Value="Off"

Could that be added?

@steintore
Copy link
Contributor

I've updated the wiki page with your findings, thanks.
I'll update the new features in the wiki page, after your testing and when the pull request is accepted.

@RemcoteWinkel
Copy link
Author

Thanks, will test. I took the liberty to adjust the Wiki as well:

changed
AC_FUN_DIRECTION:
Auto(0), SwingUD(1), Rotation(2), Fixed(3)

to

AC_FUN_DIRECTION:
Auto(0), SwingUD(1), Rotation(2), Fixed(3), SwingLR(4)

@RemcoteWinkel
Copy link
Author

Good news! All test were successful. I ran a regression test an everything tested OK.

Additional features:
Virus Doctor (SPI) = ok
Auto Clean = ok
Error code = ok

For the error I didn't want to break something but I let one unit heat and the other cool. This led tot error E1/61 alternating on the display. OpenHAB correctly showed E161.

Nice job! One final request would be to be able to set polling interval in openhab.cfg

@steintore
Copy link
Contributor

The pull request is here:
#2217

@RemcoteWinkel
Copy link
Author

Thanks again Stein Torre,

I now have three AC's in openHAB. Based on my experience in including the last one to openHAB I added a more detailed description in the Wiki. Hope you don't mind.

Remco.

@steintore
Copy link
Contributor

Great that you've updated the wiki.

Thanks again!

teichsta added a commit that referenced this issue Mar 3, 2015
Samsung Air Conditioner fix for #2182.
@teichsta
Copy link
Member

teichsta commented Mar 3, 2015

merged #2217 into master

@teichsta teichsta closed this as completed Mar 3, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants