BobRak / OpenHAB-Smartthings

53 stars 54 forks source link

Unable to locate handler for display name #92

Closed edwolfe3 closed 4 years ago

edwolfe3 commented 4 years ago

I'm getting the follower warning (and OpenHAB is not receiving an updated status) for all my smart thing devices:

2020-06-13 11:51:47.490 [WARN ] [s.internal.SmartthingsHandlerFactory] - Unable to locate handler for display name: Bedroom Light 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

My things are defined as (the ip address is correct and access via ping from openhab):

/* This the house hub (hubv2-24fd5b000003ada1) */
Bridge smartthings:smartthings:House [smartthingsIp="172.32.10.194", smartthingsPort=39500] {
    Thing switch                BedroomCeilingLight             [smartthingsName="Bedroom Light"]
    Thing switch                FrontDoorLight                  [smartthingsName="Front Door Light"]
    Thing switch                GarageRearSpotlight             [smartthingsName="Garage Back Spotlight"]
    Thing switch                GaragePorchSpotlight            [smartthingsName="Garage Porch Spotlight"]
    Thing switch                HouseSpotLight                  [smartthingsName="House Spot Light"]
    Thing switch                GuestRoomLight                  [smartthingsName="Guest Room Light"]
    Thing switch                GuestRoomTelevisionOutlet       [smartthingsName="Guest Room Television"]
    Thing switch                KitchenSinkLight                [smartthingsName="Kitchen Sink"]
    Thing switch                LivingRoomLamp                  [smartthingsName="Living Room Lamp"]
    Thing switch                FrontYardAmplifier              [smartthingsName="Outside Amp"]
    Thing switch                ShuffleboardCeilingLight        [smartthingsName="Shuffleboard Ceiling Light"]
    Thing switch                Dartboard                       [smartthingsName="Dartboard"]
    Thing switch                HomeCinemaCeilingLight          [smartthingsName="Theater Ceiling Light"]

    Thing switchLevel           DiningRoomCeilingLight          [smartthingsName="Dining Room"]
    Thing switchLevel           KitchenCounterLight             [smartthingsName="Kitchen Counter"]
    Thing switchLevel           KitchenCeilingLight             [smartthingsName="Kitchen Main"]
    Thing switchLevel           KitchenTableLight               [smartthingsName="Kitchen Table Light"]
    Thing switchLevel           HomeCinemaFan                   [smartthingsName="Family Room Fan"]
    Thing switchLevel           HomeCinemaFanLight              [smartthingsName="Family Room Light"]
    Thing switchLevel           HomeCinemaTVLight               [smartthingsName="Over Family Room TV Light"]
    Thing switchLevel           HomeCinemaSnackBarLight         [smartthingsName="Snack Bar Light"]
    Thing switchLevel           OfficeEdsDeskLight              [smartthingsName="Eds Desk Lamp"]
    Thing switchLevel           OfficeEdsDeskFan                [smartthingsName="Eds Desk Fan"]
    Thing switchLevel           OfficeEdsDeskFan                [smartthingsName="Eds Desk Fan"]
    Thing switchLevel           BrandonsHall                    [smartthingsName="Brandons Hall"]
}
[11:57:13] openhabian@openhab:/srv/openhab2-conf$ ping hubv2-24fd5b000003ada1
PING hubv2-24fd5b000003ada1 (172.32.10.194) 56(84) bytes of data.
64 bytes from hubv2-24fd5b000003ada1.local (172.32.10.194): icmp_seq=1 ttl=64 time=0.516 ms
64 bytes from hubv2-24fd5b000003ada1.local (172.32.10.194): icmp_seq=2 ttl=64 time=0.477 ms
64 bytes from hubv2-24fd5b000003ada1.local (172.32.10.194): icmp_seq=3 ttl=64 time=0.479 ms
64 bytes from hubv2-24fd5b000003ada1.local (172.32.10.194): icmp_seq=4 ttl=64 time=0.415 ms
64 bytes from hubv2-24fd5b000003ada1.local (172.32.10.194): icmp_seq=5 ttl=64 time=0.474 ms
64 bytes from hubv2-24fd5b000003ada1.local (172.32.10.194): icmp_seq=6 ttl=64 time=0.458 ms
64 bytes from hubv2-24fd5b000003ada1.local (172.32.10.194): icmp_seq=7 ttl=64 time=0.502 ms
64 bytes from hubv2-24fd5b000003ada1.local (172.32.10.194): icmp_seq=8 ttl=64 time=0.485 ms
64 bytes from hubv2-24fd5b000003ada1.local (172.32.10.194): icmp_seq=9 ttl=64 time=0.479 ms
^C
--- hubv2-24fd5b000003ada1 ping statistics ---
9 packets transmitted, 9 received, 0% packet loss, time 318ms
rtt min/avg/max/mdev = 0.415/0.476/0.516/0.028 ms

