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

AdjustVolumeCallback does not support "volumeDefault" #105

Closed MacSass closed 3 years ago

MacSass commented 3 years ago

Hi, I´m moving from Sinric to Sinric.pro currently and encountered a small issue with the functionality to adjust the volume of my TV.

When the user states "Alexa increase volume of TV" instead of "Alexa increase volume of TV by 5" then Alexa forwards a default value of 10 to Sincric. Alexa also does set a property of "volumeDefault" (true if no value given, false if fixed value given), but this property is not available in Sinric.Pro api callback.

Documentation here: https://developer.amazon.com/en-US/docs/alexa/device-apis/alexa-speaker.html

Right now I´m using a very weak workaround, that if th increase / decrease has a value of +10/-10, then I assume that the user did not provide a volume.

Can this "volumeDefault" property be added to the AdjustVolumeCallback please?

Regards - MacSass

sivar2311 commented 3 years ago

Hi MacSass,

thanks for the suggestion. This must also be implemented by the SinricPro server. Btw: "Moin" aus Hamburg! ;)

@kakopappa : What do you think about implementing alexa's "volumeDefault" ?

kakopappa commented 3 years ago

@sivar2311 production server has updated. please check

MacSass commented 3 years ago

Wow, you guys are fast! @kakopappa : Does that mean the backend is already prepared and now "only" the API still needs to be updated? @sivar2311 : Would you be the one to do that?

Btw: Kölle Alaaf aus dem Rheinland ;-)

sivar2311 commented 3 years ago

"Only"...server changes is much more easier than sdk changes. TV device must changed too... documentation... examples... etc etc... ;o) But first test looks good. 2.7.4 will be available in a few minutes...

sivar2311 commented 3 years ago

2.7.4 is out now...

MacSass commented 3 years ago

Wow, guess that could be called "fast" support :-) - great news, spares me from having to code my "workaround" ...thanks for this,

I´ll report back once the new release shows up on PlatformIO for update and I tested it (most likely only tomorrow from my side).

Thanks again - MacSass

MacSass commented 3 years ago

New version showed up on PlatformIO today - all seems to work fine as expected.

Thanks for the fast support - this simplifies my coding a lot.

Regards - MacSass