Security for your smart home and IoT network

Give a small connected project clear permissions, visible failure states, and a repeatable security check before relying on it.

Communicating devices

Ingredients

Follow a part’s name for an introduction and compatibility notes.

A door reminder, camera, or irrigation controller is a collection of devices and services. Its behavior depends on more than the sensor: accounts, networks, firmware, stored data, and power failures all matter. Start with a harmless reminder and write down what it is allowed to do.

Draw the path of one reading

For a door-open reminder, the path might be contact sensor → Wi-Fi → MQTT broker → automation → phone. List the owner and update method of each part, where credentials live, and what happens when it disappears. Include the router and notification service; “local sensor” does not mean “entirely local notification.”

Record these fields for each device: model and firmware, purpose, power source, network address, unique account, permitted topics or actions, last successful update, and recovery procedure. Keep passwords in a password manager rather than in this inventory or a public code repository.

Give each part a narrow job

  • Separate identities: a sensor publishes its own readings. A dashboard reads them. Neither needs the ability to issue unrelated commands. The MQTT permissions exercise demonstrates this boundary.
  • Protected management: change default credentials, use supported authentication, and keep editors and device consoles off the public internet. Remote access needs an authenticated design, such as a maintained VPN, rather than a forwarded unauthenticated port.
  • Validated transport: use supported TLS with certificate verification when credentials or sensitive data cross a network. Encryption without checking the server’s identity leaves an important gap.
  • Deliberate connectivity: use an IoT network if your router supports it, with explicit access to the services needed. A different Wi-Fi name alone does not prove network isolation. Test from both sides.
  • Updates and recovery: use official firmware sources, keep recoverable backups, and know how to revoke a lost device’s account.

Make missing information visible

Represent a sensor as a value plus a freshness time and availability state. If a door sensor stops reporting, show “unknown” rather than “closed.” Choose the expected update interval first; an event-only contact sensor may need a separate heartbeat to distinguish quiet from disconnected.

Separate reported state from requested state. Sending “close valve” is not evidence that a valve closed. For physical outputs, define startup behavior, a maximum run time, and what a local manual override does. Start by simulating those outputs on screen.

Run a small failure exercise

  1. Trigger the reminder normally and confirm both the event time and delivery time.
  2. Disconnect the sensor. Confirm that freshness expires and the dashboard changes to unknown.
  3. Restart the broker and automation host. Check whether old retained messages are mistaken for new events.
  4. Try the sensor’s credentials against an unrelated topic. Confirm that the action is denied, rather than assuming the configuration worked.
  5. Restore a backup into an isolated test setup and verify the credentials and entity names it requires.
  6. Restore normal operation and confirm that the alert clears deliberately rather than disappearing because data stopped.

Apply the same thinking to cameras

Frame only the area you intend to monitor, make recording apparent to people using that space, and avoid collecting audio when the project does not need it. Decide who can view footage, how long it stays, and how deletion works. Keep a live-view endpoint and stored recordings behind access controls; knowing an obscure URL is not authentication.

The useful outcome is a documented behavior you have tested: for example, “the reminder reports a disconnected contact sensor within two minutes.” It is not a blanket claim that a homemade system is secure. Repeat the relevant tests when changing firmware, permissions, or the network.