sinricpro / esp8266-esp32-sdk

Library for https://sinric.pro - simple way to connect your device to Alexa, Google Home, SmartThings and cloud
https://sinric.pro
228 stars 122 forks source link

on and off state in reverse #222

Closed mattmi91 closed 2 years ago

mattmi91 commented 2 years ago

when I flip switch to ON it turns off the relay and when I flip the switch to OFF it turns on the relay I cannot find where this is set in the code, plz help? ): this is for multiswitch_advanced.ino

sivar2311 commented 2 years ago

It depends on where this behavior occurs.

If it only occurs via SinricPro (in onPowerState() function): Change line 111 to digitalWrite(relayPIN, !state);

If it only occurs when switching manually (in handleFlipSwitches() function): Change line 133 to digitalWrite(relayPIN, !newRelayState);

If it occurs on both: Change either of the above two lines or change the wiring of the relay from NC (normally closed) to NO (normally open).

stale[bot] commented 2 years ago

This issue has gone quiet. Spooky quiet. We currently close issues after 14 days of inactivity. It’s been at least 7 days since the last update here. If we missed this issue or if you want to keep it open, please reply here. As a friendly reminder, the best way to fix this or any other problem is to provide a detailed error description including a serial log. Thanks for being a part of the SinricPro community!

stale[bot] commented 2 years ago

Hey again! It’s been 14 days since anything happened on this issue, so our friendly robot (that’s me!) is going to close it. Please keep in mind that I’m only a robot, so if I’ve closed this issue in error, I’m HUMAN_EMOTION_SORRY. Please feel free to comment on this issue or create a new one if you need anything else. As a friendly reminder, the best way to fix this or any other problem is to provide a detailed error description including a serial log. Thanks again for being a part of the SinricPro community!