iklein99 / homebridge-smartthings

This is a plugin to Homebridge to connect your Smartthings network into Apple Home Kit.
Apache License 2.0
150 stars 52 forks source link

Ignored devices still showing up #146

Closed gradyhouston closed 1 year ago

gradyhouston commented 1 year ago

Just got everything setup and it works perfectly.

The only thing I noticed is that now my iPhone is being added to the Home app along with my other devices (which are just 3 Samsung TVs). I've added the name of the device that's shown in the Home app to the "IgnoreDevice" array and have also created a Room in my Home app called "Ignored Room" and have added that Room to the "IgnoreLocations" array but my iPhone still shows in my Home app. You can see from the config that I even tried adding other "names" that this devices could be being found as.

Log from Homebridge:

[01/03/2023, 01:04:19] [Smartthings Plug (IK)] Updated status for XXXX’s iPhone: {"presenceSensor":{"presence":{"value":null,"timestamp":"2021-01-29T00:53:44.785Z"}},"sensor":{},"occupancySensor":{"occupancy":{"value":null,"timestamp":"2021-01-29T00:53:44.785Z"}}}
[01/03/2023, 01:04:19] [Smartthings Plug (IK)] XXXX’s iPhone returned bad value for status
[01/03/2023, 01:04:19] [Smartthings Plug (IK)] Bad status from XXXX’s iPhone.  Removing this service.

Homebridge version: 1.6.0

Plugin config:

{
            "name": "Smartthings Plug (IK)",
            "BaseURL": "https://api.smartthings.com/v1",
            "AccessToken": "xxxxx",
            "WebhookToken": "xxxxx",
            "GarageDoorMaxPoll": 0,
            "PollLocksSeconds": 0,
            "PollDoorsSeconds": 0,
            "PollSensorsSeconds": 5,
            "PollSwitchesAndLightsSeconds": 15,
            "IgnoreLocations": [
                "Ignored Room",
                "My location 2"
            ],
            "IgnoreDevices": [
                "XXXX's iPhone",
                "XXXX’s iPhone (homebridge-smartthings-ik)",
                "c046bd4d-1e56-4ea6-af19-72ec7575bd9c"
            ],
            "platform": "HomeBridgeSmartThings"
        }
iklein99 commented 1 year ago

Can you confirm that since you added the IgnoreDevices list to your config that you restarted homebridge? It should remove those as soon as you do.

gradyhouston commented 1 year ago

Yes, tried restarting several times.

On Wed, Mar 1, 2023 at 7:53 AM iklein99 @.***> wrote:

Can you confirm that since you added the IgnoreDevices list to your config that you restarted homebridge? It should remove those as soon as you do.

— Reply to this email directly, view it on GitHub https://github.com/iklein99/homebridge-smartthings/issues/146#issuecomment-1450105687, or unsubscribe https://github.com/notifications/unsubscribe-auth/AH5FP6E3XZGUHRGMNJOYYJLWZ5BGDANCNFSM6AAAAAAVLTWPHE . You are receiving this because you authored the thread.Message ID: @.***>

-- Grady Houston

iklein99 commented 1 year ago

I've included instructions to send me detailed logs. If you do this and send me (don't post here) the config file I can take a look at what is happening.

Instructions for Producing a Detailed Log.pdf

coryabooth commented 1 year ago

Is there a chance they need to be cleared out of the "Cached Accessories" in the Homebridge Settings?

gradyhouston commented 1 year ago

I tried that, too. Every time on restart of Homebridge, the device is added back to the cached list because it’s being added back as an accessory.

On Wed, Mar 1, 2023 at 10:32 AM coryabooth @.***> wrote:

Is there a chance they need to be cleared out of the "Cached Accessories" in the Homebridge Settings?

— Reply to this email directly, view it on GitHub https://github.com/iklein99/homebridge-smartthings/issues/146#issuecomment-1450346669, or unsubscribe https://github.com/notifications/unsubscribe-auth/AH5FP6BU7SDO2AUNQ276ASTWZ5TXFANCNFSM6AAAAAAVLTWPHE . You are receiving this because you authored the thread.Message ID: @.***>

-- Grady Houston

iklein99 commented 1 year ago

Send me the files and I’ll have a look. I am using this feature and lots of others have. This is the first time I’m hearing of an issue with it. Need to see the logs and the config file, though.

On Mar 1, 2023, at 10:33 AM, Grady Houston @.***> wrote:

I tried that, too. Every time on restart of Homebridge, the device is added back to the cached list because it’s being added back as an accessory.

On Wed, Mar 1, 2023 at 10:32 AM coryabooth @.***> wrote:

Is there a chance they need to be cleared out of the "Cached Accessories" in the Homebridge Settings?

— Reply to this email directly, view it on GitHub https://github.com/iklein99/homebridge-smartthings/issues/146#issuecomment-1450346669, or unsubscribe https://github.com/notifications/unsubscribe-auth/AH5FP6BU7SDO2AUNQ276ASTWZ5TXFANCNFSM6AAAAAAVLTWPHE . You are receiving this because you authored the thread.Message ID: @.***>

-- Grady Houston — Reply to this email directly, view it on GitHub https://github.com/iklein99/homebridge-smartthings/issues/146#issuecomment-1450349333, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABG55EURKCUUABYJRLAMTFDWZ5T5RANCNFSM6AAAAAAVLTWPHE. You are receiving this because you were assigned.

gradyhouston commented 1 year ago

Yep, will send here in a bit.

On Wed, Mar 1, 2023 at 10:38 AM iklein99 @.***> wrote:

Send me the files and I’ll have a look. I am using this feature and lots of others have. This is the first time I’m hearing of an issue with it. Need to see the logs and the config file, though.

On Mar 1, 2023, at 10:33 AM, Grady Houston @.***> wrote:

I tried that, too. Every time on restart of Homebridge, the device is added back to the cached list because it’s being added back as an accessory.

On Wed, Mar 1, 2023 at 10:32 AM coryabooth @.***> wrote:

Is there a chance they need to be cleared out of the "Cached Accessories" in the Homebridge Settings?

— Reply to this email directly, view it on GitHub < https://github.com/iklein99/homebridge-smartthings/issues/146#issuecomment-1450346669 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AH5FP6BU7SDO2AUNQ276ASTWZ5TXFANCNFSM6AAAAAAVLTWPHE

. You are receiving this because you authored the thread.Message ID: @.***>

-- Grady Houston — Reply to this email directly, view it on GitHub < https://github.com/iklein99/homebridge-smartthings/issues/146#issuecomment-1450349333>, or unsubscribe < https://github.com/notifications/unsubscribe-auth/ABG55EURKCUUABYJRLAMTFDWZ5T5RANCNFSM6AAAAAAVLTWPHE . You are receiving this because you were assigned.

— Reply to this email directly, view it on GitHub https://github.com/iklein99/homebridge-smartthings/issues/146#issuecomment-1450357305, or unsubscribe https://github.com/notifications/unsubscribe-auth/AH5FP6CG2CXJ2WQPVU6WQXDWZ5UQNANCNFSM6AAAAAAVLTWPHE . You are receiving this because you authored the thread.Message ID: @.***>

-- Grady Houston

iklein99 commented 1 year ago

The issue is that there is a singe quote (in this case an apostrophe) in the name of the device. For whatever reason, SmartThings is converting this or storing it as a character code for a right single quote which doesn't match how it is stored in the config file. For now, the work around is to rename the device in SmartThings to eliminate that character. I will have this fixed in the next release of the webhook.

iklein99 commented 1 year ago

Fixed in version 1.5.2