Foscam + MQTT

Foscam camera alerts on MQTT

Foscam cameras can email when they see something, but MQTT is not a language any camera firmware speaks. NVR Bridge sits in between and does the translation. Every event is published to a topic on your own broker — the language Home Assistant, Node-RED and openHAB already speak — so whatever you've already automated can act on it. It gets Foscam events out of the Foscam app, which is otherwise the only place they land.

You need
A Foscam camera that can email, plus an MQTT broker — Mosquitto, EMQX, HiveMQ, or Home Assistant's own
Setup
About five minutes, all in a browser — no firmware changes
What arrives
A JSON message on the topic you chose, carrying links to the snapshots

How it works

  1. 1

    Add the camera

    Create a camera in NVR Bridge and it gets its own private inbound address, something like k7m2p9@relay.nvrbridge.com. That address is how we know which camera an event came from.

  2. 2

    Point Foscam at it

    In the camera's web UI, fill in Settings → Network → Mail Settings, then tick the e-mail action on your detection rule under Settings → Alarm. Set the recipient to the address above, and use our SMTP server and short password — or your own mail provider, if you'd rather.

  3. 3

    Point us at your broker

    Add an MQTT notification with the broker's host, port and credentials, then choose the topic, the QoS and whether to retain. If the broker only exists on your LAN, give us SSH details instead and we'll publish through a tunnel — nothing is exposed to the internet.

  4. 4

    Trigger it

    Walk past the camera. The event lands on your timeline within seconds and the MQTT alert follows. Every delivery is logged with its result, so a failure is something you can read rather than guess at.

What you get

  • Topics templated per camera, so one notification covers every camera you own
  • QoS and the retain flag are yours to set
  • TLS to a public broker, or an SSH tunnel to one that never leaves your LAN
  • No inbound ports, no VPN and no dynamic DNS at your end
  • Works with every Foscam model that can send email or upload by FTP
  • Optional number-plate, object and animal detection — alert only when it's a person

Questions

My broker isn't reachable from the internet. Does that rule this out?

No. Give us an SSH host and key and we'll open a tunnel for the moment it takes to publish, then close it. The broker keeps listening on your LAN only, exactly as it does now.

What does the message look like?

JSON by default — camera, time, event type, snapshot links and any detections. If the receiver wants a particular shape, write the body yourself with placeholders.

Which Foscam models does this work with?

Any model with email or FTP alert settings, which is effectively all of them. We don't need ONVIF, RTSP or a particular firmware version. Foscam's own alerts stop at the Foscam app. The same email sent to us puts those events into anything that speaks HTTP or MQTT.

Do I need an NVR, a recorder or something running at home?

No. The camera talks to us over the same outbound connection it already uses to send email. There's nothing to install on your network and no inbound port to open.

Try it with your own camera

Add a camera, point its email at the address we give you, and watch the first event land. It takes about five minutes.

Create a free account

Related

Other integrations for Foscam

MQTT with other camera brands