tonesto7 / homebridge-smartthings

SmartThings Homebridge Plugin
384 stars 767 forks source link

(BUG) {Plugin is not receiving information from main app} #374

Closed franbugallo closed 3 years ago

franbugallo commented 3 years ago

Verify the following before opening an trouble issue

Go over all the following points, and put an x in all the boxes that apply. If you're unsure about any of these, don't hesitate to ask. We're here to help!


About Your Setup

Expected Behavior

After a command is executed in SmartApp, it should be sent and read by homebridge plugin

Current Behavior

After a command is executed (for example with switch-on/switch-off commands for lights) homebridge plugin does not receive the information and thus, it does not get updated. Command is started in Home app, light is switched off/on but the return information to tell homebridge that this light has been switched off does not work. This is also happening when adding new devices; I have to restart homebridge so they get added

Steps to Reproduce (for bugs)

  1. Switch on a light from Home app
  2. Light is switched on
  3. Icon in home app indicates light is on
  4. Close home app
  5. Reopen home app
  6. Icon in home app indicates light is off

Context

I was just trying to switch-on/off lights and get current information. After some time, I guess that when plugin pulls information, status gets updated but it can take 10 minutes or so.


Smartapp log 041ac4f6-4c06-450b-81d0-2056b3d4eb1a 1:20:11: debug Homebridge (v2.3.3) | Sending DEVICE Event (Estanteria | SWITCH: on) to Homebridge at (192.168.86.23:8000) 041ac4f6-4c06-450b-81d0-2056b3d4eb1a 1:20:10: info Homebridge (v2.3.3) | Command Successful for Device Estanteria | Command on() 041ac4f6-4c06-450b-81d0-2056b3d4eb1a 1:20:10: info Homebridge (v2.3.3) | Process Command | DeviceId: cb709446-ef49-4392-909a-465a87d27d2e | Command: (on)

Homebridge log (Notice and debug lines are generated at first command execution, the other ones when home is reopen) NOTICE: Sending Device Command: on | Name: (Estanteria) | DeviceID: (cb709446-ef49-4392-909a-465a87d27d2e) | SendToLocalHub: (false) DEBUG: sendDeviceCommand | Response: "" GOOD: [CHARACTERISTIC (function On() { var _this = _super.call(this, 'On', On.UUID) || this; _this.setProps({ format: "bool" / BOOL /, perms: ["pr" / READ /, "pw" / WRITE /, "ev" / NOTIFY /] }); _this.value = _this.getDefaultValue(); return _this; }) GET] switch (Estanteria) | LastUpdate: (Thu Oct 08 2020 01:09:02 GMT+0200 (Central European Summer Time)) | Value: (false) GOOD: [CHARACTERISTIC (function Brightness() { var _this = _super.call(this, 'Brightness', Brightness.UUID) || this; _this.setProps({ format: "int" / INT /, unit: "percentage" / PERCENTAGE /, maxValue: 100, minValue: 0, minStep: 1, perms: ["pr" / READ /, "pw" / WRITE /, "ev" / NOTIFY /] }); _this.value = _this.getDefaultValue(); return _this; }) GET] level (Estanteria) | LastUpdate: (Thu Oct 08 2020 01:09:02 GMT+0200 (Central European Summer Time)) | Value: (50)

franbugallo commented 3 years ago

update: I have managed to reassure with a ping that the ip and port of my homebridge are reachable from smartthings hub

franbugallo commented 3 years ago

After some more tweaking on my LAN config I have been able to make homebridge work with the plugin with no delay. Bug can be closed

liudle commented 3 years ago

After some more tweaking on my LAN config I have been able to make homebridge work with the plugin with no delay. Bug can be closed

what kind of tweaks did you make? I have the same issue. Thanks!

franbugallo commented 3 years ago

Hi @liudle, my previous network setting was:

[smartthings hub]-----ethernet------[ISP router]––––ethernet------[Google wifi router]-----ethernet----[NAS with dockerized homebridge]

ISP router and Google wifi router were in different subnets, first I thought this won't be an issue because I can ping one subnet from the other. When I realized of homebridge not working properly I bought a swith:

[smartthings hub]-----ethernet------[switch]––––ethernet------[Google wifi router]-----ethernet----[switch]----ethernet-----[NAS with dockerized homebridge]

With this setup everything is working as expected. Hope this can help you!