Sensors Return Status via Alexa?

Hi all,

I just got my first z-wave device, a Schlage Connect door lock. It works very well through my Wink 2.

I was happily surprised when I asked Alexa “What is the status of front door” and Alexa told me it was locked. None of my other devices (Insteon switches, Caseta switches, Cree light bulbs, etc) will return the status.

Is this a standard z-wave function or is it specific to the door lock? If I get more z-wave sensors can I query their status too? if it is standard I will have to buy only z-wave devices from now on.

TIA

Steven

1 Like

I am sure you already saw this but you can create a custom skill with alexa to return any state from HA back to Alexa including sensors, switches, location, temperatures, google events, etc

1 Like

@stevendom57 Once you have the custom skills figured out (posted above), you can pull in any sensor value, and have alexa read it back to you. I’ve done this with a handful of sensors in my install, here’s the config if your interested.

1 Like

Which zwave hub are you using?

Schlage has support in Alexa.
For this reason Alexa can directly report state
“Alexa, what is front door state” or similar works

You can create custom skill for Alexa for all sensors and to control any switch, but in this case command will change
“Alexa, ask Homeassistant to turn on light” works. You must tell Alexa to ask the skill for information or to perform action.

EDIT:
Just noticed you use wink.
Wink and Samsung Smarthings hub allow Alexa to control supported devices, like your lock, directly

I use several modified home assistant skills for Alexa but I changed the invocation from “home assistant” to “me the location” and “me the status”. I added intents like “of User1” or “of Garage door” or “of all open sensors”. I can now say the following which works great.

Alexa, tell me the location of User1

or

Alexa, tell me the status of Garage door

Great idea! Seems obvious after you mention it
Thank you

These are all great ideas. I guess I will have to break down and learn Alexa skills. Any more tips will be greatly appreciated.

Anyone else having trouble on 0.43 with Alexa not passing the correct parameters?

Your link isn’t working … I have just started using Home Assistant and have shelved my SmartThings and Hue hubs but miss a skill that I use to have that ran on groovy that SmartThings will know longer be supporting. The skill was Ask Alexa. The skill enabled me to get the status of devices. It was really nice to be able to say “Alexa, ask the house for house status” and have her tell me what lights or devices that I forgot to turn off. I use to use this all the time when I went to bed and it was nice to ask the dot in my bedroom instead of having to get out of bed and go around the house to find what lights or devices I left on. I had Ask Alexa set to just tell me the names of the devices that were on.

Example: ME: “Alexa, Ask the house for status” … Echo: “the living room light is on, the tv is on,
the porch fan is on, the kitchen light is on, the security tv is on.”

Hey, I’m sorry the link isn’t working anymore, that was 6 years ago, Home Assistant has changed a lot since then, it might be worthwhile to find a more modern way of accomplishing this. If you think it’s helpful, I’ll see if I can dig out my old config, let me know!

Thank you for responding! … You would think that after all this time there would be a documented way to achieve what I would like to do but after an extensive search I have come to the conclusion that there is not, so any help like your old config ‘if you still had it’ would be greatly appreciated.

Yea no worries, guess I’ve been around for a minute!
That’s so weird that the old methods aren’t documented anymore; anyways, dug around in my old home git server and found an old alexa config, hope this helps.

Gonna take some work to get this integrated again, but here’s what I found.

in your configuration.yaml I had the following defined:

# Alexa
alexa:

# Include Folders
# alexa: !include_dir_merge_list alexa

in the folder alexa I had the following file:

# Alexa

# Locate Intent
    LocateIntent:
      speech:
        type: plaintext
        text: >
          {% if is_state('device_tracker.jon_iphone', 'home') %} 
            He's at home.
          {% else %}
            He's not home.
          {% endif %}          

# Temperature Sensors
    LivingroomTemp:
      speech:
        type: plaintext
        text: >
                    The livingroom temperature is {{ states.sensor.livingroom_temperature.state|round }} degrees, but it feels like {{ states.sensor.livingroom_heatindex.state|round }}.
    OfficeTemp:
      speech:
        type: plaintext
        text: >
                    The office temperature is {{ states.sensor.office_temperature.state|round }} degrees, but it feels like {{ states.sensor.office_heatindex.state|round }}.
    BedroomTemp:
      speech:
        type: plaintext
        text: >
                    The bedroom temperature is {{ states.sensor.bedroom_temperature.state|round }} degrees, but it feels like {{ states.sensor.bedroom_heatindex.state|round }}.

