Echo Devices (Alexa) as Media Player - Testers Needed

Does the wrong echo have a simon says “the current temp is …” wrong temp, or does it show the right temp but the echo speaks the wrong temp. Is the temp always 32? Is the sensor a true sensor or a template sensor? If you ask it several times in a row, does it always speak the wrong temp? Have the other echos ever read the wrong temp? Is your sensor a MQTT sensor? If you look at the sensor is it always reporting the correct temp? Just a bunch of random questions to try to figure this out

yes, the simon says is the wrong temp on that echo, it’s always 32 and it’s a template sensor (converting metric to imperial from my actual sensor). No matter how many times I ask, it’s always 32, and the other echo’s are always correct. No, it’s not an MQTT sensor, it’s a Sonoff TH10 integrated through the eWelink custom component, and it’s always reporting the correct temperature when I look at the entities list, or the temperature gauge I have set up on a lovelace card.

The logs are usually in your config directory. The information on enabling debug or advanced debug logging is here.

So weird. Try this. Dont use last alexa sensor. Set it to only report on the “bad” echo, Then use one of the other echos to kick off the routine.

I didn’t get a chance to try that yet, but after asking for the pool temperature through the alexa app on my phone, all my device are reporting 32 degrees now. I checked the status of the actual temperature sensor, and it’s reporting “unknown” for the temperature reading after I start my Alexa routine, and then goes back to normal. I then tried the routine from my bedroom echo and it reported the correct temp, but right after reporting, my entity switched the temperature to “unknown” again for 10 seconds or so and then switched back to the correct temperature.

So I’m getting somewhere. If I wait 15-20 seconds between asking the temperature, it seems to respond correctly on all devices. After the routine runs, my temp sensor loses it’s temp data and displays “unknown” for about 15-20 seconds, and then corrects itself for some reason. I believe it will work fine, as long as I don’t ask it too quickly after already asking it once. I’m not sure why this happens though…

Edit: It’s actually closer to 50-55 seconds for the temperature to refresh after running the routine.

I think you could solve this strange behavior by flashing tasmota and using mqtt. This probably is the best solution for Sonoffs anyway, as you will not be dependent on the chinese servers.

If you want you to stay with ewelink, you already found out that this component is the issue (not alexa). So you probably should ask other users of the ewelink component in another thread if they know that issue.

Yes, that is my plan eventually. Just need to find the time to flash all of my devices. I’m glad I’ve got it figured out anyway, as it presented itself as a strange issue! If I find the refresh period too much of an inconvenience I’ll take it over to the eWelink users, thanks!

I’ve just done another test, and it may not be directly related to the eWelink component after all.

If I trigger the automation to get Alexa to TTS the pool temperature through the entities list, or by manually clicking the button that triggers it, my sensor doesn’t lose any data, and I can trigger the automation as quickly as I want and always get the correct response on my last used echo. If I trigger the automation by speaking to Alexa to start the routine, that’s when the issue arises, and my sensor loses it’s data briefly.

Do you have another temperature sensor in your ha that is not from the ewelink component. Trying another sensor could make it clear if it’s the sensor or tts.

Also you could set up another service in your automation that sends you a notification with the same input as the one you give alexa.

If the notification sensor value and the tts sensor value are not the same then, it’s super strange.

Unfortunately no, this is the only temperature sensor I own. I’m not exactly clear on what you mean in the second part of your comment, but just to clarify my issue: it’s the temperature value of my actual physical temperature sensor that loses its data when I run the Alexa routine, not the template sensor or my TTS message.

The Alexa routine turns a switch on, which is the trigger to start the automation that sends back the temperature as TTS. I’ve just now discovered that I do not have this issue if I manually start the automation, or use an entity button card to turn on the switch that triggers the automation, or turn the switch on from the entities list. If I turn the switch on from within the Alexa app, or use the routine that turns it on, or use the physical button on the switch itself, I lose the temperature data for just under a minute. So now I’m just confused as to where the issue is; I don’t think this thread is the place for it though, so I won’t take up anymore space in here with it. I’ll keep tinkering, or possibly leave it as it is; it’s not like I need to know the pool temperature every 30 seconds lol. Thanks for the help though :slight_smile:

if you want to use random phrases with the new notify layout ive figured it out:

    - id: '1574294269553'
  alias: Say good night
  initial_state: true
  trigger:
    platform: state
    entity_id: light.livingroom_lamp
    to: 'off'
  action:
  - service: notify.alexa_media
    data:
      target: 
        - media_player.living_room
      message: '{{ [ "Good night. " , "Good evening. " , "Sweet dreams. " , "See you
        tomorrow. " , "Have a wonderful night. " , "See you in the morning. " ] |random }}'
      data:
        type: tts

