Open kakopappa opened 3 years ago
I think that my IP is blocked 201.20.78.24 😔
@felipeparente why do you think so?
A few days ago, I was integrating a product of mine with SinricPro. I had put a delay of 1s at the end of the loop, I noticed that it was connecting and disconnecting all the time, it took me a long time to realize that this was due to this delay. After corrected, everything was OK, but in a few minutes, my program did not connect anymore, even today it does not connect anymore.
@felipeparente checked the server and your IP is not banned. try connecting to server via mobile hotspot.
A 1s delay in loop should not result in disconnects / reconnects. The reason must be something else. Mobile hotspot is a good point to clearify if there are some other wifi issues.
I just tested on the smartphone hotspot, it doesn't connect. I used the Switch example, and everything was OK, but now it doesn't connect anymore. DEBUG doesn't show much.
[SinricPro]: Device "61e03ae2d7ffa945f32059d3" does not exist. creating new device [SinricPro:add()]: Adding device with id "61e03ae2d7ffa945f32059d3".
But the device mentioned is registered in my account.
This debug message means that a device with this id is created inside the sdk on your esp. it does not check the existance in your account.
can you share the rest of the log and post your sketch (without your credentials)?
It's my code to connect..
SinricProSwitch& mySwitch = SinricPro[sinricProSwitchId.c_str()];
mySwitch.onPowerState(onPowerState); // set callback function to device
// setup SinricPro
SinricPro.onConnected([](){
Serial.print(F(":) Connected to SinricPro\r\n"));
sinricProConnected = true;
});
SinricPro.onDisconnected([](){
Serial.print(F(":( Disconnected from SinricPro\r\n"));
sinricProConnected = false;
});
SinricPro.begin(sinricProAppKey.c_str(), sinricProAppSecret.c_str());
please share the full sketch. there are some points unclear to me.
The connection part is just that. The variables: sinricProSwitchId, sinricProAppKey and sinricProAppSecret come from the settings, saved in file.
I call setupSinricPro() method after checking if internet connected.
Do you check the variable sinricProConnected
somewhere?
You don't need this. You can use SinricPro.isConnected()
Anyway, for a detailed analyse, the full code would be helpful (to see where the error might happen).
If the switch example is working, something else must be wrong in your sketch.
I found the error. I was only calling SinricPro.handle() if SinricPro was connected.
I fixed it and it worked.
I'm glad you found the reason!
Following Is are were blocked due to sending excessive traffic/ automation scripts / bots / too many reconnections. If you are on one of these IPs, contact us
87.20.141.176 151.63.198.226