Doesn’t seem to be the cause. Do I need to setup SSL to use haaska?
Yes, you can follow these instructions as haaska is just another skill.
REQUIREMENTS
Amazon requires the endpoint of a skill to be hosted via SSL. Self-signed certificates are ok because our skills will only run in development mode. Read more on our blog about how to set up encryption for Home Assistant. If you are unable to get HTTPS up and running, consider using this AWS Lambda proxy for Alexa skills.
To get started with Alexa skills:
Log in to Amazon developer console
Click the Alexa button at the top of the console
Click the yellow “Add a new skill” button in the top right
Okay, after setting up SSL, (Which broke a lot of other things that I have to fix later) no devices are showing up after discovery
I just upgraded haaska and it couldn’t discover devices. I had to change the config.json so exposed domain are false by default.
I just got this working today and everything seems to be discoverable. I won’t be able to test it with voice till later when I get home.
I used the github files and only modified the config.json file for the IP & password, and the makefile for the “pip” install line to use pip3.
I mostly used the video from @bruhautomation with a little bit of the readme file from github thrown in. It was a little challenging figuring out the changes needed. I had to delete everything (except the logon information) and start over once but in the end, I’m pretty sure it works.
I had to go through all my stuff and hide things that didn’t make sense from haaska and then re-discover everything.
I have a write up of what I did if anyone is interested.
I’d love a write up. I can run the discovery test from Lamda, and it discovers all my devices, but Alexa can’t seem to find them.
Any suggestions?
I just installed haaska a couple of weeks ago and wrote up a procedure.
the existing ones were kind of confusing or outdated.
Thank you! I’ll try it when I get back home.
Hi, Thanks for the steps, I needed to adjust them a bit, the UI has changed. However, I could not get it to work completely. I do not get any Devices discovered. All steps looks like to be OK and everything is OK from the Lambda test function. Can also enable the skills.
Any additional thoughts or where to trace?
Hi, I also messed around with haaska for a while being able to detect devices through Lambda but not the Echo.
Got that sorted by activating payload version 2 (legacy) in the skill itself.
Hi,
I used the instructions here: https://pastebin.com/aucq7sDY and have succesfully linked my haaska skill, but alexa can’t currently see any of my devices.
I have tested in my lamnda and it is encouraging - there is a load of code returned which mentions my lights and groups etc. But when I discover devices in Alexa, no such luck.
When i run “make test” in the CLI I get:
An error occurred (UnrecognizedClientException) when calling the Invoke operation: The security token included in the request is invalid.
Any advice would be appreciated.
The skill test simulator also does not seem to work to show results. For example, I type “Discover Devices” in the skill test area and nothing happens; it can’t find devices, just like my alexa app cannot find devices…
Hm, the only things I can think of that might be relevant are that I am using port 8123 for my HA port, rather than 443, and that when I go to test the skill in section 4 (“Test”) of the skill creation flow, I have to “Select Region Endpoint” and there are no options in the drop down. I think I configured everything OK to only use EU-west-1 (Ireland) though so not sure what that means?
Oh - and one more thing - I was unable to select payload version 2, I can only select payload version 3 since v2 is deprecated! Frustrating.
Hey James,
I can confirm your issue with payload version.
From what I understood, your issue is related to the payload version. I had the same issue before switching to v2, worked well in the test but Alexa didn’t find anything.
Seems I selected v2 just before they deprecated it. If I go into my skill it is still set to use v2 but I can’t switch to v2 if I select v3.
I guess someone needs to adapt the haaska python code to comply with payload v3 in order to get it to work.
Unfortunately I have no clue about that and the project itself seems to be abandonned since it doesn’t even support input numbers which were introduced some time ago, but I could fix that by myself since it was straight forward.
How good are your python skills?
Regards,
eXtatic
I just finished setting up haaska and I can confirm that Payload v2 for the skill can be selected without issue.
I only needed to expose a few switches and a thermostat, and it worked.
Something that helped in my case was tcpdump to monitor the requests coming from the net. On my first try the lambda was able to send requests to HA but the skill was unable to trigger anything, even if supposedly they were linked. I think that got fixed in the second attempt where I changed “pip” to “pip3” in the makefile.
After the second attempt tcpdump was showing the requests triggere by the skill, but nothing was getting discovered. The issue at that point was in config.json: I wanted to expose as little as possible and I thought that “expose_by_default” : false … would only expose the few domains I had whitelisted. Actually I had to turn it back to True for the entities inside the domains to be exposed.
After that, I realized that “make test” and “make discover” allow full testing of the lambda integration with the HA API without involving the skill.
Quite some work to get it up and running but it was worth the effort
Note to self: Now that I set up the original haaska, I realize there is a newer fork that implements v3. Functionality is pretty much the same but the lambda is a lot lighter, it seems to reuse HA’s recent native support for Alexa.
Before I read to the end of your post I was going ask why you were going v2 six months after v3 was out. Guess you just followed the wrong threads
The beauty of v3 is it gives you the same up to date experience as the HA cloud but it’s all yours.
If you can cope with a backwards step, I’d definitely recommend you update.
Pretty much so - I explored a few threads before starting, including this one. This is a challenge for very new users like myself (I became aware of HA’s existance 2 weeks ago). It’s difficult to find where to start - particularly with Alexa + own skill - and there is plenty of outdated/no-longer-applicable advice in threads that are only 6-8 months old :)) . It would really nice to have a sticky thread on the lastest RE Haaska to save other ppl some time.
That said, I’m amazed by how solid, powerful and flexible HA is, plus a great community around it.
Glad to hear your enjoying it, it’s a fantastic time waster
Out of date info is an unfortunate side effect of something that is continually evolving. I’ve learnt the hard way to read everything and pay special attention to the dates. Youtube guides are even worse, they’re often useless almost as soon as they’re posted but at least can give you pointers for more Googling.
So I implemented the new lambda version (it was easy).
Discovery and switches work fine - but I did run in to a little issue with the thermostat (ecobee).
Via the alexa app I an see and set the temperature, no issues. I can also query the temperature setting and that also works.
But when I ask alexa to set the temperature to any value, I get “I am not quite sure what went wrong”, or sometimes “the thermostat is not responding”.
However, the strange thing is that the setting in the thermostat does get changed immediately in every since case, so the command actually works perfectly. But for some reason alexa thinks the transactions are not completing.
I see no errors or warnings in the HA log.
I did not have this problem with the old v2 lambda. Anyone?
Reply to self - there is a bug in HA / alexa (stand-alone alexa and also HA’s own cloud) for thermostats (at least for ecobee), HA sends invalid responses back to amazon