METEO_P4 · Service Documentation

Home Assistant Integration

Complete guide to integrating METEO_P4 with Home Assistant via MQTT: Discovery, topic list, sensors, diagnostics and connection checks.

Protocol: MQTT Integration: MQTT Discovery Device: METEO_P4 (ESP32-P4) Port: 1883 / 8883

1.Requirements

  • MQTT broker — e.g. Mosquitto, reachable by both METEO_P4 and Home Assistant.
  • Same network — METEO_P4 and the broker must be able to reach each other.
  • MQTT integration in Home Assistant — installed and configured to use the same broker.
Tip Mosquitto as an HA add-on

If Home Assistant is installed as Home Assistant OS or Supervised, the easiest option is to install the official Mosquitto broker add-on from the HA add-on store. The broker and HA will already share the same network.

2.How it works

After connecting to Wi-Fi, METEO_P4 automatically:

  1. Connects to the MQTT broker with the configured credentials.
  2. Publishes MQTT Discovery configuration to topics homeassistant/<тип>/<MAC>/<id>/config.
  3. Starts publishing measurements periodically to meteo_p4/<MAC>/state.
  4. Publishes availability status to meteo_p4/<MAC>/status.

Thanks to Discovery, you do not need to create entities in YAML manually — Home Assistant detects the device and adds all sensors automatically.

Auto MQTT Discovery

Make sure Enable MQTT Discovery is turned on in Home Assistant (it is on by default). Entities will appear within seconds after the device first connects.

3.MQTT Topics

<MAC> — the device Wi-Fi MAC address in lowercase without separators, e.g. a1b2c3d4e5f6.

Status and state

meteo_p4/<MAC>/status
Availability: online / offline (LWT)
meteo_p4/<MAC>/state
JSON with all current sensor values

Keys in JSON payload (state)

КлючDescriptionUnit
indoor_temperatureIndoor temperature°C
outdoor_temperatureOutdoor temperature°C
humidityIndoor humidity%
outdoor_humidityOutdoor humidity%
pressureAtmospheric pressurehPa
co2CO₂ppm
vocVOC index (SGP41)—
windWind speedм/с
forecast_temp_nowForecast temperature°C
wifi_rssiWi-Fi signal leveldBm
free_heapFree RAMbytes
free_psramFree PSRAMbytes
uptimeUptime since bootс
fw_versionFirmware versionstring

Discovery topics

Published once at startup. Example for the temperature sensor:

topichomeassistant/sensor/<MAC>/indoor_temperature/config

4.Sensors in Home Assistant

Once discovered, the device appears in HA as a single METEO P4 integration with the following entities:

Climate

  • Indoor temperature и на улице
  • Indoor humidity и на улице
  • Atmospheric pressure
  • CO₂ (ppm)
  • VOC index

Weather

  • Wind speed
  • Forecast temperature

Diagnostics

  • Wi-Fi RSSI
  • Free RAM и PSRAM
  • Uptime
  • Firmware version

5.Connection Setup

On the device open: Settings → Server → MQTT.

FieldValue
HostIP address of the MQTT broker, e.g. 192.168.100.40
Port1883 (no TLS) or 8883 (TLS)
UserLogin (if authentication is enabled)
PasswordMQTT password
IntervalPublish interval, at least 10 seconds

Press SAVE, then ENABLE MQTT. The device will connect and start publishing data.

Important Security

Do not use allow_anonymous true in a production network. Never publish your MQTT password, home-network IP address or server credentials publicly.

6.Connection Check

Verify that the device is publishing data by subscribing to all its topics:

Docker (Mosquitto in a container)

bashdocker exec -it meteo_mosquitto mosquitto_sub \
  -h localhost -u USER -P PASSWORD \
  -t "meteo_p4/#" -v

Windows (Mosquitto installed locally)

powershellcd "C:\Program Files\mosquitto"
.\mosquitto_sub.exe -h 127.0.0.1 -p 1883 `
  -u METEO_P4 -P your_password `
  -t "meteo_p4/#" -v

When the connection works, messages like these will appear in the console:

outputmeteo_p4/a1b2c3d4e5f6/status online
meteo_p4/a1b2c3d4e5f6/state {"indoor_temperature":22.4,"humidity":48,...}

Check port reachability from another PC

powershellTest-NetConnection -ComputerName IP_СЕРВЕРА -Port 1883

7.Troubleshooting

SymptomCause / solution
Device does not appear in Home Assistant Check that the MQTT integration is enabled in HA and that MQTT Discovery is on. Make sure the broker matches the one configured in METEO_P4.
Entities appeared but values show unavailable The device is not connected or status is offline. Check Wi-Fi and MQTT settings on the device.
Connection refused: not authorised Wrong login or password, or allow_anonymous false is set but no credentials are provided in the client.
No data arriving but status is online Publish interval is too long, or the sensor is not physically connected. Reduce the interval in settings.
METEO_P4 cannot connect via TLS (port 8883) A CA certificate must be installed on the device or a trust-bundle enabled. The certificate CN must match the broker hostname or IP.
Duplicate entities in HA Delete the old device in HA (Settings → Devices & Services → MQTT) and wait for re-discovery.