I've went through the entire install again and all seems to be fine. What could be problem?

BobRak commented 4 years ago

I'm away from home this weekend so I can't look at the code. Do the things in your .things file appear in the paperui? Any error messages earlier in in the log. Do you see a message that the .things file is loaded? Have you tried restarting openHAB?

edwolfe3 commented 4 years ago

The things are in the paperui as "uninitialized'. The things file is loaded and I can't find any other messages related to smart things. This problem started happening when I rebooted Openhab but I did reboot again to no avail.

Get Outlook for Android

On Sat, Jun 13, 2020 at 1:05 PM -0400, "Bob Raker" notifications@github.com wrote:

I'm away from home this weekend so I can't look at the code. Do the things in your .things file appear in the paperui? Any error messages earlier in in the log. Do you see a message that the .things file is loaded? Have you tried restarting openHAB?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

BobRak commented 4 years ago

I'm home and had a look at the code and this message means that the "Bedroom Light" isn't configure in Smartthings. It it has a status on uninitialized that would explain why openHAB doesn't know about it. I have no idea why the Things are not getting initialized.

Some things to check:

  1. Are there any error messages in the openHAB log related to smartthings?
  2. Verify the IP, port and mac configured in the ST IDE are right (I suspect they are ok...)
  3. Verify that you only have 1 smartthings jar file in your addons directory.
  4. Read about using the openhab console here. Issue the command bundle:list | grep Smartthings. Look at the version number and verify it matches the version that is part of the jar file name.
  5. Restart the openHAB server.

Tell me the name of your jar file. Unfortunately I've done a number of builds in the past few weeks. Currently I am making changes requested by openHAB to get it included in their release. We may have to wait until I am done with that and have another stable build.

Bob

edwolfe3 commented 4 years ago

Bob,

Sorry it took my so long to reply. I was upgrading my server and that message is now gone. I think it was an out of memory situation.

Ed

From: Bob Raker notifications@github.com Sent: Sunday, June 14, 2020 4:07 PM To: BobRak/OpenHAB-Smartthings OpenHAB-Smartthings@noreply.github.com Cc: edwolfe3 edwolfe@wolfecomputerservices.com; Author author@noreply.github.com Subject: Re: [BobRak/OpenHAB-Smartthings] Unable to locate handler for display name (#92)

I'm home and had a look at the code and this message means that the "Bedroom Light" isn't configure in Smartthings. It it has a status on uninitialized that would explain why openHAB doesn't know about it. I have no idea why the Things are not getting initialized.

Some things to check:

  1. Are there any error messages in the openHAB log related to smartthings?
  2. Verify the IP, port and mac configured in the ST IDE are right (I suspect they are ok...)
  3. Verify that you only have 1 smartthings jar file in your addons directory.
  4. Read about using the openhab console here https://www.openhab.org/docs/administration/console.html . Issue the command bundle:list | grep Smartthings. Look at the version number and verify it matches the version that is part of the jar file name.
  5. Restart the openHAB server.

Tell me the name of your jar file. Unfortunately I've done a number of builds in the past few weeks. Currently I am making changes requested by openHAB to get it included in their release. We may have to wait until I am done with that and have another stable build.

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/92#issuecomment-643815659 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AJRFDT23ZLLLFSNZHIQHH2TRWUUWJANCNFSM4N5BIGKA . https://github.com/notifications/beacon/AJRFDTYBCQI53PMAN25T7U3RWUUWJA5CNFSM4N5BIGKKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEZP5R2Y.gif

edwolfe3 commented 4 years ago

I was wrong, the binding is acting very strange. it works sometimes not other times. At the moment I'm getting the following when a command is issued to the item:

2020-06-22 12:49:47.974 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.handleCommand()' on 'smartthingsName :Family Room Fan, thing UID: smartthings:switchLevel:House:HomeCinemaFan, thing label: Switch Level': null

2020-06-22 12:49:47.923 [ome.event.ItemCommandEvent] - Item 'GF_HomeCinema_Fan' received command ON

2020-06-22 12:49:47.955 [nt.ItemStatePredictedEvent] - GF_HomeCinema_Fan predicted to become ON

Please Note: I was forced to upgrade by Samsung, to the new App so I am no longer using the "classic app". However, I did that a many weeks ago, so I don't think that is the issue as it worked after that.

BobRak commented 4 years ago

@edwolfe3 I got a new phone the other day and had no problem installing the Smartthings Classic app. I have an android. In the long run I don't think you will be able to configure the openHAB integration with the new app

One of the recommendations I made on your issue #92 was: Read about using the openhab console here. Issue the command bundle:list | grep Smartthings. Look at the version number and verify it matches the version that is part of the jar file name. If you haven't done that I highly recommend you do that.

Over the year or so a number of people have reported TimeoutExceptions and in the end they have figured it out. Try this query and have a look at #84, #69, #43

I don't have anything more to suggest. I've been running the latest jar file for sometime now and it has been working fine. Probably a week or so before I am ready to do a new build.

edwolfe3 commented 4 years ago

@BobRak

I got a new phone the other day and had no problem installing the Smartthings Classic app. I have an android. In the long run I don't think you will be able to configure the openHAB integration with the new app

See issue #83

One of the recommendations I made on your issue #92 was: Read about using the openhab console here. Issue the command bundle:list | grep Smartthings. Look at the version number and verify it matches the version that is part of the jar file name. If you haven't done that I highly recommend you do that.

                      __  _____    ____

_ __ / / / / | / ) / \/ \/ _ \/ \/ /_/ / /| | / | / // / // / / / / / / |/ // / __/ ._/__// /// /// |/____/ /_/ 2.5.5 Release Build

