BobRak / OpenHAB-Smartthings

53 stars 54 forks source link

Samsung Washer+Dryer #89

Closed MrRusch closed 4 years ago

MrRusch commented 4 years ago

I have a combined washer and dryer from Samsung that I added to my Smartthings account some time back using the Android app. Now I've bought a Smartthings hub and installed your binding. When adding OpenHabAppV2 as SmartApp in Smarthings app, I can see my device under the "Switch" capability, but the "Dryer Operating State" remains disabled. Adding it in openhab as Smartthings Switch seems to fetch the state from the device, and when I hit the switch the machine actually plays a "ding" sound, but it doesn't actually turn off.

My device is listed as a 'washer' in the Smartthings app, so I assume the binding would need to be extended to also manage washerMode and washerOperatingMode capabilities? Would this mean some copy-pasting as dryer-equivalent capabilities are already implemented, or would this be a more complex addition that I could support you in somehow?

BobRak commented 4 years ago

I'll have a look and see how hard this would be. The biggest problem with supporting these appliances is that I don't have a good way to test. In that past I have created simulators to test but that is very time consuming.

In your first paragraph, you say: "but the "Dryer Operating State" remains disabled". Does the dryer show up in the Smartthings App? and does it show up in the Smartthings developers IDE (https://graph.api.smartthings.com/). In the IDE what are the states that are listed?

Give me a few days and I'll get back to you.

MrRusch commented 4 years ago

In your first paragraph, you say: "but the "Dryer Operating State" remains disabled". Does the dryer show up in the Smartthings App? and does it show up in the Smartthings developers IDE (https://graph.api.smartthings.com/). In the IDE what are the states that are listed?

When performing step 6 (1st point) under "Configuration in the Smartthings Classic App" of Installation of Smartthings code , I can only select the washer+dryer via the Switch capability - all other Inputs say "You can't currently add this".

The washer+dryer shows up in the Smartthings App - this is where I installed in from. And it is also visible in the IDE, listed as a Cloud device (Execution Location) of the type "Samsung OCF Washer". It does not show as connected to my Smartthings Hub as the washer+dryer was included in my Smartthings account before I purchased the hub, and the IDE won't allow me to change that. I find it interesting also, that if I add a device through the IDE, there's a Type option called "Samsung OCF Washer Dryer" - which I feel it should be listed as. So I might -re-include the washer+dryer now that I have the hub, and see if this changes anything.

Anyhow, the device lists the following Current States in IDE: switch: off n: [washer] Samsung icv: core.1.1.0 dmv: res.1.1.0,sh.1.1.0 di: f8721c32-31c2-9b9e-1d51-a183e3033eaf pi: f8721c32-31c2-9b9e-1d51-a183e3033eaf mnmn: Samsung Electronics mnml: http://www.samsung.com mnmo: ARTIK051_WM_COM_18K|FFFFFFFF mnpv: 0.1.0 mnos: TizenRT2.0 mnhw: 1.0 mnfv: 0.1.0 vid: DA-WM-WM-000001 data: { "payload": { "if": [ "oic.if.baseline", "oic.if.a" ], "rt": [ "x.com.samsung.da.operation" ], "x.com.samsung.da.delayEndTime": "00:00:00", "x.com.samsung.da.progress": "None", "x.com.samsung.da.progressPercentage": "1", "x.com.samsung.da.remainingTime": "01:04:00", "x.com.samsung.da.state": "Ready", "x.com.samsung.da.supportedProgress": [ "None", "Weightsensing", "Wash", "Rinse", "Spin", "Finish" ] } } remoteControlEnabled: false washerMode: Table_00_Course_D0 machineState: stop washerJobState: none completionTime: 2020-05-25T22:25:04.074Z powerConsumption: { "energy": 110000, "deltaEnergy": 0, "power": 0 } disabledCapabilities: [ "custom.washerAutoDetergent", "custom.washerAutoSoftener", "custom.washerSoilLevel", "custom.washerAddwashAlarm" ] versionNumber: 19102401 supportedWasherRinseCycles: [ 0, 1, 2, 3, 4, 5 ] washerRinseCycles: 2 washerSpinLevel: 1400 supportedWasherSpinLevel: [rinseHold, noSpin, 400, 800, 1200, 1400, 1600] supportedWasherWaterTemperature: [none, cold, 20, 30, 40, 60, 90] washerWaterTemperature: 40 supportedCourses: [ "D0", "DC", "E3", "DA", "50", "51", "CA", "E7", "C7", "D8", "D4", "D7", "D3", "D2" ] timeString: 01:04:00 Remaining

BobRak commented 4 years ago

Hi: The states list you sent me doesn't include any of the dryer related states so it makes sense you can not select them. I have no idea why they are not included. But, I do see the following washer modes that are included in the ST classic capabilities: washerMode, machineState, and washerJobState. It would not be too much work for me to add them the binding. If I did that would you test and let me know what happens? I could make a new build in a couple of days. Bob

MrRusch commented 4 years ago

The states list you sent me doesn't include any of the dryer related states so it makes sense you can not select them. I have no idea why they are not included.

I have contacted SmartThings support to understand why my device does not show the dryer-related capabilities in Developers tools, and why it is listed as Samsung OCF Washer and not Samsung OCF Washer Dryer type.

It would not be too much work for me to add them the binding. If I did that would you test and let me know what happens? I could make a new build in a couple of days.

Of course, I'd be happy to test.

BobRak commented 4 years ago

Hi: I added support for the Washer Operating State capability that has attributes machineState and washerJobState. And, capability Washer Mode with the attribute washerMode.

You will have to deploy a new jar file AND install the updated OpenHabAppV2.groovy file on the ST hub.

Please let me know how it goes.

MrRusch commented 4 years ago

Hi: I added support for the Washer Operating State capability that has attributes machineState and washerJobState. And, capability Washer Mode with the attribute washerMode.

You will have to deploy a new jar file AND install the updated OpenHabAppV2.groovy file on the ST hub.

Please let me know how it goes.

Awesome, thanks!

OK I replaced OpenHabAppV2.groovy with the new content in Developer tools, and re-added it in the ST app. I also removed the old snapshot JAR, added the updated one, and restarted openhab service.

When starting openhab, I get the following in logs: 2020-06-04 21:25:02.904 [INFO ] [rtthings.internal.SmartthingsServlet] - Started Smartthings servlet at /smartthings 2020-06-04 21:25:02.939 [ERROR] [org.openhab.binding.smartthings ] - bundle org.openhab.binding.smartthings:2.5.0.202004200354 (241)[org.openhab.binding.smartthings.internal.discovery.SmartthingsDiscoveryService(241)] : The setThingHandlerFactory method has thrown an exception java.lang.ClassCastException: org.openhab.binding.ipcamera.internal.IpCameraHandlerFactory cannot be cast to org.openhab.binding.smartthings.internal.SmartthingsHandlerFactory at org.openhab.binding.smartthings.internal.discovery.SmartthingsDiscoveryService.setThingHandlerFactory(SmartthingsDiscoveryService.java:91) ~[?:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_222] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_222] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_222] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_222] at org.apache.felix.scr.impl.inject.methods.BaseMethod.invokeMethod(BaseMethod.java:228) ~[bundleFile:?] at org.apache.felix.scr.impl.inject.methods.BaseMethod.access$500(BaseMethod.java:41) ~[bundleFile:?] at org.apache.felix.scr.impl.inject.methods.BaseMethod$Resolved.invoke(BaseMethod.java:664) ~[bundleFile:?] at org.apache.felix.scr.impl.inject.methods.BaseMethod.invoke(BaseMethod.java:510) [bundleFile:?] at org.apache.felix.scr.impl.inject.methods.BindMethod.invoke(BindMethod.java:42) [bundleFile:?] at org.apache.felix.scr.impl.manager.DependencyManager.doInvokeBindMethod(DependencyManager.java:1813) [bundleFile:?] at org.apache.felix.scr.impl.manager.DependencyManager.bindDependency(DependencyManager.java:1637) [bundleFile:?] at org.apache.felix.scr.impl.manager.DependencyManager.bind(DependencyManager.java:1624) [bundleFile:?] at org.apache.felix.scr.impl.manager.SingleComponentManager.createImplementationObject(SingleComponentManager.java:307) [bundleFile:?] at org.apache.felix.scr.impl.manager.SingleComponentManager.createComponent(SingleComponentManager.java:114) [bundleFile:?] at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:982) [bundleFile:?] at org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:955) [bundleFile:?] at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:900) [bundleFile:?] at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse$1.run(ServiceFactoryUse.java:212) [org.eclipse.osgi-3.12.100.jar:?] at java.security.AccessController.doPrivileged(Native Method) [?:1.8.0_222] at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse.factoryGetService(ServiceFactoryUse.java:210) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse.getService(ServiceFactoryUse.java:111) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.internal.serviceregistry.ServiceConsumer$2.getService(ServiceConsumer.java:45) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:508) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.getService(ServiceRegistry.java:461) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.internal.framework.BundleContextImpl.getService(BundleContextImpl.java:624) [org.eclipse.osgi-3.12.100.jar:?] at com.eclipsesource.jaxrs.publisher.internal.ResourceTracker.addingService(ResourceTracker.java:39) [bundleFile:?] at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:941) [osgi.core-6.0.0.jar:?] at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:870) [osgi.core-6.0.0.jar:?] at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256) [osgi.core-6.0.0.jar:?] at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229) [osgi.core-6.0.0.jar:?] at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:901) [osgi.core-6.0.0.jar:?] at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:920) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:862) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:801) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:127) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:225) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:469) [org.eclipse.osgi-3.12.100.jar:?] at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:906) [bundleFile:?] at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:892) [bundleFile:?] at org.apache.felix.scr.impl.manager.RegistrationManager.changeRegistration(RegistrationManager.java:128) [bundleFile:?] at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerService(AbstractComponentManager.java:959) [bundleFile:?] at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:732) [bundleFile:?] at org.apache.felix.scr.impl.manager.AbstractComponentManager.enableInternal(AbstractComponentManager.java:666) [bundleFile:?] at org.apache.felix.scr.impl.manager.AbstractComponentManager.enable(AbstractComponentManager.java:432) [bundleFile:?] at org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.enableComponents(ConfigurableComponentHolder.java:665) [bundleFile:?] at org.apache.felix.scr.impl.BundleComponentActivator.initialEnable(BundleComponentActivator.java:338) [bundleFile:?] at org.apache.felix.scr.impl.Activator.loadComponents(Activator.java:382) [bundleFile:?] at org.apache.felix.scr.impl.Activator.access$200(Activator.java:49) [bundleFile:?] at org.apache.felix.scr.impl.Activator$ScrExtension.start(Activator.java:264) [bundleFile:?] at org.apache.felix.scr.impl.AbstractExtender.createExtension(AbstractExtender.java:196) [bundleFile:?] at org.apache.felix.scr.impl.AbstractExtender.modifiedBundle(AbstractExtender.java:169) [bundleFile:?] at org.apache.felix.scr.impl.AbstractExtender.modifiedBundle(AbstractExtender.java:49) [bundleFile:?] at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:482) [osgi.core-6.0.0.jar:?] at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:415) [osgi.core-6.0.0.jar:?] at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:232) [osgi.core-6.0.0.jar:?] at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:444) [osgi.core-6.0.0.jar:?] at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:908) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:213) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:120) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:112) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:168) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.container.Module.publishEvent(Module.java:476) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.container.Module.start(Module.java:467) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1634) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1614) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1585) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1528) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340) [org.eclipse.osgi-3.12.100.jar:?] 2020-06-04 21:25:05.739 [WARN ] [rtthings.internal.SmartthingsServlet] - Could not start Smartthings servlet service: alias: '/smartthings' is already in use in this or another context 2020-06-04 21:25:05.751 [ERROR] [org.openhab.binding.smartthings ] - bundle org.openhab.binding.smartthings:2.5.5.202006040007 (242)[org.openhab.binding.smartthings.internal.discovery.SmartthingsDiscoveryService(244)] : The setThingHandlerFactory method has thrown an exception java.lang.ClassCastException: org.openhab.binding.ipcamera.internal.IpCameraHandlerFactory cannot be cast to org.openhab.binding.smartthings.internal.SmartthingsHandlerFactory at org.openhab.binding.smartthings.internal.discovery.SmartthingsDiscoveryService.setThingHandlerFactory(SmartthingsDiscoveryService.java:91) ~[?:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_222] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_222] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_222] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_222] at org.apache.felix.scr.impl.inject.methods.BaseMethod.invokeMethod(BaseMethod.java:228) ~[bundleFile:?] at org.apache.felix.scr.impl.inject.methods.BaseMethod.access$500(BaseMethod.java:41) ~[bundleFile:?] at org.apache.felix.scr.impl.inject.methods.BaseMethod$Resolved.invoke(BaseMethod.java:664) ~[bundleFile:?] at org.apache.felix.scr.impl.inject.methods.BaseMethod.invoke(BaseMethod.java:510) [bundleFile:?] at org.apache.felix.scr.impl.inject.methods.BindMethod.invoke(BindMethod.java:42) [bundleFile:?] at org.apache.felix.scr.impl.manager.DependencyManager.doInvokeBindMethod(DependencyManager.java:1813) [bundleFile:?] at org.apache.felix.scr.impl.manager.DependencyManager.bindDependency(DependencyManager.java:1637) [bundleFile:?] at org.apache.felix.scr.impl.manager.DependencyManager.bind(DependencyManager.java:1624) [bundleFile:?] at org.apache.felix.scr.impl.manager.SingleComponentManager.createImplementationObject(SingleComponentManager.java:307) [bundleFile:?] at org.apache.felix.scr.impl.manager.SingleComponentManager.createComponent(SingleComponentManager.java:114) [bundleFile:?] at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:982) [bundleFile:?] at org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:955) [bundleFile:?] at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:900) [bundleFile:?] at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse$1.run(ServiceFactoryUse.java:212) [org.eclipse.osgi-3.12.100.jar:?] at java.security.AccessController.doPrivileged(Native Method) [?:1.8.0_222] at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse.factoryGetService(ServiceFactoryUse.java:210) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse.getService(ServiceFactoryUse.java:111) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.internal.serviceregistry.ServiceConsumer$2.getService(ServiceConsumer.java:45) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:508) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.getService(ServiceRegistry.java:461) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.internal.framework.BundleContextImpl.getService(BundleContextImpl.java:624) [org.eclipse.osgi-3.12.100.jar:?] at com.eclipsesource.jaxrs.publisher.internal.ResourceTracker.addingService(ResourceTracker.java:39) [bundleFile:?] at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:941) [osgi.core-6.0.0.jar:?] at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:870) [osgi.core-6.0.0.jar:?] at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256) [osgi.core-6.0.0.jar:?] at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229) [osgi.core-6.0.0.jar:?] at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:901) [osgi.core-6.0.0.jar:?] at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:920) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:862) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:801) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:127) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:225) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:469) [org.eclipse.osgi-3.12.100.jar:?] at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:906) [bundleFile:?] at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:892) [bundleFile:?] at org.apache.felix.scr.impl.manager.RegistrationManager.changeRegistration(RegistrationManager.java:128) [bundleFile:?] at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerService(AbstractComponentManager.java:959) [bundleFile:?] at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:732) [bundleFile:?] at org.apache.felix.scr.impl.manager.AbstractComponentManager.enableInternal(AbstractComponentManager.java:666) [bundleFile:?] at org.apache.felix.scr.impl.manager.AbstractComponentManager.enable(AbstractComponentManager.java:432) [bundleFile:?] at org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.enableComponents(ConfigurableComponentHolder.java:665) [bundleFile:?] at org.apache.felix.scr.impl.BundleComponentActivator.initialEnable(BundleComponentActivator.java:338) [bundleFile:?] at org.apache.felix.scr.impl.Activator.loadComponents(Activator.java:382) [bundleFile:?] at org.apache.felix.scr.impl.Activator.access$200(Activator.java:49) [bundleFile:?] at org.apache.felix.scr.impl.Activator$ScrExtension.start(Activator.java:264) [bundleFile:?] at org.apache.felix.scr.impl.AbstractExtender.createExtension(AbstractExtender.java:196) [bundleFile:?] at org.apache.felix.scr.impl.AbstractExtender.modifiedBundle(AbstractExtender.java:169) [bundleFile:?] at org.apache.felix.scr.impl.AbstractExtender.modifiedBundle(AbstractExtender.java:49) [bundleFile:?] at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:482) [osgi.core-6.0.0.jar:?] at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:415) [osgi.core-6.0.0.jar:?] at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:232) [osgi.core-6.0.0.jar:?] at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:444) [osgi.core-6.0.0.jar:?] at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:908) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:213) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:120) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:112) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:168) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.container.Module.publishEvent(Module.java:476) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.container.Module.start(Module.java:467) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1634) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1614) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1585) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1528) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340) [org.eclipse.osgi-3.12.100.jar:?] I might actually have gotten that previously as well.. but anyhow.

