homebridge-switchbot icon indicating copy to clipboard operation
homebridge-switchbot copied to clipboard

Bug: RangeError: Maximum call stack size exceeded

Open sseller opened this issue 7 months ago • 1 comments

Describe the Bug

After installing and configuring the plugin, it is working. The Air Conditioner control works but I see RangeError: Maximum call stack size exceeded in the logs

To Reproduce

Control the device from HomeKit

Expected Behavior

As expected, the AIr Conditioner is controlled but the error in the log in unexpected

Relevant Log Output

[6/28/2024, 10:06:18 AM] [SwitchBot] DIY Air Conditioner: Air Conditioner Sending request to SwitchBot API, body: {"command":"setAll","parameter":"35,2,1,on","commandType":"command"},
Exception in PromiseRejectCallback:
file:///homebridge/node_modules/@switchbot/homebridge-switchbot/dist/irdevice/irdevice.js:171
        return await this.successfulStatusCodes(statusCode, deviceStatus);

RangeError: Maximum call stack size exceeded

Exception in PromiseRejectCallback:
file:///homebridge/node_modules/@switchbot/homebridge-switchbot/dist/irdevice/irdevice.js:171
        return await this.successfulStatusCodes(statusCode, deviceStatus);
                          ^

RangeError: Maximum call stack size exceeded

[6/28/2024, 10:06:19 AM] [SwitchBot] DIY Air Conditioner: Air Conditioner failed pushChanges with OpenAPI Connection, Error Message: "Maximum call stack size exceeded"
[6/28/2024, 10:06:29 AM] [SwitchBot] DIY Air Conditioner: Air Conditioner Sending request to SwitchBot API, body: {"command":"setAll","parameter":"34.5,2,1,on","commandType":"command"},
Exception in PromiseRejectCallback:
file:///homebridge/node_modules/@switchbot/homebridge-switchbot/dist/irdevice/irdevice.js:171
        return await this.successfulStatusCodes(statusCode, deviceStatus);

RangeError: Maximum call stack size exceeded

Exception in PromiseRejectCallback:
file:///homebridge/node_modules/@switchbot/homebridge-switchbot/dist/irdevice/irdevice.js:171
        return await this.successfulStatusCodes(statusCode, deviceStatus);
                          ^

RangeError: Maximum call stack size exceeded

[6/28/2024, 10:06:29 AM] [SwitchBot] DIY Air Conditioner: Air Conditioner failed pushChanges with OpenAPI Connection, Error Message: "Maximum call stack size exceeded"

Config for homebridge-switchbot

{
    "name": "SwitchBot",
    "credentials": {
        "token": "TOKEN",
        "secret": "SECRET",
        "notice": "Keep your Token & Secret a secret!"
    },
    "options": {
        "logging": "debug"
    },
    "platform": "SwitchBot"
}

Screenshots

No response

Device and Model

Haier portable A/C

Node.js Version

v20.12.2

NPM Version

v10.5.0

Homebridge Version

v1.8.3

Homebridge Switchbot Plugin Version

v3.5.1

Homebridge Config UI X Plugin Version

v4.56.4

Operating System

Ubuntu Jammy (22.04.4 LTS)

sseller avatar Jun 28 '24 14:06 sseller