sinricpro / feature-requests

Feature request tracker for Sinric Pro
0 stars 0 forks source link

Thermostat Controller - New Feature #62

Closed amechoul closed 2 months ago

amechoul commented 2 months ago

Hi, I've recently finished a Thermostat project that's perfoming excellent!!! The perfection could be reached if appart from retrieving the last state of the termostat and SetPoint temeperature from Sinric, could retrive the "histeresis" variable also. This variable is not contemplated on the model.

When I mean Histeresis is a veriable that controls when to start or stop the heater whithin a temperature windows. For example in my code (I put down this) the variable "margen" is what I use to calculate when to heat or not, this variable can be modified in other part of code according to expected behaviour. Thanking in advance for your time and dedication!!!!!!

`// funcion para el calculo de la histeresis void Histeresis() {

if(globalThermostatMode !="OFF" && globalPowerState) { //estoy prendido y en modo que debo calentar si debo if (temperatura <= (globalTargetTemp - margen)) { Calentando = true; // quemador encendido digitalWrite(RELAY, LOW); // prendo el led y calefactor } if (temperatura >= (globalTargetTemp + margen)) { Calentando = false; // quemador apagado digitalWrite(RELAY, HIGH); // apago el led y calefactor } } else { // estoy o apagado o modo off asi que no debo calentar nunca Calentando = false; // quemador apagado digitalWrite(RELAY, HIGH); // apago el relay }

}`

kakopappa commented 2 months ago

You` can set the restore state to true. When the device connects to the server, the server will restore the device state (sends power state command with the last known value in the server)

SinricPro.restoreDeviceStates(true); // Uncomment to restore the last known state from the server.

You can store the state in the preferences and do whatever you want as well.

amechoul commented 2 months ago

Yes, the Device State and the Target temperature are restored correctly. My request is to add a third variable that can be stored and retrived on "SinricPro.restoreDeviceStates" type float that is the histeresis window control. That's my request. Thanks for your soon response.

On jueves, 2 de may de 2024, 10:53, wrote:

You can set the restore state to true. When the device connects to the server, the server will restore the device state (sends power state command with the last known value in the server) ‘SinricPro.restoreDeviceStates(true); // Uncomment to restore the last known state from the server.’ You can store the state in the preferences and do whatever you want — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID:

sivar2311 commented 2 months ago

Usually such hysteresis range should be constant. But if you want to have an additional variable: That's exactly what custom devices are for! Create a custom device, set type to "Thermostat", add

amechoul commented 2 months ago

Thank you very much. This was my first thought. Not the best one cos custom thermostat is not compatible with Google Home, but is a workarround. Hope Google become compatible with custom asap.

Thanks again!!!!!!!!!!

On jueves, 2 de may de 2024, 13:14, wrote:

Usually such hysteresis range should be constant. But if you want to have an additional variable: That's exactly what custom devices are for! Create a custom device, set type to "Thermostat", add Thermostat Temperaturesensor and a RangeValue for your hysteresis variable —You are receiving this because you authored the thread.Message ID:

kakopappa commented 2 months ago

waiting for the Google to deliver "Other" device type to support this feature. https://issuetracker.google.com/issues/260550360