question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

notification sensors (next_alarm, next_timer, next_reminder) do not exist

See original GitHub issue

Describe the bug I’m interested in reacting to timer/alarm firing off on my echo dot, for which I’d like to utilise sensor.media_player_next_alarm sensor.media_player_next_timer sensors, but these entities are non-existent. The only things I am able to see when clicking on the echo dot entity are standby button, volume slider and speaker dropdown.

To Reproduce Steps to reproduce the behavior: N/A

Expected behavior I’d like to have the aforementioned sensors exist and contain values corresponding to next alarm/timer expiration or None as the documentation suggests.

Screenshots N/A

System details

  • Home-assistant (version): 2021.4.6
  • Hassio (Yes/No): No
  • alexa_media: 3.9.0 (installed via HACS)
  • alexapy (version from pip show alexapy or HA startup): 1.25.0
  • not a login issue

Logs

2021-05-02 17:19:44 DEBUG (MainThread) [custom_components.alexa_media] Nothing to import from configuration.yaml, loading from Integrations
2021-05-02 17:19:45 INFO (MainThread) [custom_components.alexa_media]
-------------------------------------------------------------------
alexa_media
Version: 3.9.0
This is a custom component
If you have any issues with this you need to open an issue here:
https://github.com/custom-components/alexa_media_player/issues
-------------------------------------------------------------------
2021-05-02 17:19:45 INFO (MainThread) [custom_components.alexa_media] Loaded alexapy==1.25.0
2021-05-02 17:19:45 DEBUG (MainThread) [custom_components.alexa_media.helpers] s*******s@g*******m: Returning uuid {'uuid': '72a31afd1e68d474229577ad43a9e49a', 'index': 0}
2021-05-02 17:19:46 DEBUG (MainThread) [custom_components.alexa_media.helpers] s*******s@g*******m: Returning uuid {'uuid': '72a31afd1e68d474229577ad43a9e49a', 'index': 0}
2021-05-02 17:19:52 DEBUG (MainThread) [custom_components.alexa_media] Testing login status: {'login_successful': True}
2021-05-02 17:19:52 DEBUG (MainThread) [custom_components.alexa_media] Setting up Alexa devices for s*******s@g*******m
2021-05-02 17:19:52 DEBUG (MainThread) [custom_components.alexa_media] s*******s@g*******m: Websocket created: <alexapy.alexawebsocket.WebsocketEchoClient object at 0xe6a69430>
2021-05-02 17:19:52 DEBUG (MainThread) [custom_components.alexa_media] Testing login status: {'login_successful': True}
2021-05-02 17:19:52 DEBUG (MainThread) [custom_components.alexa_media] Setting up Alexa devices for s*******s@g*******m
2021-05-02 17:19:52 DEBUG (MainThread) [custom_components.alexa_media] s*******s@g*******m: Websocket created: <alexapy.alexawebsocket.WebsocketEchoClient object at 0xe6a690a0>
2021-05-02 17:19:53 DEBUG (MainThread) [custom_components.alexa_media] s*******s@g*******m: Received websocket error #0 <class 'alexapy.aiohttp.streams.EofStream'>: type <class 'str'>
2021-05-02 17:19:53 DEBUG (MainThread) [custom_components.alexa_media] s*******s@g*******m: Websocket closed; reconnect #1 in 10s
2021-05-02 17:19:53 DEBUG (MainThread) [custom_components.alexa_media] s*******s@g*******m: Websocket created: <alexapy.alexawebsocket.WebsocketEchoClient object at 0xea44dfe8>
2021-05-02 17:19:53 DEBUG (MainThread) [custom_components.alexa_media] s*******s@g*******m: Websocket creation failed: Cannot write to closing transport
2021-05-02 17:19:53 DEBUG (MainThread) [custom_components.alexa_media] s*******s@g*******m: Creating coordinator
2021-05-02 17:19:53 DEBUG (MainThread) [custom_components.alexa_media] s*******s@g*******m: Refreshing coordinator
2021-05-02 17:19:53 DEBUG (MainThread) [custom_components.alexa_media] s*******s@g*******m: Websocket successfully connected
2021-05-02 17:19:53 DEBUG (MainThread) [custom_components.alexa_media] s*******s@g*******m: Reusing coordinator
2021-05-02 17:19:53 DEBUG (MainThread) [custom_components.alexa_media] s*******s@g*******m: Refreshing coordinator
2021-05-02 17:19:53 DEBUG (MainThread) [custom_components.alexa_media] Alexa entities have been loaded. Prepared for discovery.
2021-05-02 17:19:53 DEBUG (MainThread) [custom_components.alexa_media] s*******s@g*******m: Found 2 devices, 2 bluetooth
2021-05-02 17:19:54 DEBUG (MainThread) [custom_components.alexa_media] s*******s@g*******m: Websocket successfully connected
2021-05-02 17:19:54 DEBUG (MainThread) [custom_components.alexa_media] s*******s@g*******m: Updated 34 notifications for 2 devices at 2021-05-02 17:19:54.401171+01:00
2021-05-02 17:19:54 DEBUG (MainThread) [custom_components.alexa_media] Alexa entities have been loaded. Prepared for discovery.
2021-05-02 17:19:54 DEBUG (MainThread) [custom_components.alexa_media] s*******s@g*******m: Found 2 devices, 2 bluetooth
2021-05-02 17:19:54 DEBUG (MainThread) [custom_components.alexa_media] s*******s@g*******m: Updated last_called: {'serialNumber': 'G************L96', 'timestamp': 1619972294361, 'summary': 'next one'}
2021-05-02 17:19:54 DEBUG (MainThread) [custom_components.alexa_media] s*******s@g*******m: last_called changed: to {'serialNumber': 'G************L96', 'timestamp': 1619972294361, 'summary': 'next one'}
2021-05-02 17:19:54 DEBUG (MainThread) [custom_components.alexa_media] David's Echo Dot: Locale en-gb timezone Europe/London
2021-05-02 17:19:54 DEBUG (MainThread) [custom_components.alexa_media] David's Echo Dot: DND False
2021-05-02 17:19:54 DEBUG (MainThread) [custom_components.alexa_media] s*******s@g*******m: Existing: [] New: ["David's Echo Dot"]; Filtered out by not being in include: ['This Device'] or in exclude: []
2021-05-02 17:19:54 DEBUG (MainThread) [custom_components.alexa_media] Loading config entry for media_player
2021-05-02 17:19:54 DEBUG (MainThread) [custom_components.alexa_media] Finished fetching alexa_media data in 1.511 seconds
2021-05-02 17:19:54 DEBUG (MainThread) [custom_components.alexa_media] s*******s@g*******m: Updated 34 notifications for 2 devices at 2021-05-02 17:19:54.836063+01:00
2021-05-02 17:19:55 DEBUG (MainThread) [custom_components.alexa_media] s*******s@g*******m: Updated last_called: {'serialNumber': 'G************L96', 'timestamp': 1619972294361, 'summary': 'next one'}
2021-05-02 17:19:55 DEBUG (MainThread) [custom_components.alexa_media] David's Echo Dot: Locale en-gb timezone Europe/London
2021-05-02 17:19:55 DEBUG (MainThread) [custom_components.alexa_media] David's Echo Dot: DND False
2021-05-02 17:19:55 DEBUG (MainThread) [custom_components.alexa_media] s*******s@g*******m: Existing: [] New: ["David's Echo Dot"]; Filtered out by not being in include: ['This Device'] or in exclude: []
2021-05-02 17:19:55 DEBUG (MainThread) [custom_components.alexa_media] Loading config entry for media_player
2021-05-02 17:19:55 DEBUG (MainThread) [custom_components.alexa_media] Finished fetching alexa_media data in 1.075 seconds
2021-05-02 17:19:55 DEBUG (MainThread) [custom_components.alexa_media.media_player] s*******s@g*******m: Refreshing <Entity David's Echo Dot: standby>
2021-05-02 17:19:55 DEBUG (MainThread) [custom_components.alexa_media.media_player] s*******s@g*******m: David's Echo Dot: Last_called check: self: G************L96 reported:
2021-05-02 17:19:55 DEBUG (MainThread) [custom_components.alexa_media.helpers] s*******s@g*******m: Adding [<Entity David's Echo Dot: standby>]
2021-05-02 17:19:55 DEBUG (MainThread) [custom_components.alexa_media.media_player] s*******s@g*******m: Loading notify
2021-05-02 17:19:55 DEBUG (MainThread) [custom_components.alexa_media.media_player] s*******s@g*******m: Loading config entry for switch
2021-05-02 17:19:55 DEBUG (MainThread) [custom_components.alexa_media.media_player] s*******s@g*******m: Loading config entry for sensor
2021-05-02 17:19:55 DEBUG (MainThread) [custom_components.alexa_media.media_player] s*******s@g*******m: Loading config entry for alarm_control_panel
2021-05-02 17:19:55 DEBUG (MainThread) [custom_components.alexa_media.media_player] s*******s@g*******m: Loading config entry for light
2021-05-02 17:19:55 DEBUG (MainThread) [custom_components.alexa_media.switch] s*******s@g*******m: Loading switches
2021-05-02 17:19:55 DEBUG (MainThread) [custom_components.alexa_media.switch] s*******s@g*******m: Found G************L96 dnd switch with status: False
2021-05-02 17:19:55 DEBUG (MainThread) [custom_components.alexa_media.switch] s*******s@g*******m: Found G************L96 shuffle switch with status: False
2021-05-02 17:19:55 DEBUG (MainThread) [custom_components.alexa_media.switch] s*******s@g*******m: Found G************L96 repeat switch with status: False
2021-05-02 17:19:55 DEBUG (MainThread) [custom_components.alexa_media.helpers] s*******s@g*******m: Excluding device: <Entity David's Echo Dot do not disturb switch: off>
2021-05-02 17:19:55 DEBUG (MainThread) [custom_components.alexa_media.helpers] s*******s@g*******m: Excluding device: <Entity David's Echo Dot shuffle switch: off>
2021-05-02 17:19:55 DEBUG (MainThread) [custom_components.alexa_media.helpers] s*******s@g*******m: Excluding device: <Entity David's Echo Dot repeat switch: off>
2021-05-02 17:19:55 DEBUG (MainThread) [custom_components.alexa_media.sensor] s*******s@g*******m: Loading sensors
2021-05-02 17:19:55 DEBUG (MainThread) [custom_components.alexa_media.sensor] s*******s@g*******m: Found G************L96 Alarm sensor (30) with next: None
2021-05-02 17:19:55 DEBUG (MainThread) [custom_components.alexa_media.sensor] s*******s@g*******m: Found G************L96 Timer sensor (3) with next: None
2021-05-02 17:19:55 DEBUG (MainThread) [custom_components.alexa_media.sensor] s*******s@g*******m: Found G************L96 Reminder sensor (1) with next: None
2021-05-02 17:19:55 DEBUG (MainThread) [custom_components.alexa_media.helpers] s*******s@g*******m: Excluding device: <Entity David's Echo Dot next Alarm: None>
2021-05-02 17:19:55 DEBUG (MainThread) [custom_components.alexa_media.helpers] s*******s@g*******m: Excluding device: <Entity David's Echo Dot next Timer: None>
2021-05-02 17:19:55 DEBUG (MainThread) [custom_components.alexa_media.helpers] s*******s@g*******m: Excluding device: <Entity David's Echo Dot next Reminder: None>
2021-05-02 17:19:55 DEBUG (MainThread) [custom_components.alexa_media.helpers] alexa_media.notify.async_get_service: Trying with limit 5 delay 2 catch_exceptions True
2021-05-02 17:19:55 DEBUG (MainThread) [custom_components.alexa_media.helpers] alexa_media.notify.async_get_service: Try: 1/5 after waiting 0 seconds result: <custom_components.alexa_media.notify.AlexaNotificationService object at 0xea303e80>
2021-05-02 17:19:55 DEBUG (MainThread) [custom_components.alexa_media.alarm_control_panel] sammaelus@gmail.com: No Alexa Guard entity found
2021-05-02 17:19:55 DEBUG (MainThread) [custom_components.alexa_media.alarm_control_panel] s*******s@g*******m: Skipping creation of uninitialized device: None
2021-05-02 17:19:55 DEBUG (MainThread) [custom_components.alexa_media] Completing remaining startup tasks.
2021-05-02 17:19:55 DEBUG (MainThread) [custom_components.alexa_media] Completing remaining startup tasks.
2021-05-02 17:20:05 DEBUG (MainThread) [custom_components.alexa_media.media_player] s*******s@g*******m: Refreshing <Entity David's Echo Dot: standby>
2021-05-02 17:20:05 DEBUG (MainThread) [custom_components.alexa_media.media_player] s*******s@g*******m: David's Echo Dot: Last_called check: self: G************L96 reported: G************L96
2021-05-02 17:20:05 DEBUG (MainThread) [custom_components.alexa_media.media_player] s*******s@g*******m: Refreshing notify targets
2021-05-02 17:20:05 DEBUG (MainThread) [custom_components.alexa_media.notify] s*******s@g*******m: Creating last_called target last_called using <Entity David's Echo Dot: standby>
2021-05-02 17:20:05 DEBUG (MainThread) [custom_components.alexa_media.notify] s*******s@g*******m: Creating last_called target last_called using <Entity David's Echo Dot: standby>
2021-05-02 17:20:09 DEBUG (MainThread) [custom_components.alexa_media] s*******s@g*******m: Updated 34 notifications for 2 devices at 2021-05-02 17:20:07.941997+01:00
2021-05-02 17:20:09 DEBUG (MainThread) [custom_components.alexa_media] Refreshing notify targets
2021-05-02 17:20:09 DEBUG (MainThread) [custom_components.alexa_media.notify] s*******s@g*******m: Creating last_called target last_called using <Entity David's Echo Dot: standby>
2021-05-02 17:20:09 DEBUG (MainThread) [custom_components.alexa_media.notify] s*******s@g*******m: Creating last_called target last_called using <Entity David's Echo Dot: standby>
2021-05-02 17:20:09 DEBUG (MainThread) [custom_components.alexa_media] Refreshing notify targets
2021-05-02 17:20:09 DEBUG (MainThread) [custom_components.alexa_media.notify] s*******s@g*******m: Creating last_called target last_called using <Entity David's Echo Dot: standby>
2021-05-02 17:20:09 DEBUG (MainThread) [custom_components.alexa_media.notify] s*******s@g*******m: Creating last_called target last_called using <Entity David's Echo Dot: standby>
2021-05-02 17:20:10 DEBUG (MainThread) [custom_components.alexa_media] s*******s@g*******m: Updated last_called: {'serialNumber': 'G************L96', 'timestamp': 1619972294361, 'summary': 'next one'}
2021-05-02 17:20:10 DEBUG (MainThread) [custom_components.alexa_media] David's Echo Dot: Locale en-gb timezone Europe/London
2021-05-02 17:20:10 DEBUG (MainThread) [custom_components.alexa_media] David's Echo Dot: DND False
2021-05-02 17:20:10 DEBUG (MainThread) [custom_components.alexa_media] s*******s@g*******m: Existing: [<Entity David's Echo Dot: standby>] New: []; Filtered out by not being in include: ['This Device'] or in exclude: []
2021-05-02 17:20:10 DEBUG (MainThread) [custom_components.alexa_media] Finished fetching alexa_media data in 6.611 seconds
2021-05-02 17:20:10 DEBUG (MainThread) [custom_components.alexa_media.media_player] s*******s@g*******m: Changing notify.targets is not supported by HA version < 2021.2.0; using toggle method
2021-05-02 17:20:12 DEBUG (MainThread) [custom_components.alexa_media.notify] s*******s@g*******m: Creating last_called target last_called using <Entity David's Echo Dot: standby>
2021-05-02 17:20:12 DEBUG (MainThread) [custom_components.alexa_media.notify] s*******s@g*******m: Creating last_called target last_called using <Entity David's Echo Dot: standby>
2021-05-02 17:20:13 DEBUG (MainThread) [custom_components.alexa_media.media_player] s*******s@g*******m: Disabling polling for David's Echo Dot

Additional context I only use alexa for TTS and playing sounds and that works no problem.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
thexperimentscommented, May 3, 2021

Ok so I need to remove the include list completely in the config?

As said I have the default config when installing via HACS and configuring via Integrations. I guess this is the most common way to get alexa mediaplayer. Therfore many people will have this problem and I can’t se a way to configure these details via the web UI.

Luckily I know that the config is in /config/.storage/core.config_entries and I can change it manually but this is a bit error prone.

It would be great if these configs are part of the web UI. Or is there any other way to change them I’m not aware of?

BTW: The help you linked is great if you have configured it manually, sadly when you add it via integrations web UI there is nothing in your config.yaml and you need to configure it within the “internal” config in a json file…

1reaction
hyukishicommented, May 7, 2021

I’ll echo @thexperiments sentiments. This is very counterintuitive and obscure to set up especially if you set up via ui, which is supposed to be the easier way.

Can you offer instructions on how to achieve this when configured via ui? How do I “Remove my allow list” ? I can’t see nothing of the like in the ui configuration.

Thanks

edit: I’m getting more confused the more I read the docs. “NOTE: include_devices only loads devices that have been listed and functions like a deny list.What does that even mean?

the relevant section in core.config_entries:

 {
                "entry_id": "4836092992b048b5a6daed01521cc291",
                "version": 1,
                "domain": "alexa_media",
                "title": "Echo Dot",
                "data": {
                    "debug": false,
                    "email": "s***m",
                    "exclude_devices": [],
                    "include_devices": [
                        "David's Echo Dot"
                    ],
                    "password": "***",
                    "scan_interval": 60,
                    "url": "amazon.co.uk",
                    "oauth": {
                        "access_token": ***
                        "refresh_token": ***
                        "expires_in": 1620032590.19631
                    }
                },
                "options": {
                    "queue_delay": 1.5,
                    "extended_entity_discovery": false
                },
                "system_options": {
                    "disable_new_entities": false
                },
                "source": "user",
                "connection_class": "cloud_poll",
                "unique_id": null,
                "disabled_by": null
            },

So, in order to include the David’s Echo Dot, I do need to REMOVE it from the include list? I’m sorry for not being a technical guru I just want my lights to blink when alarm goes off.

edit2: i tried cutting out the block and rebooting HA, but that didn’t do it

                    "include_devices": [
                        "David's Echo Dot"
                    ],

edit3: the sensors appeared after cutting out the "exclude_devices": [], line and restarting HA. I have no understanding why.

Thank you for your edited note at the bottom. My timers haven’t shown up accurately for over a week and deleting that excluded devices line from that file worked.

@alandtse please add the configuration changes for included and excluded devices to the UI Integrations config.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Sensors for next alarm, timer and reminder all show ... - GitHub
Describe the bug The sensors in Home Assistant for the next alarm, timer and reminder all show as unavailable for each of my...
Read more >
Echo Devices (Alexa) as Media Player - Testers Needed
The next sensors only populate with data if there is actually a next alarm, reminder, or timer. Otherwise they are unavailable so you...
Read more >
PRTG Manual: Notification Triggers Settings - Paessler
Although sensors activate notification triggers, you can set notification triggers in the settings of objects that are higher in the object hierarchy.
Read more >
Entry Sensor Notification Questions - SimpliSafe Help Center
With the alarm mode "Off" and the "secret alert" set, I get a push notification that the sensor indicates "open". Is it not...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found