When attempting to Search for the Thing in PaperUI using the Smartthings binding, I cannot find anything. But when adding manually I can, as before, add the Switch type item and get an Online status from it. When adding the washerMode type item, I get the following in the logs: 2020-06-04 21:27:47.216 [INFO ] [s.internal.SmartthingsHandlerFactory] - Sent message "{"capabilityKey": "switch", "deviceDisplayName": "Washing machine", "capabilityAttribute": "switch", "openHabStartTime": 1591298866996}" with path "/state" to the Smartthings hub, recieved HTTP status 202 (This is the normal code from Smartthings) 2020-06-04 21:27:47.521 [WARN ] [s.internal.SmartthingsHandlerFactory] - Unable to locate handler for display name: Washing machine with attribute: switch. If this thing is included in your OpenHabAppV2 SmartApp in the Smartthings App on your phone it must also be configured in openHAB 2020-06-04 21:28:06.172 [WARN ] [ore.thing.internal.ThingRegistryImpl] - Cannot create thing. No binding found that supports creating a thing of type 'smartthings:washerMode'.

Similary, when adding washerOperatingState, I see: 2020-06-04 21:29:40.911 [WARN ] [ore.thing.internal.ThingRegistryImpl] - Cannot create thing. No binding found that supports creating a thing of type 'smartthings:washerOperatingState'.

