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

No webhook token field #186

Closed samoid closed 4 months ago

samoid commented 11 months ago

Describe The Bug:

On a clean build of HOOBS 4.3.0, after installing this plugin, there is no webhook token field in the config tab. Advanced config also does not seem to be updated with webhook. To Reproduce:

uninstall/reinstall plugin, reflash SD card, factory reset, install older versions of plugin. All seem to show the same behavior Expected behavior:

Expecting a webhook token field and a config to match: { "Name": "Smartthings Plugin", "AccessToken": "INSERT YOUR PERSONAL ACCESS TOKEN HERE", "WebhookToken: "INSERT WEBHOOK TOKEN HERE", "BaseURL": "https://api.smartthings.com/v1", "GarageDoorMaxPoll": 40, "PollLocksSeconds": 15, "PollDoorsSeconds": 15, "PollSensorsSeconds": 5, "PollSwitchesAndLightsSeconds": 15 "platform": "HomeBridgeSmartThings", "IgnoreLocations": [ "My location 1", "My location 2" ], "IgnoreDevices": [ "Device to ignore 1", "Device to ignore 2" ] } Logs: 7/11/2023, 3:49:26 PMSmartThings Ik Bridge starting 7/11/2023, 3:51:22 PMsmartthingsikbridge stopping 7/11/2023, 3:51:27 PMSmartThings Ik Bridge starting 7/11/2023, 3:54:29 PMWARNINGdevice reboot command received 7/11/2023, 3:54:30 PMSmartThings Ik Bridge stopping 7/11/2023, 3:54:58 PMhub is running on port 80 7/11/2023, 3:55:05 PMSmartThings Ik Bridge starting 7/11/2023, 4:13:20 PMsmartthingsikbridge stopping 7/11/2023, 4:13:21 PMsmartthingsikbridge stopping 7/11/2023, 4:25:21 PMSmartThings Ik Bridge2 starting 7/11/2023, 4:25:43 PMSmartThings Ik Bridge2Loaded plugin 'homebridge-smartthings-ik' 7/11/2023, 4:25:43 PMSmartThings Ik Bridge2Loading 1 platforms... 7/11/2023, 4:25:44 PMSmartThings Ik Bridge2Bridge is running on port 51826. 7/11/2023, 4:25:44 PMSmartThings Ik Bridge2HomeBridgeSmartThingsERRORError getting devices from Smartthings: AxiosError: Request failed with status code 400 7/11/2023, 4:25:44 PMSmartThings Ik Bridge2HomeBridgeSmartThingsERRORCould not load devices from Smartthings: undefined. Check your configuration 7/11/2023, 4:30:25 PMSmartThings Ik Bridge2Configuration change 7/11/2023, 4:30:25 PMsmartthingsikbridge2 stopping 7/11/2023, 4:30:30 PMSmartThings Ik Bridge2 starting 7/11/2023, 4:30:35 PMSmartThings Ik Bridge2Loaded plugin 'homebridge-smartthings-ik' 7/11/2023, 4:30:35 PMSmartThings Ik Bridge2Loading 1 platforms... 7/11/2023, 4:30:36 PMSmartThings Ik Bridge2Bridge is running on port 51826. 7/11/2023, 4:30:36 PMSmartThings Ik Bridge2Smartthings Plug (IK)ERRORError getting devices from Smartthings: AxiosError: Request failed with status code 401 7/11/2023, 4:30:36 PMSmartThings Ik Bridge2Smartthings Plug (IK)ERRORCould not load devices from Smartthings: undefined. Check your configuration

Show the Homebridge logs here, remove any sensitive information.

Plugin Config: { "platform": "HomeBridgeSmartThings", "name": "Smartthings Plug (IK)", "BaseURL": "https://api.smartthings.com/v1/", "GarageDoorMaxPoll": 40 }

Show your Homebridge config.json here, remove any sensitive information.

Screenshots:

HOOBS ver SmartThings plugin ver SmartThings plugin

Environment: HOOBS 4.3.0

iklein99 commented 11 months ago

Hi. I've seen this before. You can just go in and edit the config file directly and add the fields you need in. Then restart homebridge.

iklein99 commented 11 months ago

Also, you must have a smartthings access token to even run the plugin. you are missing that. You get that from SmartThings. That is why you get an error loading the devices. The Webhook is optional and allows for real-time update of device status and eliminates polling of the devices.

samoid commented 11 months ago

Thanks for the quick reply. I forgot to include that when I try to edit the config and save, it reverts back. I know about the access token. I was leaving it blank because I didn't want it to poll without the webhook yet.

On Fri, Jul 14, 2023 at 9:12 AM iklein99 @.***> wrote:

Also, you must have a smartthings access token to even run the plugin. you are missing that. You get that from SmartThings. That is why you get an error loading the devices. The Webhook is optional and allows for real-time update of device status and eliminates polling of the devices.

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

iklein99 commented 11 months ago

So, did you have success when you edited the config file?

samoid commented 11 months ago

No, when I edit the config file it does not save. It hangs on a HOOBS loading logo forever. If I try to reboot, it shows the old config.

iklein99 commented 11 months ago

Ok. I’ll see if I can reproduce.  I don’t use hoobs. I’ll play with it soonSent from my iPhoneOn Jul 18, 2023, at 3:34 PM, samoid @.***> wrote: No, when I edit the config file it does not save. It hangs on a HOOBS loading logo forever. If I try to reboot, it shows the old config.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

iklein99 commented 4 months ago

Closing