Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: "Other" IR Devices send commandOn and commandOff at reversed times #310

Closed
jonzhan opened this issue Apr 12, 2022 · 2 comments
Closed
Assignees
Labels
bug Something isn't working pinned

Comments

@jonzhan
Copy link

jonzhan commented Apr 12, 2022

Describe The Bug

When turning on a device, it sends commandOff, and vice versa

To Reproduce

Set up an IR "Other" device and try toggling state.

Expected behavior

Turning on a device should use the configured commandOn command, not commandOff

Relevant log output

(When turning a device off)

[12/04/2022, 15:31:22] [SwitchBot] [DEBUG] Other: Iceman On: 0
[12/04/2022, 15:31:22] [SwitchBot] Other: Iceman Sending request to SwitchBot API. command: On, parameter: default, commandType: customize
[12/04/2022, 15:31:23] [SwitchBot] [DEBUG] Other: Iceman pushChanges: [object Object]
[12/04/2022, 15:31:23] [SwitchBot] [DEBUG] Other: Iceman Command successfully sent.
[12/04/2022, 15:31:23] [SwitchBot] [DEBUG] Other: Iceman updateCharacteristic Active: 1

Config for homebridge-switchbot

{
    "deviceId": "xxxxxxxxx",
    "configRemoteType": "Fan",
    "other": {
        "deviceType": "Fan",
        "commandOff": "Off",
        "commandOn": "On"
    },
        "logging": "debug"
}

Screenshots

No response

Device & Model

Raspberry Pi 3

Node.js Version

v16.13.0

NPM Version

v8.1.0

Homebridge Version

v1.4.0

Homebridge Switchbot Plugin Version

v1.12.8

Homebridge Config UI X Plugin Version

v4.42.0

Operating System

Raspbian

@jonzhan jonzhan added the bug Something isn't working label Apr 12, 2022
@jonzhan
Copy link
Author

jonzhan commented Apr 12, 2022

I submitted a PR for this but it's my first, so apologies if I did anything wrong.

donavanbecker added a commit that referenced this issue Apr 12, 2022
…ed times (#311)

* v1.12.8 (#299)

## [Version 1.12.8](https://github.com/OpenWonderLabs/homebridge-switchbot/releases/tag/v1.12.8) (2022-03-19)

## What's Changed

- Housekeeping and updated dependencies.

**Full Changelog**: v1.12.7...v1.12.8

* Fix for "Other" IR devices sending reversed On/Off commands

Swapped calls to pushOffChanges and pushOnChanges and inverted downstream checks for this.Active

Co-authored-by: Donavan Becker <[email protected]>
@github-actions github-actions bot added the stale label Apr 27, 2022
@OpenWonderLabs OpenWonderLabs deleted a comment from github-actions bot Apr 27, 2022
@donavanbecker
Copy link
Collaborator

should be resolved from PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pinned
Projects
None yet
Development

No branches or pull requests

2 participants