Open auchter opened 7 years ago
https://github.com/auchter/haaska/commit/72eb69a41a1847be6b93b13ca2ce6b26e5a7985c
That gets "turn off" and "turn on" working again for media_player
s
Hmm, what voice command did you actually say?
I cannot seem to duplicate this behavior. Are your media players also exposed via the Smart Home Skill as well?
Had to add Alexa.PowerController to the capabilities payload.
endpoint['capabilities'] = [
alexa_interface('Alexa.RemoteVideoPlayer'),
alexa_interface('Alexa.ChannelController'),
alexa_interface('Alexa.PlaybackController'),
alexa_interface('Alexa.PowerController')]
Also pure speculation, but I bet that in the coming weeks we'll see Amazon announce playback and power controls for some manufacturer of smart TV. So we may be getting volume controls soon too. :)
Looks like we also need Alexa.PercentageController for volume:
object 'Alexa' has no attribute 'PercentageController': AttributeError
Traceback (most recent call last):
File "/var/task/haaska.py", line 795, in event_handler
ha, event)
File "/var/task/haaska.py", line 411, in invoke
obj = make_class(allowed)(namespace, name, ha, event)
AttributeError: type object 'Alexa' has no attribute 'PercentageController'
This is awesome!
Looks like it is expecting something different in the response payload, as it seems to be always saying "something went wrong" when I try and issue commands. No errors in the log.
https://github.com/trisk/haaska/commit/a91c04ddf8d7315c629a88de29efa1dc474cf3e9 makes PercentageController function on the HA service call side, but still haven't figured out the response format so I get "I'm not quite sure what went wrong" after completing the command.
Got another one. Traceback (most recent call last): File "/var/task/haaska.py", line 176, in invoke operator.attrgetter(name)(self)() AttributeError: 'PercentageController' object has no attribute 'AdjustPercentage'
Guys, Amazon today released a major update for their Alexa smart home API - will be interested to see how you can use this with Haaska (excellent script BTW).
Fill your boots:
https://github.com/alexa/alexa-smarthome/tree/master/sample_messages
Looks like they're unifying the API that they've created so far and taking steps to enhance features such as querying the state of devices, and from the sounds of it being able to trigger smart home devices via the alexa app with a graphical interface. (that would be nice)
I'm especially interested in the fact that they've broken the thermostat control away from the thermostat sensor, so we may see other "sensor" interfaces coming soon.
Found something interesting while issuing a "turn off" command to a
media_player
device that was exposed via the Video Skill API.Looks like there's a new interface coming:
Alexa.PowerController
, withTurnOn
andTurnOff
methods. Couldn't find any documentation about this, though...