Closed petervargait closed 4 years ago
Peter: I have not implemented the AC capability for the following reasons:
About the switch. Does the unit support the switch capability? I think you can find out by looking at it using the ST development environment. In the development environment select My Devices then select the AC. Look at the current states. Does it include a switch? If so, you can configure a switch for that.
Bob
Hi Bob,
thanks so much for the detail answer. I might can help in the development as well if you don't mind. I have AC and other SmartThing devices. At least I can test it.
I checked the the smartthings dev environment and ACs has several capabilities ( see below) Paper UI only find 4 things for AC. If I add manually it doesn't work. I also found out the discovery only brings back two of my devices.
temperature: 23 C humidity: 40 switch: off coolingSetpoint: 26 C n: [room a/c] Samsung icv: core.1.1.0 dmv: res.1.1.0,sh.1.1.0 di: 93297c00-cc66-22ec-ef22-e899c1dc3043 pi: 93297c00-cc66-22ec-ef22-e899c1dc3043 mnmn: Samsung Electronics mnml: http://www.samsung.com mnmo: ARTIK051_KRAC_18K|10193441|60010114001111110100000000000000 mnpv: 0.1.0 mnos: TizenRT2.0 mnhw: 1.0 mnfv: 0.1.0 vid: DA-AC-RAC-000001 volume: 100 data: airConditionerMode: heat supportedAcModes: [cool, dry, wind, auto, heat] drlcStatus: { "drlcLevel": -1, "start": "1970-01-01T00:00:00Z", "override": false, "duration": 0 } powerConsumption: { "start": "2020-04-02T06:20:53Z", "end": "2020-04-02T16:20:57Z", "power": 0 } fanMode: auto supportedAcFanModes: [auto, low, medium, high, turbo] airFlowDirection: fixed dependencyStatus: single disabledCapabilities: [ "airFlowDirection", "dustSensor", "odorSensor", "airQualitySensor", "odorSensor", "veryFineDustSensor", "remoteControlStatus", "custom.airConditionerOdorController", "demandResponseLoadControl", "custom.dustFilter", "custom.deodorFilter", "custom.deviceReportStateConfiguration" ] supportedAcOptionalMode: [off, windFree] acOptionalMode: off acTropicalNightModeLevel: 0 autoCleaningMode: off versionNumber: 19102401 energyType: 1.0 spiMode: off deviceType: OCF isSubDevice: false
Kind Regards Peter
On Wed, Apr 8, 2020 at 7:43 PM Bob Raker notifications@github.com wrote:
Peter: I have not implemented the AC capability for the following reasons:
- This was added to the ST (Smartthings) Capability list after I was done implementing the binding.
- It is still in proposed status
- Most importantly, I don't have an AC unit to test against. Someone asked that I support the Dryer capabilities and I have take that on. It has taken a large number of hours. I don't have a compatible dryer and therefore created a simulator Device Handler. For me that is a slow process. And, I had to make several assumptions as I went along and I have no way to know if it will work with the real Samsung Dryer.
- Samsung has a new development environment. That would require a complete overhaul of what I've done so far. Any work I put into an openHAB binding for Smartthings should be done with the new development environment. I'm still trying to figure out how it works.
About the switch. Does the unit support the switch capability? I think you can find out by looking at it using the ST development environment. In the development environment https://graph.api.smartthings.com/ select My Devices then select the AC. Look at the current states. Does it include a switch? If so, you can configure a switch for that.
Bob
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/BobRak/OpenHAB-Smartthings/issues/88#issuecomment-611096271, or unsubscribe https://github.com/notifications/unsubscribe-auth/AO74KIYIZAT4OAHINUJ3JB3RLSZTRANCNFSM4MDZX6NQ .
Peter:
Which 4 capabilities does the ST binding find? Is it the first 4 in your list? One of those is switch. I assume that isn't showing up in the paperUI. In the Smartthings installation instructions I have provided (click here) repeat the instructions in thee last section titled: "Configuration in the Smartthings Classic App". Repeat section 6 and look at the switches, its the AC in there? This might also be why your other devices are not showing.
Bob
Bob
Thanks a lot, yes I messed up with the Smart App on mobile. I have now set up correctly and all my AC have been found by the binding. It has found 5 capabilities : Air Conditioner Mode, Relative Humidity Management, Switch, Temperature Measurement, Thermostat Cooling Setpoint. Air Conditioner Mode doesn't work. I can't add on Paper UI nor as a Thing in .thing file. It runs on error : Error 406 Conflict. In the log : 14:11:29.853 [WARN ] [ig.discovery.internal.PersistentInbox] - Cannot create thing. No binding found that supports creating a thing of type smartthings:airConditionerMode. I have also found out the I made a mistake with Cooling Setpoint when I choose as a temperature type. It is also working now. There are however few capabilities that would be very good to implement like fanMode [auto, low, medium, high, turbo] , airFlowDirection[vale, fixed], acOptionalMode [off, windFree]
Many Thanks for all your help
Peter
On Wed, Apr 8, 2020 at 10:31 PM Bob Raker notifications@github.com wrote:
Peter:
Which 4 capabilities does the ST binding find? Is it the first 4 in your list? One of those is switch. I assume that isn't showing up in the paperUI. In the Smartthings installation instructions I have provided (click here https://github.com/BobRak/OpenHAB-Smartthings/blob/master/org.openhab.binding.smartthings/SmartthingsInstallation.md) repeat the instructions in thee last section titled: "Configuration in the Smartthings Classic App". Repeat section 6 and look at the switches, its the AC in there? This might also be why your other devices are not showing.
Bob
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/BobRak/OpenHAB-Smartthings/issues/88#issuecomment-611178286, or unsubscribe https://github.com/notifications/unsubscribe-auth/AO74KI6W6PNTZPL36DI2VD3RLTNKJANCNFSM4MDZX6NQ .
Hi Peter:
I've spent the better part of the last 2 days working on the Air Conditioner Mode, Temperature Measurement and Thermostat Cooling Setpoint code. I have enhanced the code to better support these items. In the end I created the simulator. If you are interested in the code I can upload it and you can play with it further. I'll admit it is pretty much a hack job at this point.
To try out the enhancements you will have to download a new jar file and install it. And, you will have to download the OpenHabAppV2.groovy and install it,
If you look in the Smartthing Capabilities document you will find there are no capabilities called: fanMode, airFlowDirection and acOptionalMode. I don;t think it is possible to just add capabilities that don't exist in the ST API.
Please let me know how it goes.
Here are openHAB config samples:
.things
// Air Conditioner test switch SimulatedAcSwitch [ smartthingsName="Simulated Air Conditioner" ] airConditionerMode SimulatedAcMode [ smartthingsName="Simulated Air Conditioner" ] temperatureMeasurement SimulatedAcTemp [ smartthingsName="Simulated Air Conditioner" ] thermostatCoolingSetpoint SimulatedAcSet [ smartthingsName="Simulated Air Conditioner" ] thermostat SimulatedAcTherm [ smartthingsName="Simulated Air Conditioner" ]
.items
Switch SimulatedAcSwitchItem "Simulated Air conditioner Switch" <switch> { channel="smartthings:switch:Home:SimulatedAcSwitch:switch" } String SimulatedAcModeItem "Simulated Air conditioner Mode [%s]" { channel="smartthings:airConditionerMode:Home:SimulatedAcMode:airConditionerMode" } Number SimulatedAcTempItem "Simulated Air conditioner Temperature [%d]" { channel="smartthings:temperatureMeasurement:Home:SimulatedAcTemp:temperature" } Number SimulatedAcSetItem "Simulated Air conditioner Cooling Set [%d]" <slider> { channel="smartthings:thermostatCoolingSetpoint:Home:SimulatedAcSet:coolingSetpoint" } Number SimulatedAcThermItem "Simulated AC Thermostat Cooling Set [%d]" <slider> { channel="smartthings:thermostat:Home:SimulatedAcTherm:coolingSetpoint" }
.sitemap
Frame label="Simulated Air Conditioner" { Switch item=SimulatedAcSwitchItem Switch item=SimulatedAcModeItem Text item=SimulatedAcTempItem Setpoint item=SimulatedAcSetItem minValue=20 maxValue=80 step=5 Setpoint item=SimulatedAcThermItem minValue=20 maxValue=80 step=5 }
Hi Peter: I made a couple of more changes to the code to better support the AC capabilities. When you can, please download the new jar and install it. And, download and install the OpenHabApV2.groovy from contrib\smartthings\SmartApps. Please let me know how it works. Thanks, Bob
Hi Bob,
Thank you so much for being very helpful. I have installed and tested the binding. I have also added the new smartApp. I managed to install and use it as well. It looks like I can receive all capabilities but unfortunately update looks like does not work for airConditionerMode . Discovering capabilities in Paper UI does not work either. I have to add manually things and Items.
Some example from logs: Changing the temperature of "Loung Room AC" to 22 13:00:13.894 [INFO ] [gs.internal.SmartthingsHandlerFactory] - Sent message "{"capabilityKey": "thermostatCoolingSetpoint", "deviceDisplayName": "Loung Room AC", "capabilityAttribute": "coolingSetpoint", "value": 22}" with path "/update" to the Smartthings hub, recieved HTTP status 202 (This is the normal code from Smartthings)
in the event log in groovy IDE
2020-04-14 1:01:32.592 PM CEST 11 minutes ago https://graph-na04-useast2.api.smartthings.com/device/01cca6f9-ca2e-0c34-7589-7a2fcdf7c114/event/4cdea300-7e3f-11ea-8b50-0afb95e6fad8?all=&source=&max=25 APP_COMMAND setCoolingSetpoint OpenHabAppV2 sent setCoolingSetpoint command to L
setpoint does change
Very similar to AirConditionerMode
from OpenHAB log
13:15:11.260 [INFO ] [gs.internal.SmartthingsHandlerFactory] - Sent message "{"capabilityKey": "airConditionerMode", "deviceDisplayName": "Loung Room AC", "capabilityAttribute": "airConditionerMode", "value": "dry"}" with path "/update" to the Smartthings hub, recieved HTTP status 202 (This is the normal code from Smartthings)
it does not appear on device event log at all
but if I change it on the device or the smartthing app on mobile
2020-04-14 1:28:28.983 PM CEST moments ago https://graph-na04-useast2.api.smartthings.com/device/01cca6f9-ca2e-0c34-7589-7a2fcdf7c114/event/10505472-7e43-11ea-9767-0a67517c2fb8?all=true&source=&max=25 DEVICE airConditionerMode dry Loung Room AC air conditioner mode is dry true Hope it helps
Thanks Peter
On Tue, Apr 14, 2020 at 6:18 AM Bob Raker notifications@github.com wrote:
Hi Peter: I made a couple of more changes to the code to better support the AC capabilities. When you can, please download the new jar and install it. And, download and install the OpenHabApV2.groovy from contrib\smartthings\SmartApps. Please let me know how it works. Thanks, Bob
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/BobRak/OpenHAB-Smartthings/issues/88#issuecomment-613217099, or unsubscribe https://github.com/notifications/unsubscribe-auth/AO74KIZ6MHNBGTUGVMKPOX3RMPPYBANCNFSM4MDZX6NQ .
Hi Peter: Re: Discovering "capabilities in Paper UI does not work either"
It works for me. Please look at my comment on April 8. Are you sure you have included them using the Smartthings app on your phone?
re: "unfortunately update looks like does not work for airConditionerMode"
I created a new Repo located here that has sample config files that will allow you to control the mode and coolSetpoint.
Please let me know how it goes. I am planning to submit this to openHAB in the next several days and have it included in the openHAB distribution.
Thanks for testing. Please stay safe in this crazy time.
Bob
Since this is approaching 3 months since any communications I am going to close this. You are welcome to reopen it if you have additional questions or comments.
I could finally manage to connect my smartthing hab to openhab but it doe not discover all my devices ( 2 out of many ) and in case of airconditioner I have got and error message adding a thing ( 11:59:01.685 [WARN ] [ig.discovery.internal.PersistentInbox] - Cannot create thing. No binding found that supports creating a thing of type smartthings:airConditionerMode ) I also could not find how could I swith on/off AC?