You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The ping method updates the internal state to !error each time the device pings, resulting in the state being constantly set to "on". Thus, when HomeKit gets the device state, it always sees "on", even if the device is switched off. Due to internal checks on only setting device state if the new state is different, only attempting to turn off the device will work at that point, even if the device is already off.
The ping option will not work properly for devices that ping successfully when the device is powered off.
Therefore, do not set the ping option in such a case.
If the ping succeeds, !error is true, so state will be on.
If the ping is fails, !error is false, so state will be off.
Could it be the same problem as the following? #20
The ping option is only available if you can use ping to determine whether a device is on or off.
Set the ipAddress of the target device, not "127.0.0.1".
The ping method updates the internal state to
!error
each time the device pings, resulting in the state being constantly set to "on". Thus, when HomeKit gets the device state, it always sees "on", even if the device is switched off. Due to internal checks on only setting device state if the new state is different, only attempting to turn off the device will work at that point, even if the device is already off.homebridge-switchbot-for-mac/src/accessory.ts
Line 174 in 23f15e3
The text was updated successfully, but these errors were encountered: