kakopappa / arduino-esp8266-alexa-wemo-switch

Amazon Alexa + WeMos switch made with Arduino D1 Mini
https://sinric.pro
MIT License
282 stars 252 forks source link

Instructions to Alexa result in the reverse #31

Open BLC-Bob opened 6 years ago

BLC-Bob commented 6 years ago

Thanks, Aruna, for the sketch - it's the only one I have found that works. I am new to all this. I have a 5v 2-Channel Relay Module (but I'm just using one relay at the moment) triggered by your sketch running on an ESP-1s. Problem is that when I tell Alexa to turn the relay on, the relay turns off and vice versa. I think this is because this relay model is triggered by the ESP-01s output pin (I'm using GPIO02) being set LOW rather than HIGH (the opposite to the instructions in the sketch), by sinking the voltage from VCC to the IN1 pin. So I guess to correct this I need change the instructions round in the sketch. Most of the instructions in this sketch are way beyond my current level of understanding . . . I'm sure I'll get there one day! in the meantime, which lines would I need to change to get the relay to turn on when I say "ON" and off when I say "OFF", please. ;-{)

slavino commented 6 years ago

Make sure when the relay is on - if the pin needs to be OUTPUT high or low.

Depending on board you might use NPN transistor (or optoisolated component or logic level shifter or...) to steer 5V logic from 3V3 board.

tenthirtynine commented 6 years ago

Make sure when the relay is on - if the pin needs to be OUTPUT high or low.

Depending on board you might use NPN transistor (or optoisolated component or logic level shifter or...) to steer 5V logic from 3V3 board.

Hey, I have this issue using the D1 Mini, what NPN transistor would you use? Pretty sure its a 3V board

dougstrickland commented 6 years ago

2N3904

On Fri, Nov 9, 2018 at 11:47 AM tenthirtynine notifications@github.com wrote:

Make sure when the relay is on - if the pin needs to be OUTPUT high or low.

Depending on board you might use NPN transistor (or optoisolated component or logic level shifter or...) to steer 5V logic from 3V3 board.

Hey, I have this issue using the D1 Mini, what NPN transistor would you use? Pretty sure its a 3V board

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/kakopappa/arduino-esp8266-alexa-wemo-switch/issues/31#issuecomment-437474786, or mute the thread https://github.com/notifications/unsubscribe-auth/AI5En6B9Z1icga21JXg8TCPlx4U6y7hwks5utdvrgaJpZM4SJiz7 .