Help with electricity meter

Hi guys, Im really lost here and have tried various suggestions on the forum for the last couple of days without success. Really need your help.

I purchased a Freint Electricity Meter Interface (Develco ZHEMI101) and a Conbee II Zigbee-controller.

With built in Conbee II integration.
I can see some numbers getting updated on the state overview but not listed for either energy or just a statistics card…

Error: The unit of your entity is not a supported unit for the device class of the entity, power.
Statistics can not be generated until this entity has a supported unit.
The unit of your entity is not a supported unit for the device class of the entity, energy.
Statistics can not be generated until this entity has a supported unit.

Trying with a template:

template:
  - sensor:
    - name: "Total Power"
      unit_of_measurement: "W"
      state: "{{ state_attr('sensor.develco_zhemi101_6e1d021b_smartenergy_metering') | float / 1000 }}"
      state_class: measurement
      device_class: power
    - name: "Total Consumption"
      unit_of_measurement: "kWh"
      state: "{{ states('sensor.develco_zhemi101_6e1d021b_smartenergy_metering_summation_delivered') | float / 1000 }}"
      state_class: total_increasing
      device_class: energy
      attributes:         
          last_reset: '1970-01-01T00:00:00+00:00'

Two new sensors are created based on this but I can only get data from the energy (kWh)

Gave up and moved on and tested MQTT and zigbee2mqtt
Installed mosquito broker and zigbee2mqtt but it seems it doesn’t like to start.
Changed the port to: /dev/ttyACM1 (my Conbee II is in that port) (default was /ttyACM0 but got an error saying it cannot lock the port - this port should be used by my z-wave stick)

Error:

[23:41:13] INFO: Handing over control to Zigbee2mqtt Core ...
> [email protected] start
> node index.js
Zigbee2MQTT:error 2021-12-11 23:41:51: Error while starting zigbee-herdsman
Zigbee2MQTT:error 2021-12-11 23:41:51: Failed to start zigbee
Zigbee2MQTT:error 2021-12-11 23:41:51: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
Zigbee2MQTT:error 2021-12-11 23:41:51: Exiting...
Zigbee2MQTT:error 2021-12-11 23:41:51: Error: Failed to connect to the adapter (Error: SRSP - SYS - ping after 6000ms)
    at ZStackAdapter.start (/app/node_modules/zigbee-herdsman/src/adapter/z-stack/adapter/zStackAdapter.ts:102:27)
    at Controller.start (/app/node_modules/zigbee-herdsman/src/controller/controller.ts:123:29)
    at Zigbee.start (/app/lib/zigbee.ts:58:27)
    at Controller.start (/app/lib/controller.ts:100:27)
    at start (/app/index.js:97:5)

Many users seems to be perferring the mqtt approach to get both power and energy but I cant get that to work either…

When tested the mqtt approach I tested with and without the conbee II integration.
All tests has been evaluated after a complete HA reboot.

Please advice…

Did you add

serial:
  adapter: deconz

to your zigbee2mqtt config ?

No I did not have that. Just added it and…

serial:
  port: /dev/ttyACM1
  adapter: deconz

I got this error:

[09:44:42] INFO: Handing over control to Zigbee2mqtt Core ...
> [email protected] start
> node index.js
CREATED DECONZ ADAPTER
Zigbee2MQTT:error 2021-12-12 09:45:08: Error while starting zigbee-herdsman
Zigbee2MQTT:error 2021-12-12 09:45:08: Failed to start zigbee
Zigbee2MQTT:error 2021-12-12 09:45:08: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
Zigbee2MQTT:error 2021-12-12 09:45:08: Exiting...
Zigbee2MQTT:error 2021-12-12 09:45:08: undefined

Also tested with this configuration:

data_path: /config/zigbee2mqtt
external_converters: []
devices: devices.yaml
groups: groups.yaml
homeassistant: true
permit_join: false
mqtt:
  base_topic: zigbee2mqtt
serial:
  port: >-
    /dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2460510-if00
  adapter: deconz
advanced:
  log_level: warn
  pan_id: 6754
  channel: 11
  network_key:
    - 1
    - 3
    - 5
    - 7
    - 9
    - 11
    - 13
    - 15
    - 0
    - 2
    - 4
    - 6
    - 8
    - 10
    - 12
    - 13
  availability_blocklist: []
  availability_passlist: []
device_options: {}
blocklist: []
passlist: []
queue: {}
frontend:
  port: 8099
experimental: {}
availability: false
socat:
  enabled: false
  master: pty,raw,echo=0,link=/tmp/ttyZ2M,mode=777
  slave: tcp-listen:8485,keepalive,nodelay,reuseaddr,keepidle=1,keepintvl=1,keepcnt=5
  options: '-d -d'
  log: false

Getting this error:

CREATED DECONZ ADAPTER
Zigbee2MQTT:error 2021-12-12 10:27:21: Error while starting zigbee-herdsman
Zigbee2MQTT:error 2021-12-12 10:27:21: Failed to start zigbee
Zigbee2MQTT:error 2021-12-12 10:27:21: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
Zigbee2MQTT:error 2021-12-12 10:27:21: Exiting...
Zigbee2MQTT:error 2021-12-12 10:27:22: Error: Error while opening serialport 'Error: Error: Resource busy, cannot open /dev/ttyACM1'
    at SerialPort.<anonymous> (/app/node_modules/zigbee-herdsman/src/adapter/deconz/driver/driver.ts:182:28)
    at SerialPort._error (/app/node_modules/zigbee-herdsman/node_modules/@serialport/stream/lib/index.js:198:14)
    at /app/node_modules/zigbee-herdsman/node_modules/@serialport/stream/lib/index.js:242:12

Hmm now it seems to be up and running - wonder what I did…but cant still see any devices.

  1. Uninstalled ZHA (but stil have the energy monitor paired here… or does it matter?)
  2. Installed MQTT
  3. Installed Zigbee2MQTT and configured
serial:
  port: /dev/ttyACM1
  adapter: deconz
  1. Installed decontz but did not start it (read somewhere it should be installed but not started)

Seems to be up now. however do I need to unpair the devices from the ZHA and get them into zigbee2mqtt or are they linked to the USB stick (underlying thingy?)?

…I cant see any devices in the zigbee2mqtt dashboard…

indeed. Re-pair with Zigbee2mqtt.

And deconz does not need to be installed.

Ok, did a complete reinstallation of home assistant and now it finally works!