-
-
Notifications
You must be signed in to change notification settings - Fork 73
MQTT configuration
- 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
WARNING ESP8266 may not have enough memory to perform MQTT with SSL. If you configure SSL and it does not work, a emergency factory reset will be necessary (or re-flash)
Sends all data on single topic with different format. Depending on your meters data output, you can receive the following:
- System - Every 10s
- List 1 - Usually every 2.5s (Norway)
- List 2 - Usually every 10s (Norway)
- List 3 - Usually every hour (Norway)
- List 4 - Most likely every 10s (Denmark)
- Prices - On top of the hour when price of current hour changes
- {publish topic}/id - MAC address (retain flag)
- {publish topic}/uptime - Device uptime in seconds
- {publish topic}/vcc - ESP Vcc in volts
- {publish topic}/rssi - ESP WiFi RSSI
- {publish topic}/temperature - Average temperature
- {publish topic}/temperature/{address} - If you have multiple digital temperature sensors
- {publish topic}/meter/id (retain flag)
- {publish topic}/meter/type (retain flag)
- {publish topic}/meter/clock
- {publish topic}/meter/powerfactor
- {publish topic}/meter/import/reactive/accumulated (retain flag)
- {publish topic}/meter/import/active/accumulated (retain flag)
- {publish topic}/meter/export/reactive/accumulated (retain flag)
- {publish topic}/meter/export/active/accumulated (retain flag)
- {publish topic}/meter/l1/current
- {publish topic}/meter/l1/voltage
- {publish topic}/meter/l1/powerfactor
- {publish topic}/meter/l2/current
- {publish topic}/meter/l2/voltage
- {publish topic}/meter/l2/powerfactor
- {publish topic}/meter/l3/current
- {publish topic}/meter/l3/voltage
- {publish topic}/meter/l3/powerfactor
- {publish topic}/meter/export/reactive
- {publish topic}/meter/export/active
- {publish topic}/meter/import/reactive
- {publish topic}/meter/import/active
- {publish topic}/realtime/import/hour
- {publish topic}/realtime/import/day
- {publish topic}/realtime/import/peak/[1-5] (retain flag)
- {publish topic}/realtime/import/threshold (retain flag)
- {publish topic}/realtime/import/monthmax (retain flag)
- {publish topic}/realtime/export/hour
- {publish topic}/realtime/export/day
If ENTSO-E API is enabled, price data is also published. Only when price for current hour is changed on top of the hour:
- {publish topic}/price/[0-34] - Price for current hour (0) and every known hour from now (1-34) (retain flag)
- {publish topic}/price/min - The minimum known price within the next 24 hours (retain flag)
- {publish topic}/price/max - The maximum known price within the next 24 hours (retain flag)
- {publish topic}/price/cheapest/1hr - Timestamp when the cheapest 1hr period starts within the next 24 hours (retain flag)
- {publish topic}/price/cheapest/3hr - Timestamp when the cheapest 3hr period starts within the next 24 hours (retain flag)
- {publish topic}/price/cheapest/6hr - Timestamp when the cheapest 6hr period starts within the next 24 hours (retain flag)
Requires that a Domoticz MQTT-message-broker is setup. HOWTO: https://www.domoticz.com/wiki/MQTT.
Domoticz MQTT payloads will be published to MQTT topic "domoticz/in". The Domoticz MQTT client must therefor be configured to use "domoticz/in as "Topic In Prefix". See https://www.domoticz.com/wiki/MQTT.
The following virtual sensors can currently be used (see: https://www.domoticz.com/wiki/Domoticz_API/JSON_URL's):
- Electric (Instant+Counter) Note: Relies on Total energy import "tPI", will not start updating until value is read (once an hour)
- Ampere (3 Phase)
- Voltage (One per phase)
Create the sensors in Domoticz under Hardware > Dummy > Create virtual sensors, and use the IDX assigned to the sensor as input to the configuration here.
Enables Home-Assistant auto discovery, data is published as JSON that is tailored for the auto discovery configuration.
NOTE Auto discovery data is published to topic "homeassistant/sensor", DO NOT use this topic as Publish topic, please choose another topic (ex amsreader)