Skip to content

MQTT configuration

Gunnar Skjold edited this page Mar 16, 2021 · 28 revisions
  • Host - Hostname or IP for MQTT server. If you are using MQTT SSL, this needs to be the hostname reported by the SSL certificate
  • Port - Port for MQTT, normally 1883 for plain and 8883 for SSL
  • Client ID - A alphanumeric identitifier for your device. This needs to be unique for the MQTT server
  • Publish topic - The topic we will publish data to. If Raw mode is used, this is the root topic for all values
  • Username - If authentication is enabled on your MQTT server
  • Password - If authentication is enabled on your MQTT server
  • Payload - How to output the data, valid choices are:
    • JSON - A JSON containing all data from the meter
    • Raw (full) - Raw values sent to separate topics, see list of all topic further down
    • Raw (minimal) - Same as full, but only send value if it has changed
    • Domoticz - Specialized format used by Domoticz home automation, additional configuration is required
  • SSL - If your MQTT server is secured by SSL, add CA, Certificate and Private key for the connection and check the SSL checkbox

Topics in raw mode

  • {root}/id - MAC address (retain flag)
  • {root}/uptime - Device uptime in seconds
  • {root}/vcc - ESP Vcc in volts
  • {root}/rssi - ESP WiFi RSSI
  • {root}/temperature - Average temperature
  • {root}/temperature/{address} - If you have multiple digital temperature sensors
  • {root}/meter/id (retain flag)
  • {root}/meter/type (retain flag)
  • {root}/meter/clock
  • {root}/meter/import/reactive/accumulated (retain flag)
  • {root}/meter/import/active/accumulated (retain flag)
  • {root}/meter/export/reactive/accumulated (retain flag)
  • {root}/meter/export/active/accumulated (retain flag)
  • {root}/meter/l1/current
  • {root}/meter/l1/voltage
  • {root}/meter/l2/current
  • {root}/meter/l2/voltage
  • {root}/meter/l3/current
  • {root}/meter/l3/voltage
  • {root}/meter/export/reactive
  • {root}/meter/export/active
  • {root}/meter/import/reactive
  • {root}/meter/import/active

If Entso-E API is enabled, the following will also be published:

  • {root}/price/[0-34] - Price for current hour (0) and every known hour from now (1-34) (retain flag)
  • {root}/price/min - The minimum known price within the next 24 hours (retain flag)
  • {root}/price/max - The maximum known price within the next 24 hours (retain flag)
  • {root}/price/cheapest/1hr - Timestamp when the cheapest 1hr period starts within the next 24 hours (retain flag)
  • {root}/price/cheapest/3hr - Timestamp when the cheapest 3hr period starts within the next 24 hours (retain flag)
  • {root}/price/cheapest/6hr - Timestamp when the cheapest 6hr period starts within the next 24 hours (retain flag)

Domoticz

Domoticz Configuration. Requires that a Domoticz MQTT-message-broker is setup. HOWTO: https://www.domoticz.com/wiki/MQTT.

The following virtual sensors can currently be used:

Electricity (instant and counter) Electricity Current/Ampere 3 Phase Voltage see: https://www.domoticz.com/wiki/Domoticz_API/JSON_URL's

Create the sensors in Domoticz under Hardware > Dummy > Create virtual sensor, and use the IDX assigned to the sensor as input here.

"Electricity (instant and counter)" relies on Total energy import "tPI" and will not start before the first value is read (once an hour).