Closed matteoferl closed 2 years ago
Have you enabled the logs in the sdk and observed the commands coming in and responses ? https://github.com/sinricpro/esp8266-esp32-sdk/blob/master/examples/Switch/Switch/Switch.ino#L18
Try opening the portal in a incognito mode
Have you seen any errors in the activity log?
The color red means there is some kind of error. Unfortunately, there is too little information for an error analysis. Which sketch do you use? Does the error occur with one of the examples? Are the credentials correct?
@sivar2311 I use the example sketch of Switch, the credentials are all ok. An additional information is that when i press on the "physical" button data are sends to sinric (eg. "Switch is now on/off"). only the reverse comunication is broken. I don't if any libraries are in conflicts. i'm unistalling and reinstall ide and libraries right now
Ok. After your reinstall, enable and check serial logs please
Ok, i've reinstalled and re flashed the code enabling debug. that's the result `platform:ESP8266 version:2.9.10
Connected to SinricPro SinricPro:Websocket: receiving data [SinricPro.handleReceiveQueue()]: 1 message(s) in receiveQueue [SinricPro.handleReceiveQueue()]: Signature is valid. Processing message... [SinricPro:extractTimestamp(): Got Timestamp 1637685760 `
Same problem on click On or Off and nothing printed on console
pleasy verify app key (does it match with the app key selected in portal?)
@sivar2311 I've not readed the first 3 lines, it says Device "xxxxxxxxxx" does not exists. creating new device. but the device exists, i've copyed all keys from the portal
"...does not exist" on the ESP's side. So the device will be created. - That's ok
Do you have multiple app key/secret pairs? If yes, check if the correct pair is assigned to the device in portal.
I did a quick test. Used switch sketch
When turning on/off from the portal it reacts correctly.
Make sure your browser cache is cleared. Portal version is (v2.20.1).
No, in the credentials section I've only one row that contains the only one pairs of app/secret keys
Make sure your onPowerState function returns true
bool onPowerState(const String &deviceId, bool &state) {
return true; // <---
}
https://github.com/sinricpro/esp8266-esp32-sdk/blob/master/examples/Switch/Switch/Switch.ino#L67
@kakopappa i've checked that the portal version is right and the returns true is there. nothing to do
@kakopappa @sivar2311 I've solved creating a new application (new app key and new secret) and creating new device on that application. Now works fine but i don't know why.
Glad that it works now. Then my guess with the access data was (almost) correct. Unfortunately, I can not determine the cause.
@sivar2311 @kakopappa Thanks a lot anyway
Hi, I've recently buyed an ESP8266-12F and i've tried to use this library but it doesn't work anymore. Previously i've made an IOT device whithout any problems (ESP-01), but now after create a device and flashed code by Arduino IDE when i try to set switch on or off Sinric Pro responds me OK with red background and nothing happens. I've tried with my new ESP8266-12F and my old ESP-01 (i'm sure that it works).
Anyone can help me?