sinricpro / non-sdk-issues

Report non sdk related issues here (Alexa, Google Home, SmartThings, IFTTT, API)
2 stars 0 forks source link

Blocked IPs #15

Open kakopappa opened 3 years ago

kakopappa commented 3 years ago

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

felipeparente commented 2 years ago

I think that my IP is blocked 201.20.78.24 😔

kakopappa commented 2 years ago

@felipeparente why do you think so?

felipeparente commented 2 years ago

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.

kakopappa commented 2 years ago

@felipeparente checked the server and your IP is not banned. try connecting to server via mobile hotspot.

sivar2311 commented 2 years ago

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.

felipeparente commented 2 years ago

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.

sivar2311 commented 2 years ago

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.

sivar2311 commented 2 years ago

can you share the rest of the log and post your sketch (without your credentials)?

felipeparente commented 2 years ago

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());
sivar2311 commented 2 years ago

please share the full sketch. there are some points unclear to me.

felipeparente commented 2 years ago

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.

sivar2311 commented 2 years ago

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.

felipeparente commented 2 years ago

I found the error. I was only calling SinricPro.handle() if SinricPro was connected.

I fixed it and it worked.

sivar2311 commented 2 years ago

I'm glad you found the reason!