What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
To keep MQTT devices communicating when your internet connection fails, run the MQTT broker on a host reachable over your local network and point your devices and local automation system to it. This works during a WAN outage only while the LAN, broker host and power remain available. A cloud-only broker—or a device that requires its vendor’s cloud—will not become locally reachable just because you change an MQTT quality-of-service setting.
What keeps working when the WAN drops?
MQTT clients publish messages to a broker, which routes them to subscribed clients. If the broker and its clients are on the same functioning LAN, their communication does not need to cross the internet. That gives local devices and automations a path to keep communicating during a WAN outage.
As an Amazon Associate I earn from qualifying purchases.
The distinction is between the WAN and the rest of your network. If the router or LAN, broker host, or power also fails, a local broker cannot provide service. And local MQTT communication cannot restore a device function that depends on a vendor’s cloud service. Home Assistant’s internet-outage guidance distinguishes locally communicating devices from cloud-dependent ones.
Set up a broker that stays reachable on your LAN
1. Find each device’s actual dependencies
Check the broker address configured on each MQTT device and whether it can connect to a broker on your LAN. Also check whether the device requires an internet-connected vendor service for control or status. A device may use MQTT locally for some functions and still rely on a cloud service for others.
#1 Best Overall
2. Choose an always-available local host
If you already run Home Assistant, its documented Mosquitto broker app is one route to a local broker. You can also use another compatible MQTT broker on a host that remains connected to the LAN. The important requirement is reachability and uptime, not a particular hardware model.
Home Assistant’s MQTT integration documentation covers broker host or IP address, port, credentials, and connection options. Its Mosquitto broker app documentation explains the app-based setup.
3. Point MQTT clients to the local broker
Configure every device and automation client to use the broker’s LAN hostname or IP address and the correct port and credentials. Make sure the hostname resolves on the LAN, or use a stable address. A client still configured with a cloud broker’s hostname will lose its route when the WAN is down.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Rank #2
4. Keep offline automations local
For an automation to work without internet, its inputs, control path, and required services must also be local. A locally connected device may continue to work, while an automation that calls a cloud API, uses remote access, or depends on a cloud assistant integration may not. Home Assistant describes these local-versus-cloud limits in its no-cloud FAQ.
5. Verify local publishing and subscription
Home Assistant documents testing a local broker with Mosquitto command-line clients. From the broker host, publish a test message to a topic:
mosquitto_pub -h 127.0.0.1 -t test/topic -m "hello"
In another terminal, subscribe to that topic:
mosquitto_sub -h 127.0.0.1 -t test/topic
For a device-side check, use the broker’s LAN hostname or IP instead of 127.0.0.1, which refers to the machine running the command. Confirm that the device can publish and that the intended subscriber receives the message. Then, if it is safe for your setup, simulate a WAN interruption while keeping the LAN and broker powered, and repeat the check. A successful local test does not establish that cloud-dependent features will work offline.
Rank #3
Choose MQTT delivery settings for the problem you have
QoS, retained messages, and persistent sessions affect message delivery behavior; none creates a network route to a broker that a client cannot reach.
QoS: acknowledgements, not WAN failover
Eclipse Mosquitto’s MQTT manual defines QoS 0 as at-most-once delivery, QoS 1 as at-least-once, and QoS 2 as exactly-once for the protocol exchange. The publisher’s QoS and subscriber’s requested maximum QoS both affect the delivered level. Higher levels involve additional acknowledgement exchanges, latency, and bandwidth. Use a QoS level appropriate to the message and client support, but do not expect QoS 2 to reach a cloud broker through a failed WAN link.
Retained messages: the latest value, not an event archive
A retained publish lets the broker deliver the latest retained value to a new matching subscriber. That can be useful for current state, such as a sensor’s most recently reported value. It does not preserve every state change as a history.
Rank #4
Retained messages can survive broker or system restarts, so an old value may look current after recovery. Home Assistant warns about stale retained data and “ghost” entities in its MQTT documentation. Where supported, MQTT 5 message expiry can limit how long a message remains available; it does not turn retained state into a full event log.
Persistent sessions: queueing for a disconnected subscriber
With a non-clean session, a broker can preserve a client’s subscriptions and queue subsequent QoS 1 or 2 messages while that subscriber is disconnected, then deliver eligible messages when it reconnects. This helps a temporarily offline subscriber catch up, subject to broker configuration and storage limits. It does not help a publishing device that cannot connect to the broker: there is no broker-side queue for messages the broker never received.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →The MQTT standard’s overview of persistent sessions and QoS provides further context. If you need a durable event history, use a system designed to store and retain that history rather than treating MQTT retention or session queues as an archive.
Best Value
Make device availability visible
A last reported state can remain on screen after a device has lost its connection. MQTT Birth and Last Will and Testament messages can help distinguish a device that has reconnected from one whose connection was lost. A Birth message can announce that a service has started; a Last Will can notify subscribers that a client disconnected. Home Assistant documents availability and these messages in its MQTT integration guidance.
Use availability topics in dashboards and automations so that a stale sensor value is not mistaken for proof that the device is still online. Check how the device and broker handle clean and unclean disconnects before relying on a particular availability signal.
Secure and maintain the local broker
- Use broker credentials where configured, and keep them available to each client that needs to connect.
- For encrypted connections, configure certificate validation correctly; Home Assistant’s MQTT options include certificate-validation settings.
- Keep the broker host and software running and maintained. A local broker removes the WAN from the MQTT path, but it remains a dependency of every client using it.
- Test recovery after a broker restart as well as after a WAN interruption, especially if you depend on retained state or persistent sessions.
Home Assistant’s MQTT documentation describes credential and certificate options. Specific queue capacity, hardware requirements, and recovery behavior depend on the broker configuration and client; they are not universal MQTT guarantees.
What this setup does not protect against
- Router or LAN failure: clients may lose their local path to the broker.
- Broker host failure: clients cannot use a broker that is stopped or unreachable.
- Power loss: the router, broker host, or devices may stop working.
- Cloud dependency: a cloud-only device, remote-access feature, or cloud integration can remain unavailable even while local MQTT works.
- Lost publisher-to-broker connection: QoS and subscriber sessions do not guarantee that a disconnected publisher’s messages are stored for later.
Frequently Asked Questions
Does Home Assistant work without an internet connection?
Local Home Assistant functions and locally communicating devices can continue if the LAN, host, and required services remain available. Features that depend on cloud services or remote access may not work.
Will MQTT QoS 2 keep messages flowing during a WAN outage?
No. QoS 2 defines an exactly-once delivery exchange between clients and a reachable broker; it does not create a route to an unreachable cloud broker.
Do retained MQTT messages save every update while a device is offline?
No. A retained message provides the latest retained value to a new matching subscriber. It is not a complete record of every change.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




