setFanMode Samsung AC executed but not working


#1

1) Give a description of the problem
Method setFanMode() available in webcore to control a OCF Samsung AC is being executed but does not run in the device.

2) What is the expected behaviour?
To execute the command in the device

3) What is happening/not happening?
According to the logs on the device, I can see that when I pass an invalid argument it returns that the mode is not valid. When I pass a valid argument, no error on the device, but nothing happens. In this case the valid arguments are “high”,“auto”, “low”, “turbo”,“medium”.

**4) Post a Green Snapshot of the piston
22

5) Attach logs after turning logging level to Full
╔Received event [Apartment].execute = 54.146.176.61 with a delay of 33ms
+33ms ║Runtime (36639 bytes) successfully initialized in 4ms (v0.3.110.20191009) (31ms)
+33ms ║╔Execution stage started
+42ms ║║[param1:execute, param2::“pistonIDRemoved”:, remoteAddr:“AddressRemoved”, service:High]
+42ms ║║Executed virtual command log (1ms)
+315ms ║║Executed [sala ac].setFanMode (262ms)
+317ms ║╚Execution stage complete. (284ms)
+318ms ╚Event processed successfully (318ms)


#2

I believe $args are cAsE seNsiTiVe:

pic

IE: “high” is not “High”


#3

those are the arguments that come from the web service call, and I’m passing it like that. That IF is true, and the command is executed so there’s no problem here. I think the problem is with the method itself: it accepts any of the valid arguments and executes without any error. (if you pass something with capital H “High” it gives an error saying Mode not permitted). After execution the physical device doesn’t change the mode or gives any error.


#4

perhaps I should clarify: do not focus on the IF, the problem is with the method setFanMode() that gets executed and does nothing on the device and no error.


#5

WebCoRE is designed to work with many different devices and companies, so not every available command will work with every device.

To focus on the real issue, we can temporarily take out the $args… We can make a single command piston, and test various commands to understand what commands work with your AC unit. (Just press Test)

pic

This is the quickest way to determine which commands work with your particular device, and which ones do not.


Note:

If you change the Device Handler, everything changes, so this test would have to be run again.


#6

Hi, the command does not do anything on my AC. if I put a different value like (‘xxx’) there’s an error in my AC log (not the piston log) saying that the mode xxx is invalid.

I received a response from SmartThings team saying setFanMode is not supported. I wonder why it gives an error when I put an invalid mode, and not when I put a valid mode. Also it comes in the list of capabilities on my device:

55


#7

so now the question is, is there any method to change fan mode that works in my ac according to the documentation they pointed me to: https://smartthings.developer.samsung.com/docs/api-ref/capabilities.html#Capabilities-Reference

my log when executed:
08:21:14: info ╔ Event processed successfully (1043ms)
08:21:14: trace ║╔ Execution stage complete. (1000ms)
08:21:14: trace ║║ Executed [sala ac].setFanMode (976ms)
08:21:13: trace ║║ Executed virtual command log (1ms)


#8

I wonder… Instead of:
setFanMode
can you try:
setACFanMode
(as seen in your screenshot)


Note:

Some AC units may take 30 seconds (or longer) to actually update after a command is sent.


#9

Well, I’m quite new to webcore and I don’t know if it’s possible to code directly without the framework “intelisense” but these are the commands available:

As you can see, there’s no setACFanMode in the list. By the way, is it possible to “free program” the piston?


#10

From that list, the closest two are either:

  • setFanMode(…)
  • setAirConditionerMode(…)

I would probably play around with these two, (one at a time), trying different commands (keeping case sensitive in mind).

If you cannot get the important commands to work with your device, my next advice would be to seek out another Device Handler that works better with your particular device.


Note:

When I searched this on the SmartThings forum, I found this comment:


#11

setFanMode is the method I’ve been trying that started this thread.
setAirConditionerMode gives an error on the device side saying the capability is not permitted

Regarding the comment you found, well that can explain some of the things, but I am able to change the temperature using setCoolPoint. There are some types of methods (device, custom, emulated…) in fact the ones categorised by ‘device’ are:

31

Perhaps the custom are not working for some reason. On the other way, they kind of work because by passing wrong arguments, they reply with error in the log.

Thanks for the help!