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

RestoredeviceState Question #39

Closed marcosmoura91 closed 4 years ago

marcosmoura91 commented 4 years ago

Hello Guys,

I've recently started to port my old projects from sinric to sinric pro and I must say the service works much better and it is much more stable and easier to implement. Back to my question regarding the function restoreDeviceStates.

I've been programming an esp8266 to control my AC unit via IR and the funtion to restore the state works well to restore the ON/OFF state but what about the mode and Setpoint settings ?

Is it possible to enable automatic update temperature and Mode of the thermostat after a restart? It would be great to have the option to set which settings we would like to restore automatically on restart and not just ON/OFF State. Off course I could also just save my settings in the persistence memory. Anyway just a question for you guys. You are doing a great job !

kakopappa commented 4 years ago

Thanks.

The server can push all the settings related to the Thermostat device type as a quick fix. However, setting individual settings you would like to restore automatically might take a little bit of time.

@sivar2311 what do you think?

We will update the server and let you know when it's ready

sivar2311 commented 4 years ago

Sorry for my late response:

Yes of course! I am going with this :) Restore of all available settings just depends on server.

It would be great to have the option to set which settings

This needs a change in communication protocol and handling. This might take a while

kakopappa commented 4 years ago

@marcosmoura91 sorry about the late response.

I have fixed the server now. You should receive the setThermostatMode and targetTemperature commands on startup now.

marcosmoura91 commented 4 years ago

@kakopappa I've Just tried and it is working very well.

Thank you very much !

huseman21 commented 3 years ago

exactly how did you enable the function restoreDeviceStates? I can't figure that out.

sivar2311 commented 3 years ago

Simply write SinricPro.restoreDeviceStates(true); right before SinricPro.begin(APPKEY, APPSECRET); See Full Documentation

GianQuazzo commented 3 years ago

Hi guys,

I'm trying to use the function to restore the state of my AcUnit (SinricPro.restoreDeviceStates (true)), and I correctly received the thermostat mode and the power state on startup, but I don't receive the target temperature :(