---
title: Use Hiking DDS238-2 ZN/S Energy Meter with Home Assistant
date: 2022-04-18T14:06:52+00:00
modified: 2025-12-04T12:22:13+00:00
image:: https://kaspars.net/wp-content/uploads/2022/04/home-assistant-hiking-dds238-2-zn-s-modbus-sensor.png
permalink: https://kaspars.net/blog/hiking-dds238-2-modbus
post_type: post
author:
  name: Kaspars
  avatar: https://reverse.kaspars.net/gravatar/avatar/92bfcd3a8c3a21a033a6484d32c25a40b113ec6891f674336081513d5c98ef76?s=96&d=mm&r=g
category:
  - Electronics
  - Home Automation
post_tag:
  - Home Assistant
---

# Use Hiking DDS238-2 ZN/S Energy Meter with Home Assistant

[Hiking DDS238-2 ZN/S](https://kaspars.net/go/hiking-dds238-2-zn-s) is a cheap €20 single phase energy meter which can measure import and export energy in addition to all the standard parameters, and has a Modbus interface over RS485.

![Home Assistant energy dashboard using Hiking DDS238-2 energy meter](https://kaspars.net/wp-content/uploads/2022/04/home-assistant-hiking-dds238-2-zn-s-modbus-sensor.png?strip=all&quality=90&resize=2702,1528)Home Assistant energy dashboard using Hiking DDS238-2 energy meter.I used this [Modbus registry information](https://github.com/fawno/Modbus/blob/4871fe24a342eee4f0db33d28968e37483ad3f1d/DDS238-2%20ZN-S%20Modbus.md) to create this device [template for Home Assistant](https://www.home-assistant.io/integrations/modbus/) where the meter is attached to the [Protoss PE11 RS485 to TCP](http://www.hi-flying.com/pe11) gateway ([AliExpress](https://kaspars.net/go/protoss-pe11-rs485-to-tcp)) available on IP `123.123.123.123` which must be adjusted for your setup or switched to a serial config:

```
modbus:
  - name: Protoss PE11
    type: tcp
    host: 123.123.123.123
    port: 502
    timeout: 0.5
    sensors:

      - name: DDS238-2 ZN-S Total Energy
        device_class: energy
        state_class: total
        unit_of_measurement: kWh
        address: 0
        count: 2
        data_type: uint32
        scale: 0.01
        precision: 2

      - name: DDS238-2 ZN-S Export Energy
        device_class: energy
        state_class: total_increasing
        unit_of_measurement: kWh
        address: 8
        count: 2
        data_type: uint32
        scale: 0.01
        precision: 2
    
      - name: DDS238-2 ZN-S Import Energy
        device_class: energy
        state_class: total_increasing
        unit_of_measurement: kWh
        address: 10
        count: 2
        data_type: uint32
        scale: 0.01
        precision: 2

      - name: DDS238-2 ZN-S Voltage
        device_class: voltage
        unit_of_measurement: V
        address: 12
        data_type: uint16
        scale: 0.1
        precision: 1

      - name: DDS238-2 ZN-S Current
        device_class: current
        unit_of_measurement: A
        address: 13
        data_type: uint16
        scale: 0.01
        precision: 2

      - name: DDS238-2 ZN-S Power
        device_class: power
        data_type: int16
        unit_of_measurement: W
        address: 14
        
      - name: DDS238-2 ZN-S Reactive Power
        device_class: apparent_power
        data_type: uint16
        unit_of_measurement: VAr
        address: 15
        
      - name: DDS238-2 ZN-S Power Factor
        device_class: power_factor
        unit_of_measurement: '%'
        data_type: uint16
        address: 16
        scale: 0.1
        precision: 1

      - name: DDS238-2 ZN-S Frequency
        device_class: frequency
        unit_of_measurement: Hz
        data_type: uint16
        address: 17
        scale: 0.01
        precision: 2
```

## Modbus to TCP Alternatives

The [Waveshare RS485 to ETH with PoE](https://www.waveshare.com/wiki/RS485_TO_POE_ETH_(B)) ([AliExpress](https://kaspars.net/go/waveshare-rs485-to-tcp-with-poe)) is another great and tested alternative. Note that is has versions with and without the PoE support so be sure to get the right one.