Appearance
Connect Multispan AVH-14-M1 to Autoconnecto (Modbus over MQTT)
This guide is for customers and field engineers. It connects a Multispan AVH-14-M1 multifunction energy meter (RS-485 Modbus RTU) to Autoconnecto through a cellular DTU such as PUSR / USR-DR154, using a dedicated Modbus gateway (keep any XY-MD02 / htgateway path separate).
This meter + DTU pair is the first entry on Compatible hardware.
Related:
- Compatible hardware list:
compatible-hardware.md - DR154 + XY-MD02 how-to:
dr154-modbus-mqtt.md - Engineer transport contract:
backend/docs/MODBUS_TUNNEL.md
What you are building
text
Autoconnecto --MQTT TX--> DR154 --RS485--> AVH-14-M1 (Modbus slave)
Autoconnecto <--MQTT RX-- DR154 <--RS485-- AVH-14-M1| Piece | Role |
|---|---|
| energygateway | MQTT token + MQTT_SERIAL |
| avh1 (child) | Slave ID, AVH-14-M1 register map, telemetry |
| DR154 (PUSR / USR) | MQTT ↔ RS485 bridge. Use MQTT work mode, not Transparent TCP. |
| AVH-14-M1 | Modbus RTU float slave |
Official Modbus map (from AVH-14-M1 PDF)
Confirmed from the meter manual MODBUS (AVH 14-M1) pages:
| Item | Value |
|---|---|
| Slave address | 1–125 |
| Baud | 4800 / 9600 / 19200 / 38400 |
| Parity | None / Even / Odd |
| Datatype | Float — 32-bit little-endian byte swap (CDAB) |
| Read FC | 0x03 and 0x04 |
| Write FC | 0x06 / 0x10 (config/reset — not used for live telemetry) |
Each value occupies two holding registers. Autoconnecto uses HOLDING (FC3) + data type float32_cdab.
Energy (integer + fraction)
Per manual Note 1, energy is split across two floats (example 320126789.321 → int 320126789 + frac 0.321):
| Key | Addr | Meaning |
|---|---|---|
energy_kwh_int | 0 | kWh integer part |
energy_kwh_frac | 2 | kWh fractional part |
energy_kvah_int | 4 | kVAh integer |
energy_kvah_frac | 6 | kVAh fraction |
energy_kvarh_int | 8 | kVArh integer |
energy_kvarh_frac | 10 | kVArh fraction |
Total energy ≈ *_int + *_frac.
Voltages (phase values)
| Key | Addr | Meaning |
|---|---|---|
voltage_l1n | 12 | L1–N |
voltage_l2n | 16 | L2–N |
voltage_l3n | 20 | L3–N |
voltage_vln_avg | 24 | Avg V L-N |
voltage_l12 | 28 | L1–L2 |
voltage_l23 | 32 | L2–L3 |
voltage_l31 | 36 | L3–L1 |
voltage_vll_avg | 40 | Avg V L-L |
(Unit registers 14, 18, … exist on the meter: 0 = V, 1 = kV — not polled by default.)
Current, PF, frequency
| Key | Addr |
|---|---|
current_l1 / l2 / l3 / current_avg | 44 / 48 / 52 / 56 |
power_factor_l1 / l2 / l3 / power_factor_avg | 60 / 62 / 64 / 68 |
frequency_hz | 70 |
Power
| Key | Addr |
|---|---|
active_power_kw_l1 / l2 / l3 / total | 72 / 76 / 80 / 84 |
apparent_power_kva_l1 / l2 / l3 / total | 88 / 92 / 96 / 100 |
reactive_power_kvar_l1 / l2 / l3 / total | 104 / 108 / 112 / 116 |
Hours / RPM / max demand
| Key | Addr |
|---|---|
load_hours / load_minutes | 120 / 122 |
noload_hours / noload_minutes | 124 / 126 |
rpm | 128 |
md_kw / md_kva / md_kvar | 130 / 134 / 138 |
Autoconnecto setup
- Create Modbus gateway
energygateway(leavehtgatewayalone). - Copy gateway token → DR154 MQTT user / password / client ID.
- Connection mode MQTT serial; topics:
- Subscribe:
devices/<TOKEN>/modbus/tx - Publish:
devices/<TOKEN>/modbus/rx
- Subscribe:
- Add child
avh1, slave ID 1 (match meter). The slave ID must be an integer from 1 to 247. Save setup stores the connection on the gateway. In Direct mode the host is the address only. Delete on the gateway list or the gateway page removes the gateway after its child devices are gone. - Register map: addresses above, type HOLDING, data type float32 CDAB (Multispan), scale 1.
- UART on DR154 = meter baud (9600 8N1 recommended).
- Read now → check
voltage_l1n/voltage_l2n/voltage_l3n(or L-L if 3P-3W). - Then enable Auto poll.
DR154 checklist
text
AT+WKMOD=MQTT,NOR
AT+MQTTSVR=mqtt.autoconnecto.in,8883
AT+MQTTUSER=<ENERGY_GATEWAY_TOKEN>
AT+MQTTPSW=<ENERGY_GATEWAY_TOKEN>
AT+MQTTCID=<ENERGY_GATEWAY_TOKEN>
AT+MQTTSUBTP=1,1,devices/<TOKEN>/modbus/tx,0
AT+MQTTPUBTP=1,1,devices/<TOKEN>/modbus/rx,0,0
AT+SSLEN=ON
AT+UART=9600,8,1,NONE,NONE
AT+SWire A/B to meter Modbus terminals; remove PC from the bus.
Why earlier readings looked wrong
A different Multispan family map (AVH-14N 30000/40000 style) was applied first. That is not the AVH-14-M1 table. Combined with ABCD float decode instead of CDAB, voltages appeared as zeros or huge nonsense numbers.
Correct map + float32_cdab should show phase voltages near what the meter display shows.
Troubleshooting
| Symptom | Check |
|---|---|
| Timeout | Slave ID, baud match, A/B, MQTT token/topics |
| Voltage still nonsense | Confirm data type is float32_cdab, addresses 12/16/20 (L-N) or 28/32/36 (L-L) |
| L-N always 0 | Meter in 3P-3W — use L-L keys instead |
| Energy odd | Sum energy_kwh_int + energy_kwh_frac |
Checklist
- [ ] Separate energygateway token on DR154
- [ ] Meter + DR154 both 9600 (or both the same baud)
- [ ] Slave ID match
- [ ] Map from this AVH-14-M1 PDF (not 14N 30000 table)
- [ ] Data type float32_cdab
- [ ] Read now → phase voltages look right on avh1 telemetry