Hit '' for a list of available commands and '[cmd] --help' for help on a specific command. Hit '' or type 'system:shutdown' or 'logout' to shutdown openHAB.

openhab> bundle:list | grep Smart 203 x Active x 80 x 2.5.5.202006040007 x openHAB Add-ons :: Bundles :: Samsung Smartthings Binding openhab>

org.openhab.binding.smartthings-2.5.5-SNAPSHOT.jar

Over the year or so a number of people have reported TimeoutExceptions and in the end they have figured it out. Try this query and have a look at #84, #69, #43

I have done all that and MUCH more (including "reinstalling" multiple times. This binding is really fragile and down-right flaky at times. I hope the "official" version will be stable.

BobRak commented 4 years ago

On last thing to try - restart your ST hub. I remember one person having issues and restarting the hub took care of it.

I submitted the binding for review over a year ago and one of the recommendations out of that was to change how I sent messages out. I am now using the recommended org.eclipse.jetty.client.HttpClient class to send messages. This seems to be what the other bindings are using to send http messages. The timeout is currently 3 seconds which should be plenty. But, I'll update it to 5 seconds.

I'm sure I've put over 200 hours into this over the past 3 years. It it isn't meeting your needs you can not use it.

edwolfe3 commented 4 years ago

I’ll try restarting the hub.

I am a developer too so I appreciate the time you have put into creating this. However, I have been having a lot of trouble with it working consistency.

From: Bob Raker notifications@github.com Sent: Monday, June 22, 2020 7:05 PM To: BobRak/OpenHAB-Smartthings OpenHAB-Smartthings@noreply.github.com Cc: edwolfe3 edwolfe@wolfecomputerservices.com; Mention mention@noreply.github.com Subject: Re: [BobRak/OpenHAB-Smartthings] Unable to locate handler for display name (#92)

On last thing to try - restart your ST hub. I remember one person having issues and restarting the hub took care of it.

I submitted the binding for review over a year ago and one of the recommendations out of that was to change how I sent messages out. I am now using the recommended org.eclipse.jetty.client.HttpClient class to send messages. This seems to be what the other bindings are using to send http messages. The timeout is currently 3 seconds which should be plenty. But, I'll update it to 5 seconds.

I'm sure I've put over 200 hours into this over the past 3 years. It it isn't meeting your needs you can not use it.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/BobRak/OpenHAB-Smartthings/issues/92#issuecomment-647812087 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AJRFDTZIDSPZLW2KR26UR2TRX7PTJANCNFSM4N5BIGKA . https://github.com/notifications/beacon/AJRFDT2QDCGFEGXUK2VNCNDRX7PTJA5CNFSM4N5BIGKKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOE2ONH5Y.gif