sinricpro / esp8266-esp32-sdk

Library for https://sinric.pro - simple way to connect your device to Alexa, Google Home, SmartThings and cloud
https://sinric.pro
Other
236 stars 125 forks source link

error in sinric pro switch code #163

Closed Avika01 closed 3 years ago

Avika01 commented 3 years ago

I got this error while compiling the switch code please, help me

Arduino: 1.8.13 (Windows Store 1.8.42.0) (Windows 10), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, Flash, Legacy (new can return nullptr), All SSL ciphers (most compatible), 4MB (FS:2MB OTA:~1019KB), 2, v2 Lower Memory, Disabled, None, Only Sketch, 115200"

In file included from C:\Users\DELL\Documents\Arduino\libraries\SinricPro\src/SinricProSwitch.h:11:0,

             from C:\Users\DELL\AppData\Local\Temp\arduino_modified_sketch_794323\Switch.ino:35:

C:\Users\DELL\Documents\Arduino\libraries\SinricPro\src/SinricProDevice.h: In function 'void handleButtonPress()':

C:\Users\DELL\Documents\Arduino\libraries\SinricPro\src/SinricProDevice.h:61:10: error: 'virtual DeviceId SinricProDevice::getDeviceId()' is protected

DeviceId SinricProDevice::getDeviceId() {

      ^

Switch:84:94: error: within this context

 Serial.printf("Device %s turned %s (manually via flashbutton)\r\n", mySwitch.getDeviceId().toString().c_str(), myPowerState?"on":"off");

                                                                                          ^

exit status 1

within this context

This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.

sivar2311 commented 3 years ago

Which SDK Version do you use?

Avika01 commented 3 years ago

esp8266

sivar2311 commented 3 years ago

No, i mean SinricPro Library Version ;)

Please use latest master branch from github (2.9.1). This issue is fixed in 2.9.1 but not marked as release yet (2.9.2 will be released soon).

changelog.md

Avika01 commented 3 years ago

image

Avika01 commented 3 years ago

I used latest version but same error occur again.

kakopappa commented 3 years ago

Delete this line

On Fri, 19 Mar 2021 at 7:23 PM Avika01 @.***> wrote:

I used latest version but same error occur again.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/sinricpro/esp8266-esp32-sdk/issues/163#issuecomment-802796006, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABZAZZSUZCCU4O7JYNDCQITTEM637ANCNFSM4ZOVDJMA .

sivar2311 commented 3 years ago

Latest version from Arduino Library Manager is different to master branch at github. Which version do you use exactly ?

sivar2311 commented 3 years ago

Version 2.9.2 has been released now. Should be available via Arduino Library Manager in a few hours.

Avika01 commented 3 years ago

Thank you @sivar2311 and kakopappa I understand

sivar2311 commented 3 years ago

Version 2.9.2 is available now. image

Avika01 commented 3 years ago

Thank you sir

Fayaz72 commented 2 years ago

In file included from e:\mine\New folder (2)\libraries\SinricPro\src/SinricPro.h:12, from C:\Users\Shaik Fayaz\Downloads\Code_NodeMCU_Google_Alexa_SinricPro_4Relay_Switch\Code_NodeMCU_Google_Alexa_SinricPro_4Relay_Switch\Code_NodeMCU_Google_Alexa_SinricPro_4Relay_Switch.ino:38: e:\mine\New folder (2)\libraries\SinricPro\src/SinricProWebsocket.h:18:10: fatal error: WebSocketsClient.h: No such file or directory 18 | #include | ^~~~~~~~ compilation terminated.

exit status 1

Compilation error: exit status 1 please help me out

sivar2311 commented 2 years ago

@Fayaz72

WebSocketsClient.h: No such file or directory

It looks like you missed to install the websockets library. Please check dependencies section in readme.