TapHome

NOUS A1

Packet Parser → MQTT
Submitted by
Last updated: 04. 2026
NOUS A1

The NOUS A1 is a WiFi smart plug with built-in energy monitoring (BL0937 chip). When flashed with Tasmota firmware, it communicates with TapHome over MQTT. The template provides relay control and comprehensive energy metering — voltage, current, active/reactive/apparent power, power factor, and cumulative energy consumption.

The plug uses an ESP8266 chipset and is rated for 16A peak / 15A continuous (up to 3680W max, 3450W continuous). It requires an external MQTT broker (e.g., Mosquitto) accessible from both the plug and TapHome Core.

Configuration

Tasmota MQTT setup

Before importing the TapHome template, the NOUS A1 must be flashed with Tasmota firmware and configured to connect to an MQTT broker:

  1. Open the Tasmota web UI (navigate to the device IP in a browser)
  2. Go to ConfigurationConfigure MQTT
  3. Set the Host to the MQTT broker IP address
  4. Set the Port (default 1883)
  5. Set User and Password if the broker requires authentication
  6. Note the Topic value (e.g., tasmota_496D5A) — this is needed for the TapHome template
Template variables

After importing the template in TapHome, set the plug1topic custom variable to match the Tasmota MQTT topic of the plug:

VariableDescriptionHow to obtain
plug1topicTasmota MQTT topic of the smart plugTasmota web UI → Configuration → MQTT → Topic field

The default value is tasmota_496D5A — this must be changed to match the actual topic of each plug.

The MQTT topic is device-specific. If multiple NOUS A1 plugs are used, each requires a separate template instance with a unique plug1topic value.

Energy monitoring calibration

The BL0937 energy monitoring chip requires calibration for accurate readings. To calibrate:

  1. Connect a known resistive load (e.g., 60W incandescent bulb) to the plug
  2. In the Tasmota console, set the reference voltage: VoltageSet 230
  3. Set the reference power: PowerSet 60
  4. Verify the power factor reads close to 1.00 for the resistive load

Calibration is a one-time procedure — the values are stored in flash memory and persist across reboots. Without it, energy readings from the BL0937 chip may be inaccurate.

Device capabilities

Relay control

The template exposes a single relay output for the 230V AC socket. The relay is controlled by publishing to cmnd/{topic}/Power with payload 1 (ON) or 0 (OFF). When the relay is turned off, the template also requests an energy status update (Status 8) to refresh the energy readings immediately.

Energy monitoring

The template reads energy data from the tele/{topic}/SENSOR payload, which is published periodically (default every 300 seconds). The following measurements are available:

  • Voltage — mains voltage (V)
  • Current — load current (A)
  • Active Power — real power consumption (W)
  • Apparent Power — total power including reactive component (VA)
  • Reactive Power — reactive power (VAR)
  • Power Factor — ratio of active to apparent power (cos phi, 0–1)
  • Energy Today — cumulative energy since midnight (kWh)
  • Total Energy — cumulative energy since counter start, persistent across reboots (kWh)
  • Period Energy — energy consumed in the current telemetry period (Wh)
WiFi diagnostics

The template reads WiFi status from the tele/{topic}/STATE payload:

  • WiFi Channel — the 2.4 GHz channel number (1–13)
  • WiFi Signal Strength — signal level in dBm
  • WiFi RSSI — signal quality as percentage (0–100%)
  • Uptime — device uptime in seconds since last boot
Additional capabilities

The NOUS A1 with Tasmota firmware also supports connection status monitoring via LWT (Last Will and Testament) topic, yesterday’s energy consumption, configurable telemetry period (10–3600 seconds), and energy counter reset commands. The BL0937 chip can also be recalibrated remotely via MQTT commands. These capabilities can be added in a future template update.

Troubleshooting

No data in TapHome
  1. Verify the plug is connected to WiFi — the Tasmota web UI should be accessible at the device IP
  2. Check that MQTT is configured and connected — Tasmota web UI main page shows MQTT connection status
  3. Confirm the plug1topic variable in TapHome matches the Topic value in Tasmota MQTT configuration exactly
  4. Use an MQTT client (e.g., MQTT Explorer) to subscribe to tele/# and verify the plug publishes STATE and SENSOR messages
Inaccurate energy readings
  1. The BL0937 chip requires calibration with a known resistive load — see the calibration section above
  2. Reactive loads (motors, LED drivers) naturally have a power factor below 1.0 — this is expected behavior, not a measurement error
  3. Check the telemetry period — the default 300-second interval means energy values update every 5 minutes

Newer production runs of the NOUS A1 may use non-ESP chipsets that are incompatible with Tasmota firmware. Verify the chipset before purchasing if Tasmota/MQTT integration is required.

Available devices

