Skip to content
Signal & Switch
Menu
  • Categories
    • Hardware
    • Home Automation
    • Linux
    • Networking
    • Presence
    • Self-Hosting
  • About
Menu

The Mosquitto Change That Kept Kicking My HASS.Agent Client

Posted on June 10, 2026

Mosquitto is the MQTT broker most people run when they have Home Assistant. HASS.Agent is a Windows app that turns your PC into a sensor node for Home Assistant — via MQTT. When the two stop talking to each other, things get annoying fast.

I have HASS.Agent running on my laptop, configured to send a periodic full-screen screenshot to Home Assistant so I can monitor the current state of the machine from the dashboard. It had been working fine for months.

Then a popup started appearing on my screen every few minutes. MQTT connection lost. Reconnecting. Lost again. I had no idea why.

Looking at the Mosquitto log on my Home Assistant box, the pattern was obvious:

2026-06-10 18:14:46: New connection from 192.168.50.54:52532 on port 1883.
2026-06-10 18:14:46: New client connected from 192.168.50.54:52532 as 25dfc49c (p4, c1, k15, u’muki’).
2026-06-10 18:14:52: Client 25dfc49c [192.168.50.54:52532] disconnected: oversize packet.
2026-06-10 18:14:53: New connection from 192.168.50.54:52533 on port 1883.
2026-06-10 18:14:53: New client connected from 192.168.50.54:52533 as 25dfc49c (p4, c1, k15, u’muki’).
2026-06-10 18:14:53: Client 25dfc49c [192.168.50.54:52533] disconnected: oversize packet.
2026-06-10 18:14:57: New connection from 192.168.50.54:52534 on port 1883.
2026-06-10 18:14:57: New client connected from 192.168.50.54:52534 as 25dfc49c (p4, c1, k15, u’muki’).
2026-06-10 18:15:04: Client 25dfc49c [192.168.50.54:52534] disconnected: oversize packet.
2026-06-10 18:15:05: New connection from 192.168.50.54:52536 on port 1883.
2026-06-10 18:15:05: New client connected from 192.168.50.54:52536 as 25dfc49c (p4, c1, k15, u’muki’).
2026-06-10 18:15:05: Client 25dfc49c [192.168.50.54:52536] disconnected: oversize packet.

A recent update to Mosquitto introduced a default max packet size limit, and a 4K screenshot is larger than whatever that default is. Every time HASS.Agent tried to send the screenshot, it hit the limit, got dropped, immediately reconnected, and hit the limit again. Hence the popup, every few minutes.

The fix is a custom Mosquitto configuration file. On my Home Assistant OS install, custom config goes in /root/share/mosquitto/. I created mosquitto.conf there with:

max_packet_size 2000000000

That is 2 GB, which is more than enough headroom for a 4K screenshot. Restart the Mosquitto add-on, and the disconnections stop.

The two threads that pointed me to the fix:

  • HASS.Agent issue #443
  • Home Assistant Add-ons issue #4570

If you’re running HASS.Agent with screenshot sensors and your MQTT connection keeps dropping with oversize packet in the log, this is your fix.

Related posts:

My MS-01 Kept Kernel Panicking. Here’s What Finally Worked. The Power of Containers: Getting Started with Docker for Home Lab Projects and Isolated Applications Wi-Fi 6/6E/7: A Deep Dive Into Whether Your Home Really Needs the Latest Standard What Some Smart Home Enthusiasts Wish They Knew Before Getting Started

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • The Mosquitto Change That Kept Kicking My HASS.Agent Client
  • My MS-01 Kept Kernel Panicking. Here’s What Finally Worked.
  • When Car Companies Break Your Smart Home Setup
  • Beyond Basic Automation: Navigating the Smart Home Spectrum for Deeper Convenience
  • The Power of Containers: Getting Started with Docker for Home Lab Projects and Isolated Applications

Signal & Switch

Home automation and homelab, from someone who actually runs both.

©2026 Signal & Switch | Design: Newspaperly WordPress Theme