vintlabs / fauxmoESP

Add voice control of your ESP32 and ESP8266 devices using Amazon Alexa
MIT License
379 stars 70 forks source link

Change name for state value (Enhancement) #117

Closed dpinvidic closed 3 years ago

dpinvidic commented 3 years ago

Thank You for the library. I am using it to control a widow shade, so the "normal" command would be "Shade up/down". I currently use on/off.
Would it be possible to create an enhancement which would allow a user defined command to return the 0/1 state value?

pvint commented 3 years ago

Sadly, we don't have control over that. As far as Alexa is concerned these devices are lights of some sort, so it only responds to certain commands.

However, for your use case, maybe you can use "Alexa lower shade" and "Alexa raise shade"? I just did a quick test with my lights here on my boat, and I think you could have the code respond to these "dim" commands.

dpinvidic commented 3 years ago

HI Paul, Thanks for getting back to me. I understand what you are saying...but don't understand how the "value" parameter is returned.

If I gave thre "lower" commands in a row, what would the returned value be each time?

Regards,

Dan

On Tue, Oct 13, 2020 at 5:10 PM Paul Vint notifications@github.com wrote:

Sadly, we don't have control over that. As far as Alexa is concerned these devices are lights of some sort, so it only responds to certain commands.

However, for your use case, maybe you can use "Alexa lower shade" and "Alexa raise shade"? I just did a quick test with my lights here on my boat, and I think you could have the code respond to these "dim" commands.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/vintlabs/fauxmoESP/issues/117#issuecomment-708075972, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANO76KJBXRCG3EXWL4SMHP3SKTT75ANCNFSM4SP36GLQ .

dpinvidic commented 3 years ago

Hi Paul,

It looks like raise/lower returns 000/255. However, once I issue a raise/lower command, Alexa says the device is not responding when I send the next command. However a on/off command seems to rest the non-response condition.

Do I need to send a value in the onSetState call and then I will get a different value back??

Dan

On Tue, Oct 13, 2020 at 5:10 PM Paul Vint notifications@github.com wrote:

Sadly, we don't have control over that. As far as Alexa is concerned these devices are lights of some sort, so it only responds to certain commands.

However, for your use case, maybe you can use "Alexa lower shade" and "Alexa raise shade"? I just did a quick test with my lights here on my boat, and I think you could have the code respond to these "dim" commands.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/vintlabs/fauxmoESP/issues/117#issuecomment-708075972, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANO76KJBXRCG3EXWL4SMHP3SKTT75ANCNFSM4SP36GLQ .

pvint commented 3 years ago

Hi Dan,

Honestly - off the top of my head I'm not sure. I would have to test and look deeper again to refresh my memory. I likely won't be able to look much for a couple days, but I am interested in this.

In the meantime, if you haven't already, set #define DEBUG_FAUXMO_VERBOSE_TCP true and it may provide more insight

Cheers Paul

dpinvidic commented 3 years ago

Hi Paul,

This is what I found so far. It looks like the intensity is stored somewhere. Repeated commands with different dimming values work fine, and the value is returned with each callback. As long as I use a % value, repealed commands work. and repeated on/off commands work.

the raise/lower commands work AFTER I set a dimming value in one command. But repeated lower commands keep reducing the intensity value until it finally stays at 1.

I think I am stuck with the on/off to get the shades to open/close....which is not too bad...

Let me know if you find a tricky solution for this.

Regards,

Dan

On Tue, Oct 13, 2020 at 7:06 PM Paul Vint notifications@github.com wrote:

Hi Dan,

Honestly - off the top of my head I'm not sure. I would have to test and look deeper again to refresh my memory. I likely won't be able to look much for a couple days, but I am interested in this.

In the meantime, if you haven't already, set #define DEBUG_FAUXMO_VERBOSE_TCP true and it may provide more insight

Cheers Paul

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/vintlabs/fauxmoESP/issues/117#issuecomment-708109081, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANO76KNY6WXN3UIURS4AZHLSKUBRTANCNFSM4SP36GLQ .

Tejas-MD commented 3 years ago

If you only want to lower/raise your shades by 100% each time, you can just create a routine that's triggered by voice in your Alexa app? So you can say 'Lower the shades' which will be a routine that will send an 'on' command to your esp?

dpinvidic commented 3 years ago

I currently use the command shade on or Shades off to raise and lower the shade. I would much rather be able to say shade up or shade down but honor off is usable. Not sure what I need to do to get an up down voice command to work. Thanks for the reply

On Thu, Nov 12, 2020, 12:35 PM Not-Lazy-Dev notifications@github.com wrote:

If you only want to lower/raise your shades by 100% each time, you can just create a routine that's triggered by voice in your Alexa app?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/vintlabs/fauxmoESP/issues/117#issuecomment-726295774, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANO76KKHQI5WUWV6ILEPVFTSPQ2H3ANCNFSM4SP36GLQ .

Tejas-MD commented 3 years ago

I currently use the command shade on or Shades off to raise and lower the shade. I would much rather be able to say shade up or shade down but honor off is usable. Not sure what I need to do to get an up down voice command to work. Thanks for the reply

On Thu, Nov 12, 2020, 12:35 PM Not-Lazy-Dev notifications@github.com wrote:

If you only want to lower/raise your shades by 100% each time, you can just create a routine that's triggered by voice in your Alexa app?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/vintlabs/fauxmoESP/issues/117#issuecomment-726295774, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANO76KKHQI5WUWV6ILEPVFTSPQ2H3ANCNFSM4SP36GLQ .

The answer to your question in short: Create a routine on the Alexa App.

dpinvidic commented 3 years ago

That was a great idea....such a simple solution...Thank You