NOUS A1 Module
Custom Variables
plug1topic (string) = tasmota_496D5ATasmota MQTT topic of the smart plug — used in subscribe filters and relay control commands
Open Tasmota web UI → Configuration → MQTT → copy Topic value (e.g., tasmota_496D5A)

ESP-NOUS-ZASUVKA-1

Listener
#var tmp := RECEIVEDMSG.Payload;
WiFi Channel Variable Read-only
numeric json_path

WiFi Channel

Listener
if INDEXOF(RECEIVEDMSG.Topic, "STATE") > 0
	var tmp := RECEIVEDMSG.Payload;
    var temp4 := PARSEJSON(RECEIVEDMSG.Payload, ID1 + ".Channel", true);
    if (!ISNULL(temp4), Va := temp4/1);
end
Apparent Power Variable Read-only
numeric Unit: VA json_path

Apparent Power

Listener
if INDEXOF(RECEIVEDMSG.Topic, "SENSOR") > 0
	var tmp := RECEIVEDMSG.Payload;
    var temp4 := PARSEJSON(RECEIVEDMSG.Payload, ID12 + ".ApparentPower", true);
    if (!ISNULL(temp4), Va := temp4/1);
end
Power Factor Variable Read-only

Ratio of active to apparent power (cos phi) — range 0 to 1, where 1.0 indicates a purely resistive load

numeric json_path

Power Factor

Listener
if INDEXOF(RECEIVEDMSG.Topic, "SENSOR") > 0
	var tmp := RECEIVEDMSG.Payload;
    var temp4 := PARSEJSON(RECEIVEDMSG.Payload, ID12 + ".Factor", true);
    if (!ISNULL(temp4), Va := temp4/1);
end
Current Variable Read-only
numeric Unit: A json_path

Current

Write
# Simple HTTP Request:
# VAR response := SENDHTTPREQUEST("/example/set/value=" + Va);
# IF response.IsSuccess = false
#  ADDERROR(response.StatusCode);
# END
#
# Set Http request method, body and headers
# VAR response := SENDHTTPREQUEST("/example/setValue", "GET", "value=" + Va, "header1:value1", "header2:value2", ...);\r
# Or VAR request := HTTPREQUEST("/example/setValue");
# request.Method := "PUT";
# VAR response := SENDHTTPREQUEST(request);
#r
#
# Send TCP, UDP data:
# VAR data1 := "{\"name\":\"John\", \"age\":" + Va + "}";
# SENDDATA(data1);
# VAR data2 := TOBYTES("{\"name\":\"John\", \"age\":" + Va + "}", "iso-8859-1");
# SENDDATA(data2);
# You can process received TCP or UDP data in the Listener script
#
#
# Upload data to FTP:
# FTPUPLOAD("filePath", "somedata=" + Va, "write"); # use "append" mode to append data to existing file
Read (module)
# Simple HTTP Request:
# VAR response := SENDHTTPREQUEST("/example/getValue");
# IF response.IsSuccess
#  VAR content := response.Content;
#  VAR responseHeaders := response.Headers;
#  RETURN(PARSEXML(content, "//element1/value1"));
# ELSE
#  ADDERROR(response.StatusCode + " (" + response.ReasonPhrase + ")");
#  RETURN(NaN);
# END
#
# Set Http request method, body and headers
# VAR response := SENDHTTPREQUEST("/example/getValue", "GET", "some data", "header1:value1", "header2:value2", ...);
# OR
# VAR request := HTTPREQUEST("/example/getValue", "POST", "some data");
# request.headers := { "header1:value1", "header2:value2", ...};
# request.method := "GET";
# request.data := null;
# VAR response := SENDHTTPREQUEST(request);
#
#
# Send TCP, UDP data:
# VAR data1 := BYTECOLLECTION("0a bb ea df 01");
# SENDDATA(data1);
# VAR data2 := "{\"name\":\"John\", \"age\":32}";
# SENDDATA(data2);
# VAR data3 := TOBYTES("{\"name\":\"John\", \"age\":32}", "iso-8859-1");
# SENDDATA(data3);
# Process received TCP or UDP data and set device values in the Listener script
#
#
# Download data from FTP:
# FTPDOWNLOAD("filePath");
Listener
if INDEXOF(RECEIVEDMSG.Topic, "SENSOR") > 0
	var tmp := RECEIVEDMSG.Payload;
    var temp4 := PARSEJSON(RECEIVEDMSG.Payload, ID12 + ".Current", true);
    if (!ISNULL(temp4), Va := temp4/1);
end
Relay Output Switch

Main 230V AC relay — also requests energy status refresh on turn-off

boolean
Values / States: ON-ACCESO · OFF-SPENTO

Relay Output

Write switch state
var value1 := IF(St = 1, "1", "0");
MQTTPUBLISH("cmnd/" +  plug1topic + "/Power", value1);

