Overview:
Many Home Assistant users who serve local media to Sonos speakers will see repeated persistent notifications like:
Login attempt failed
Login attempt or request with invalid authentication fromsonoszp.lan
(192.168.86.x). See the log for details.
These notifications are generated by HA’s HTTP ban system whenever Sonos polls a /media/local/...
URL without a valid auth token. They clutter the notification tray, flood the logs hourly, and—despite not affecting playback—become a persistent nuisance.
Symptoms
- Persistent notification with ID
http_login
every time a Sonos device requests a media URL without a valid token - Hourly log spam from
homeassistant.components.http.ban
and occasional “Updating sonos switch took longer than…” warnings - Devices continue to function, but the UI and logs remain cluttered
Steps Tried (so far, none fully suppressed the notices)
- Disable IP banning
http:
use_x_forwarded_for: true
trusted_proxies:
- 192.168.86.0/24
- 172.17.0.0/16
ip_ban_enabled: false
2.Expected:* No more ban-related notifications.
3.Result:* Notifications continued to appear.
4. Event-based automation to auto-dismiss http_login
notices
- id: suppress_sonos_http_login
alias: Suppress Sonos HTTP Login Failures
trigger:
- platform: event
event_type: persistent_notification_created
event_data:
notification_id: http_login
condition:
- condition: template
value_template: >
{{ 'sonoszp.lan' in trigger.event.data.message }}
action:
- service: persistent_notification.dismiss
data:
notification_id: http_login
5.Expected:* Notifications get dismissed immediately.
6.Result:* Still seeing the “Login attempt failed” banner.
7. Silence the logger for HTTP bans
logger:
default: warning
logs:
homeassistant.components.http.ban: critical
8.Expected:* No more ERROR-level ban messages in log.
9.Result:* Log entries persist.
Current Status & Next Steps
Despite trying all three approaches—disabling IP bans, catching and dismissing the notification by event, and raising the logger threshold—the Sonos-triggered http_login
persistent notifications and log entries remain.
Call for input:
- Has anyone found a reliably working method to suppress these Sonos HTTP-login notifications?
- Could this indicate a change in HA’s notification or banning behavior in recent builds?
Your insights or confirmation of a bug would be greatly appreciated!