Both washer type items show as uninitialized status.

BobRak commented 4 years ago

Regarding: [ERROR] [org.openhab.binding.smartthings ] - bundle org.openhab.binding.smartthings:2.5.0.202004200354 (241)[org.openhab.binding.smartthings.internal.discovery.SmartthingsDiscoveryService(241)] : The setThingHandlerFactory method has thrown an exception java.lang.ClassCastException: org.openhab.binding.ipcamera.internal.IpCameraHandlerFactory cannot be cast to org.openhab.binding.smartthings.internal.SmartthingsHandlerFactory at org.openhab.binding.smartthings.internal.discovery.SmartthingsDiscoveryService.setThingHandlerFactory(SmartthingsDiscoveryService.java:91)

Until that is resolved all bets are off on anything else working. I have never seen anything like this until a few days ago when someone else reported a similar exception (#90 ). Then I saw it myself today when deploying the latest jar. For me a restart of openhab resolved the issue. I think something is going on unrelated to my code. Maybe something with the the openhab libraries used to compile my binding or something with the openhab platform itsself.

One thing weird about your exception is that it shows a version number of org.openhab.binding.smartthings:2.5.0.202004200354. This is the old jar version number. Please double check that the jar file has a date of 2020-06-04. Then try a restart and see if that helps. If not, do a reboot of your server. If you keep seeing the same exception let me know and I'll post an issue on the openhab Community site. If you see this same exception see what the version number is. It should be 2.5.5.202006040007.

Let me know how it goes.

BobRak commented 4 years ago

I just realized that I forgot to add the new washer capabilities in a configuration file. I've done that now and also have a fix for the classCastException. I've gotten a response for openHAB about adding the binding into openhab and am working on those requested changes. I'll let you know when I have another build ready for you to test.

BobRak commented 4 years ago

The ClassCastException has been fixed. Since this is over a month old I'm going to close it. You are welcome to reopen it if you have additional questions.