var value2 := IF(St = 0, MQTTPUBLISH("cmnd/" +  plug1topic + "/Status", "8"));
Period Energy Variable Read-only

Energy consumed in the current telemetry period

numeric Unit: Wh json_path

Period Energy

Listener
if INDEXOF(RECEIVEDMSG.Topic, "SENSOR") > 0
	var tmp := RECEIVEDMSG.Payload;
    var temp4 := PARSEJSON(RECEIVEDMSG.Payload, ID12 + ".Period", true);
    if (!ISNULL(temp4), Va := temp4/1);
end
Active Power Variable Read-only
numeric Unit: W json_path

Active Power

Listener
if INDEXOF(RECEIVEDMSG.Topic, "SENSOR") > 0
	var tmp := RECEIVEDMSG.Payload;
    var temp4 := PARSEJSON(RECEIVEDMSG.Payload, ID12 + ".Power", true);
    if (!ISNULL(temp4), Va := temp4/1);
end
Energy Today Variable Read-only

Cumulative energy consumption since midnight

numeric Unit: kWh json_path

Energy Today

Listener
if INDEXOF(RECEIVEDMSG.Topic, "SENSOR") > 0
	var tmp := RECEIVEDMSG.Payload;
    var temp4 := PARSEJSON(RECEIVEDMSG.Payload, ID12 + ".Today", true);
    if (!ISNULL(temp4), Va := temp4/1);
end
Reactive Power Variable Read-only
numeric Unit: VAR json_path

Reactive Power

Listener
if INDEXOF(RECEIVEDMSG.Topic, "SENSOR") > 0
	var tmp := RECEIVEDMSG.Payload;
    var temp4 := PARSEJSON(RECEIVEDMSG.Payload, ID12 + ".ReactivePower", true);
    if (!ISNULL(temp4), Va := temp4/1);
end
Total Energy Variable Read-only

Cumulative energy consumption since counter start — persistent across reboots

numeric Unit: kWh json_path

Total Energy

Listener
if INDEXOF(RECEIVEDMSG.Topic, "SENSOR") > 0
	var tmp := RECEIVEDMSG.Payload;
    var temp4 := PARSEJSON(RECEIVEDMSG.Payload, ID12 + ".Total", true);
    if (!ISNULL(temp4), Va := temp4/1);
end
Uptime Variable Read-only

Device uptime in seconds since last boot

numeric Unit: s json_path

Uptime

Listener
if INDEXOF(RECEIVEDMSG.Topic, "STATE") > 0
	var tmp := RECEIVEDMSG.Payload;
    var temp4 := PARSEJSON(RECEIVEDMSG.Payload, "UptimeSec", true);
    if (!ISNULL(temp4), Va := temp4);
end
Voltage Variable Read-only
numeric Unit: V json_path

Voltage

Listener
if INDEXOF(RECEIVEDMSG.Topic, "SENSOR") > 0
	var tmp := RECEIVEDMSG.Payload;
    var temp4 := PARSEJSON(RECEIVEDMSG.Payload, ID12 + ".Voltage", true);
    if (!ISNULL(temp4), Va := temp4/1);
end
WiFi Signal Strength Variable Read-only

WiFi signal level in dBm — divided by 100 in template (may need recalibration)

numeric Unit: dBm json_path

WiFi Signal Strength

Listener
if INDEXOF(RECEIVEDMSG.Topic, "STATE") > 0
	var tmp := RECEIVEDMSG.Payload;
    var temp4 := PARSEJSON(RECEIVEDMSG.Payload, ID1 + ".Signal", true);
    if (!ISNULL(temp4), Va := temp4/100);
end
WiFi RSSI Analog Input Read-only

WiFi signal quality as percentage, normalized to 0–1 range for TapHome AnalogInput

numeric Unit: % json_path

WiFi RSSI

Listener
if INDEXOF(RECEIVEDMSG.Topic, "STATE") > 0
	var tmp := RECEIVEDMSG.Payload;
    var temp2 := PARSEJSON(RECEIVEDMSG.Payload, ID1 + ".RSSI", true);
    if (!ISNULL(temp2), An := temp2/100);
end
Connection: Packet Parser → MQTT
Possible improvements (5)
  • Connection Status (LWT) — Last Will and Testament — Online/Offline payload. Could detect device connectivity.
  • Energy Yesterday — Yesterday's energy consumption in kWh. Available in SENSOR payload but not parsed by template.
  • Telemetry Period — Set telemetry interval (10–3600s, default 300). Could be exposed as service action.
  • Energy Counter Reset — Reset energy counters (Today, Yesterday, Total). Could be exposed as service action.
  • Energy Calibration Commands — BL0937 energy monitoring chip calibration — important for accurate readings but requires physical known load.

Sources