Aircoookie / Espalexa

Alexa voice control for ESP8266/ESP32 (including brightness and color!)
MIT License
541 stars 134 forks source link

it's possible to create a thermostat with this library? #199

Open TERM4X opened 2 years ago

TERM4X commented 2 years ago

there's a way to make the alexa sees the ESP as a thermostat device?

Aircoookie commented 2 years ago

Only lights, however Alexa will still understand "set to x degrees" and set the device % accordingly. You can use espalexaDevice->getDegrees() to use this in your code.

dfjose commented 2 years ago

how difficult could it be, to create a different device from lights, controller type devices. for those devices (thermostat, temperature, etc) that only read percentage from a local webserver?

TERM4X commented 2 years ago

Only lights, however Alexa will still understand "set to x degrees" and set the device % accordingly. You can use espalexaDevice->getDegrees() to use this in your code.

So there's not a way to have a thermostat interface in the alexa app?

TERM4X commented 2 years ago

I'm really trying to make my home a smart-home with only the use of a esp and a arduino, but I'm having a lot of macro problem like this one

Aircoookie commented 2 years ago

So there's not a way to have a thermostat interface in the alexa app?

True unfortunately. Espalexa uses the legacy local Philips hue API, which by definition only supports lights (and technically on/off switches, though that doesn't work well either)

TERM4X commented 2 years ago

there's the possibility to create a device without the On/off command but just a slider?

Aircoookie commented 2 years ago

no

dfjose commented 2 years ago

but Philips hue api use /resource/homekit. you can implement it ...?

TERM4X commented 2 years ago

so if somebody turn off my themostat the degrees will go to 0?

ScaredyCat commented 1 year ago

You can guard against that by having your code ignore values below, say, 6 degrees - as an anti-freezing measure. You can do the same for values that are too high as well. ie have some max/min acceptable values. If you don't send back the acknowledgement then alexa will assume the command did not get carried out (which is what you want) and so would set the value back to what it was. If you set the value to 6 if someone tries to set it to 0 then respond with "I've set it to 6" alexa (and the app should reflect that.)

DarrianW commented 9 months ago

Is there anyway to have or modify the percentage on the alexa side to go above 120% i'm doing a similar temp project to control a tank heater and it needs to go to 122 degrees but it says it's out of bounds.