also here it is in normal use in automatons

- id: '1521155845011'
  alias: Front Door Locked Voice
  initial_state: true
  hide_entity: false
  trigger:
  - entity_id: switch.frontdoorlock
    from: 'off'
    platform: state
    to: 'on'
  condition:
  - condition: state
    entity_id: group.all_devices
    state: home
  action:
  - service: notify.alexa_media
    data:
      target: 
        - media_player.kitchen
        - media_player.bedroom
        - media_player.living_room
      message: "Front Door, Has Been Locked"
      data:
        type: tts
1 Like

Really strange it shouldn’t matter which input triggers the automation. Maybe you should open a new thread and post your automation.

@petro what do you think could cause his issue?

anyone managed to fix the Alexa TTS box thing? mine just beeps and ive tried to fix it to the new format but no luck any help?

###################################################### Alexa TTS Box #############################################################################
- id: '1537629413402'
  alias: Alexa TTS
  initial_state: true
  hide_entity: false
  trigger:
    platform: state
    entity_id: input_select.alexa
  action:
  - service: media_player.volume_set
    data_template:
      entity_id: "{% if is_state('input_select.alexa', 'Living Room') %}\n  media_player.living_room\n\
        {% elif is_state('input_select.alexa', 'Master Bedroom') %}\n  media_player.bedroom\n\
        {% elif is_state('input_select.alexa', 'Kitchen') %}\n  media_player.kitchen\n\
        {% elif is_state('input_select.alexa', 'Garage') %}\n  media_player.garage\n\
        {% elif is_state('input_select.alexa', 'Spare Bedroom') %}\n  media_player.spare_bedroom\n\
        {% elif is_state('input_select.alexa', 'Fire Tab') %}\n  media_player.gareths_fire\n\
        {% elif is_state('input_select.alexa', 'None') %}\n  false\n{% endif %}\n"
      volume_level: '{{ states.input_number.alexa_volume.state | float /10 }}'
  - service: notify.alexa_media
    data:
      target: "{% if is_state('input_select.alexa', 'Living Room') %}\n  media_player.living_room\n\
        {% elif is_state('input_select.alexa', 'Master Bedroom') %}\n  media_player.bedroom\n\
        {% elif is_state('input_select.alexa', 'Kitchen') %}\n  media_player.kitchen\n\
        {% elif is_state('input_select.alexa', 'Garage') %}\n  media_player.garage\n\
        {% elif is_state('input_select.alexa', 'Spare Bedroom') %}\n  media_player.spare_bedroom\n\
        {% elif is_state('input_select.alexa', 'Fire Tab') %}\n  media_player.gareths_fire\n\
        {% elif is_state('input_select.alexa', 'None') %}\n  false\n{% endif %}\n"
      message: '{{  states.input_text.alexa_tts.state }}'
      data:
        type: tts
  - delay: 00:00:02
  - service: input_select.select_option
    data:
      entity_id: input_select.alexa
      option: None

What do you mean? If it only beeps maybe it helps do add a delay between volume and tts

Shouldn’t your second action also be ‘data_template’?

it was data template first but i changed it to target to comply with the new notify layout

target: is correct. But the line above that has ‘data:’
I guess that should be ‘data_template’

1 Like

yes you are 100% correct cheers for that :slight_smile:

- service: notify.alexa_media
    data_template:
      target: "{% if is_state('input_select.alexa', 'Living Room') %}\n  media_player.living_room\n\
        {% elif is_state('input_select.alexa', 'Master Bedroom') %}\n  media_player.bedroom\n\
        {% elif is_state('input_select.alexa', 'Kitchen') %}\n  media_player.kitchen\n\
        {% elif is_state('input_select.alexa', 'Garage') %}\n  media_player.garage\n\
        {% elif is_state('input_select.alexa', 'Spare Bedroom') %}\n  media_player.spare_bedroom\n\
        {% elif is_state('input_select.alexa', 'Fire Tab') %}\n  media_player.gareths_fire\n\
        {% elif is_state('input_select.alexa', 'None') %}\n  false\n{% endif %}\n"
      message: '{{  states.input_text.alexa_tts.state }}'
      data:
        type: tts
1 Like

I thought tts was deprecated too.