Home Assistant Cloud Alternatives

FWIW, I ended up trying to do this on my own from scratch, but instead of using the haaska/HA cloud approach of automatically mapping certain types of HA entities to certain types of Alexa interfaces, I decided to use AppDaemon instead and let the user decide what exactly to expose to the Alexa Smart Home Skill. The main advantage to this is that I could use some Alexa interfaces like ChannelController that don’t natively map to any HA entities but can very easily correspond to an AppDaemon app. The second big advantage is that all the message processing happens locally in AppDaemon instead of in the lambda function (which just dumbly forwards requests and patiently waits for responses to dumbly forward back to the Alexa Cloud), which makes testing a hell of a lot easier. The obvious disadvantages are that users will have to install AppDaemon, know python to configure things themselves, and familiarize themselves with the Alexa Smart Home API, but the tradeoff is that it’s way more flexible and powerful. I think down the line it would be relatively easy to automatically map HA entities to Alexa interfaces, but that can be done later.

Anyway, I’m pretty much done, but frankly a lot of the issues seem to be caused by how flaky the Alexa Smart Home Skill infrastructure actually is. I’m able to parse a message, execute the corresponding command, and send a response, but more often than not, the Alexa cloud doesn’t like the response for some reason and Alexa will say something along the lines of " isn’t responding". Worse, there’s no way to tell why the Alexa cloud doesn’t accept the responses, which is absolutely unacceptable. The documentation and samples are often just plain wrong or contradictory, and the actual dev support on their forums is pretty much non-existent. Here are some examples of things that just don’t work:

  • Alexa can recognize “set thermostat to heat” but cannot recognize “set thermostat to 70”, which is exactly what the documentation says should work.
  • For entertainment skills, the Alexa cloud refuses to accept responses to operations that contain the actual data with what changed. For example, when turning off an entity, the Alexa cloud expects a response that includes the new state of the entity (eg, off), but it only accepts the response if the state is not included!
  • Entertainment interfaces have a different version (1.0) than all other interfaces (3, not 3.0) for discovery only. This difference isn’t explicitly noted anywhere. And yes, the “.0” of 1.0 actually matters!

That’s just a few of the problems I’ve run into.

Until I’m able to get things to work end-to-end properly, I don’t think I’ll be releasing it, but just a heads up for those who are trying to get things to work.

1 Like

Have you tried using ”set thermostat to 70 degrees”, that’s what I have to say for my Hive thermostat which uses the Alexa smart home skill and is 100% reliable.

ditto with my nest

Yes, that works for me, but I’m just pointing out that the documentation is often wrong for even dumb things like that.

Maybe because you need to say Celcius, Fahrenheit or Kelvin they left out on the example intentionally.

If you read the all page you linked you see they mention everywhere else that the temperature.scale is a required payload and is included on the example requests.

Nope. You just need to say degrees to Alexa. That does the trick. No need to specify the scale when speaking to Alexa.

Field:temperature.scale

Description:Indicates the temperature scale for the temperature value. Supported values: “CELSIUS”, “FAHRENHEIT” or “KELVIN”

Type:string

Required:Yes

This information on the documentation you have linked

PS: Yes degrees does the trick because in the Celsius scale, Degrees Celsius are the unit

Sorry, there’s something lost in communication here.

When physically speaking to Alexa, only “Alexa, set thermostat to 20 degrees works”. The documentation says physically speaking “Alexa, set thermostat to 20” should work (it’s the second paragraph in the SetTargetTemperature section, right before the "Example single mode request), but it does not. I’m well aware that messages passed between the Alexa Cloud and the device cloud require a temperature.scale value as part of the message payload, and I’m not disputing that the documentation doesn’t say that.

That’s why I first wrote:

I still think the example is correct you just need to say: “Alexa, set thermostat to 20” and add your scale unit since that 20 can mean different temperatures on each scale.

If you really think about it it makes a lot of sense. Imagine you being used all your life at Celsius and visit someone with an Alexa programmed only in Fahrenheit and the wall screen also, you had to open your phone to convert Celsius to Fahrenheit all the time you wanted to changed the temperature.
This way I can just say to Alexa “Alexa, set thermostat to 20” degrees and the owners can still say “Alexa, set thermostat to 60” Fahrenheit.

I understand where you got misleaded but the documentation is not a 1 line sentence and sometimes you have to read it a little longer :stuck_out_tongue:

For anyone still following this thread, Mike Grant has been doing a lot of work and has a mostly running V3 branch.

This is made easier by the fact that there was some work done to expose a payload compatible with Alexa through the HTTP endpoint in 0.62.

The instructions aren’t complete yet, but you can look at https://github.com/mike-grant/haaska/tree/v3 for some details, and on the original haaska repo as well: https://github.com/auchter/haaska/pull/109

3 Likes

yeah… i have been watching the threads myself and happy to see the progress. unfortunately I haven’t try it myself because of some issues I have with HA 0.62.

Hi all,
Checking in again. No need to use the specific V3 branch, everything is committed to the master now.

Get it while it’s hot:

5 Likes

I can confirm Haaska by mike-grant is the best alternative to HA Cloud. It works exactly like the cloud component.

1 Like

Hello,

I followed all the steps and could successfully add the app to my account. In the lamda function test I get my devices back. But when I start a search in the alexa app no new devices will be found. Does someone know why?

Daranto

@daranto Hrm. You said you do get the devices back in the Lambda test? When you scroll through, it shows you a list of things that match up from Home Assistant?

Yes. Here is the response from the test:

{
  "event": {
    "header": {
      "messageId": "ee15f93c-a465-420d-a0a3-5c28bb9b43b4",
      "name": "Discover.Response",
      "namespace": "Alexa.Discovery",
      "payloadVersion": "3"
    },
    "payload": {
      "endpoints": [
        {
          "additionalApplianceDetails": {},
          "capabilities": [
            {
              "interface": "Alexa.PowerController",
              "properties": {
                "proactivelyReported": false,
                "retrievable": true,
                "supported": [
                  {
                    "name": "powerState"
                  }
                ]
              },
              "type": "AlexaInterface",
              "version": "3"
            }
          ],
          "description": "input_boolean.motion_disabled",
          "displayCategories": [
            "OTHER"
          ],
          "endpointId": "input_boolean#motion_disabled",
          "friendlyName": "Bewegunsmelder deaktiviert",
          "manufacturerName": "Home Assistant"
        },
        {
          "additionalApplianceDetails": {},
          "capabilities": [
            {
              "interface": "Alexa.SceneController",
              "properties": {
                "proactivelyReported": false,
                "retrievable": false,
                "supported": []
              },
              "supportsDeactivation": true,
              "type": "AlexaInterface",
              "version": "3"
            }
          ],
          "description": "script.ventilator_timer_stufe_1",
          "displayCategories": [
            "ACTIVITY_TRIGGER"
          ],
          "endpointId": "script#ventilator_timer_stufe_1",
          "friendlyName": "Ventilator Timer Stufe 1",
          "manufacturerName": "Home Assistant"
        },
        {
          "additionalApplianceDetails": {},
          "capabilities": [
            {
              "interface": "Alexa.SceneController",
              "properties": {
                "proactivelyReported": false,
                "retrievable": false,
                "supported": []
              },
              "supportsDeactivation": false,
              "type": "AlexaInterface",
              "version": "3"
            }
          ],
          "description": "script.timed_nachtlicht",
          "displayCategories": [
            "ACTIVITY_TRIGGER"
          ],
          "endpointId": "script#timed_nachtlicht",
          "friendlyName": "Nachttisch 5 Minuten an",
          "manufacturerName": "Home Assistant"
        },
        {
          "additionalApplianceDetails": {},
          "capabilities": [
            {
              "interface": "Alexa.PowerController",
              "properties": {
                "proactivelyReported": false,
                "retrievable": true,
                "supported": [
                  {
                    "name": "powerState"
                  }
                ]
              },
              "type": "AlexaInterface",
              "version": "3"
            }
          ],
          "description": "switch.krimmer_kerzen",
          "displayCategories": [
            "SWITCH"
          ],
          "endpointId": "switch#krimmer_kerzen",
          "friendlyName": "Krimmer Kerzen",
          "manufacturerName": "Home Assistant"
        },
        {
          "additionalApplianceDetails": {},
          "capabilities": [
            {
              "interface": "Alexa.PowerController",
              "properties": {
                "proactivelyReported": false,
                "retrievable": true,
                "supported": [
                  {
                    "name": "powerState"
                  }
                ]
              },
              "type": "AlexaInterface",
              "version": "3"
            }
          ],
          "description": "switch.garten2",
          "displayCategories": [
            "SWITCH"
          ],
          "endpointId": "switch#garten2",
          "friendlyName": "Garten Steckdose 2",
          "manufacturerName": "Home Assistant"
        },
        {
          "additionalApplianceDetails": {},
          "capabilities": [
            {
              "interface": "Alexa.PowerController",
              "properties": {
                "proactivelyReported": false,
                "retrievable": true,
                "supported": [
                  {
                    "name": "powerState"
                  }
                ]
              },
              "type": "AlexaInterface",
              "version": "3"
            }
          ],
          "description": "switch.vitrine",
          "displayCategories": [
            "SWITCH"
          ],
          "endpointId": "switch#vitrine",
          "friendlyName": "Vitrine",
          "manufacturerName": "Home Assistant"
        }
      ]
    }
  }
}

You may have already done all this, but my skill didn’t show up in the Alexa app until I had completely filled out the publishing tab. Once i did that, all the checks on the left side were green, and on the Test tab, the 'Start testing this skill; checkbox could be switched to yes.

Hey,

thanks for your answer. Its all green and I could succesfully add the skill to my amazon. But its not finding any new devices:

Daranto

I’m sure I’ve just misunderstood something but on the github page it says http can now be used but you still have to put HA’s external address in the setup implying you’d have to expose HA insecurely to use it?

@daranto I’m not quite sure what could be happening… If you get your devices back from the test function, then Alexa should be getting all those devices when the discovery happens. The test function is exactly a discovery message.

Are you sure the skill shows up as enabled in your Alexa app? If it’s enabled, when you go to select the skill, it should show a “Disable Skill” button, not “Enable”.

If you have any other Smart Home skills attached, you might want to try temporarily disabling them, removing all devices from the Smart Home area (must be done on a computer), and try just discovering with the Haaska skill.