# Security Report
    SecurityReport:
      speech:
        type: plaintext
        text: >
          {% if is_state('switch.front_dooropened', 'on') %}
            The front door is open.
          {% elif is_state('switch.patio_dooropened', 'on') %}
            The patio door is open.
          {% elif is_state('switch.motionsensor', 'on') %}
            Motion detected in the living room.
          {% elif is_state('binary_sensor.aeotec_zw100_multisensor_6_sensor_4_0', 'on') %}
            Motion detected on the patio.
          {% elif is_state('switch.front_dooropened', 'off') and
                  is_state('switch.patio_dooropened', 'off') and
                  is_state('switch.motionsensor', 'off') and
                  is_state('binary_sensor.aeotec_zw100_multisensor_6_sensor_4_0', 'off') %}
            The house is secure.
          {% endif %}          

# Weather Forcast
    WeatherForcast:
      speech:
        type: plaintext
        text: >
                        Currently it's {{ states.sensor.dark_sky_apparent_temperature.state | round(0) }} degrees, and {{ states.sensor.dark_sky_minutely_summary.state }}. Later, you should expect {{ states.sensor.dark_sky_hourly_summary.state }}.
    WeatherJacket:
      speech:
        type: plaintext
        text: >
          {% if states('sensor.dark_sky_apparent_temperature') | float < 45 %}
            Yes you do, it's currently {{ states.sensor.dark_sky_apparent_temperature.state | round(0) }} degrees. 
          {% elif states('sensor.dark_sky_apparent_temperature') | float > 50 %}
            Maybe, it's currently {{ states.sensor.dark_sky_apparent_temperature.state | round(0) }} degrees.
          {% elif states('sensor.dark_sky_apparent_temperature') | float > 60 %}
            No, you should be good, it's currently {{ states.sensor.dark_sky_apparent_temperature.state | round(0) }} degrees.
          {% endif %}          

Obviously there’s some custom stuff in there, but hopefully ya get the idea.
Couldn’t for the life of me remember the amazon AWS side of things, you had to make a custom skill, and define all your intents, which linked to the intents above. Unless it’s been archived, I’d imagine you could probably search the forum for alexa intents and get closer. Best of luck!

1 Like

I’d start digging around in this tag you might get lucky!

So in the configuration.yaml add line: alexa: and alexa: !include_dir_merge_list alexa
Then create a yaml file called alexa in the same folder that the configuration.yaml is in and add something like the following to that file.

Lights Intent

LightsIntent:
  speech:
    type: plaintext
    text: >
      {% if is_state('light.signify_netherlands_b_v_lct014_huelight', 'on') %} 
        Front Yard Light One is on.
      {% if is_state('light.signify_netherlands_b_v_lca002_huelight_3', 'on') %} 
        Reading Lamp is on.
      {% if is_state('switch.smartthings_outletv4_switch', 'on') %} 
        Porch Fan is on.
      {% endif %}   

And have a custom skill setup using amazon AWS.

Do I also use Amazon Developer when creating this skill?
If you have any links that could help me with the AWS setup that would be very helpful if not I will try to find something that will get me moving in the right direction.

Sort of…

your configuration.yaml should contain the following:

alexa:

or

alexa: !include_dir_merge_list alexa

^^^ is looking for a directory containing files, like such: alexa/foo.yaml
so foo.yaml and all other files in the alexa directory would be appended underneath the alexa: directive in configuration.yaml. It’s basically a way of including several lengthy files and not making a disaster of our configuration.yaml. (that’s what that !include_dir_merge_list tag does).

As for the AWS part, it’s been way too long- you might want to ask around Discord and see if there’s some guys on there that remember how to set it up. Basically you’re making a custom skill for Alexa; there used to be a guide, which is why I didn’t bother documenting it. :frowning:

Looks like archive.org saved the day! Here’s the old document on how to setup the skill! No idea if it still works, but it’s worth a shot!