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

How does GPIO are decided by sinric on ESP 8266? #8

Closed
rajnish1959 opened this issue Oct 11, 2019 · 9 comments
Closed

How does GPIO are decided by sinric on ESP 8266? #8

rajnish1959 opened this issue Oct 11, 2019 · 9 comments

Comments

@rajnish1959
Copy link

Hello, I am new to this! I can connect to Sinric and get all the id etc and upload the device on off code to ESP -01. When I test it through sinric test button the blue led on ESP-01 responds also. But I do not know which is the output pin? Which GPIO of the ESP-01 will respond? How do you provide this coding and where? In wemos D1 mini the built in led was coded in the .ino example But when you go through sinric how does the device id and the GPIOs are correlated and where do you provide for that?

@kakopappa
Copy link
Contributor

are you using Sinric or SinricPro ? Pro is still not ready for public

GOIP pins are defined by the user. In the pro example GPIO pin is defined here
https://github.com/sinricpro/esp8266-esp32-sdk/blob/master/examples/Switch/src/switch.cpp#L25

@rajnish1959
Copy link
Author

rajnish1959 commented Oct 11, 2019 via email

@rajnish1959
Copy link
Author

rajnish1959 commented Oct 11, 2019 via email

@rajnish1959
Copy link
Author

rajnish1959 commented Oct 11, 2019 via email

@sivar2311
Copy link
Contributor

Hi rajnish!
Your device have to know wich GPIO has to be used (you have to define those GPIOs in your code!).
Sinric & SinricPro only sends basic commands like "turn on" / "turn off" / "set brightness".
Can you share your code? This would be helpful to support you

@rajnish1959
Copy link
Author

rajnish1959 commented Oct 13, 2019 via email

@sivar2311
Copy link
Contributor

As far as i can see, you want to control a relay using wemo-emulation.
What we're doing here with SinricPro is completely different (no more wemo emulation)

With SinricPro this could handled very simple!
Please have a look to our Switch example: https://github.com/sinricpro/esp8266-esp32-sdk/blob/master/examples/Switch/src/switch.cpp

@cr8myf8
Copy link

cr8myf8 commented Nov 12, 2020

I am using Sinric Pro. How do I define or change which GPIO is controlled with the On/Off command?

@sivar2311
Copy link
Contributor

#define ... or const int ... same way you would define it in any other arduino sketch.
Check the examples. Replace the serial print statements with digital- / analogWrite functions to control whatever GPIO you want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants