Freint Electricity Meter Interface (Develco ZHEMI101)

I didn’ know it but now i do :grinning:

The sensor sends new data every 5 seconds?

create a helper → counter to count the measure above 5900W:
(couldn’t find the config)

Count up by an automation:
counter++1 every 5 seconds, when sensor data is over 5900

  alias: Power > 5900W
  description: ''
  trigger:
  - platform: time_pattern
    seconds: /5
  condition:
  - condition: numeric_state
    entity_id: sensor.total_power
    above: '5900'
  action:
  - service: counter.increment
    target:
      entity_id: counter.times_power_5900w
  mode: single

finally: to get the minutes with powerconsumption above 5900, one more template sensor. 5*12=60
unfortunately rounding isn’t working :man_shrugging:

template:
  - sensor:
    - name: "Total Power"
      unit_of_measurement: "W"
      state: "{{ state_attr('sensor.consumption_23', 'power')| float / 10 }}"
      state_class: measurement
      device_class: power
    - name: "Total Consumption"
      unit_of_measurement: "kWh"
      state: "{{ states('sensor.consumption_23') | float / 10 }}"
      state_class: total_increasing
      device_class: energy
    - name: "Time Power > 5900W in minutes"
      state: "{{ states('counter.times_power_5900w') | float / 12 | round(0) }}"

Like this at least you get the total amount of minutes.
No fancy graph included.
You cloud create another automation to reset the counter every day.
Or you are playing around with the device and state classes. :thinking:

Thank you very much yet again! That did work, took me a good while (even though that you explain very well!) but I got a counter up and running! Tried rounding the decimals in a lot of ways, but as you said, it didn’t work. But the counter is there now! :smiley: You sure made this device better for me!

I’m trying to get it to reset daily and also to save previous values over time, I just might figure it out!

I do believe that this electricity meter is a pretty good solution for people who wants to know a bit more specific what some particular “dumb” device is pulling each day, like a old heater, a SPA-pool or something else that is not plugged to the wall.

As long as you know the power the device pulls, and that you don’t have too many other devices that pulls around that sum, you could brake it down this way.

Ideally, it would be possible to create a template sensor and add it to the energy management, so you could see the device’s consumption there.

That’s what I’m trying to figure out now, might not be able to get it into the “official” energy management, but maybe in a helper or some code (which is still ancient greek to me) that could tell me how much power the heater has used, in kWh.

Something like: If energy meter instantaneous consumption jumps 5900W, start to “record” it and express it in a template sensor as kWh consumed a specific day.

Thanks again for your help!

I can confirm that the Frient Electricity Meter now works for both wattage and kWh using ZHA.

1 Like

I installed one of these yesterday, trying to add it to the energy dashboard but it does not show up. I have read many different posts, GitHub issues, merge requests. It is properly confusing.

Has anyone got this working with ZHA? And if so what did you do?

As a newbie to home assistant, how do I do this? I tried searching and did not understand how to get this working

It’s an exemplary snippet to edit (at least the entities like ‘sensor.consumption_23’) and paste into your ‘configuration.yaml’

Maybe you should start from here:
Configuration.yaml - Home Assistant (home-assistant.io)
Advanced Configuration - Home Assistant (home-assistant.io)

This is a long running battle that i have. I have a template set up to get around the fact it doesnt by default list as a possible energy source. Template is as follows:

template:
  sensor:
    - name: "Home Energy Consumption"
      state: "{{ states('sensor.electric_meter_reader_c72a021b_smartenergy_metering_summation_delivered') | float / 1000 }}"
      unit_of_measurement: kWh
      state_class: total_increasing
      device_class: energy

Issue i have is it sometimes reports like this with huge spikes in energy consumption which are not true

Then add the fact this Github issue - [Device Support Request] Develco Frient ZHEMI101 Electricity meter reader · Issue #949 · zigpy/zha-device-handlers · GitHub
and there is about another 6 or 7 issues in different repos, none are helpful at all or show any resolution.

I am just wondering if it is worth moving away from ZHA to zigbee2mqtt at this point or if someone has this working properly via ZHA

Hi Simon,
I have the same device, working with no problem. Im using a Conbee II and ZHA.

Im not needing any “in between” template. I just point directly to the entity with the ever increasing Kwh, mine is called “sensor.develco_zhemi101_f21a021b_smartenergy_metering_summation_delivered”. I have disabled the “power meter” as it fills my DB.
Not sure why you can not get the number directly, and why you have to divide by 1000.

My device looks like this, maybe there is a difference
image

EDIT: An idea. Is the “spikes” when you restart HA? Maybe it is related to ZHA not reporting a number for the first few seconds, and your template returns “0” instead of “unaviliable”. If it returns 0, then I beleive the template sensor will show big increases for the first second it get the number after a restart.

@khvej8 Thank you very much for the response, so I have commented out the template and restarted HA. When I go to add the sensor it does not appear in the dropdown (image below)

If I go to the device like yourself this is what I see

If I go to the entity, it does not list a unit of measurement such as kWh, is that why it does not show?

And what you mention about restarts and spikes sounds about right, as they do appear after HA restarts.

What version are you running? Im on current/latest.

The difference of your setup and mine is my entity have a “kwh” as unit, like this

Your are without “unit”, hence the energy setup do not know it is a energy meter.

Not sure why. Maybe you can set it manually? Maybe I have done it during setup in August, however I do not recall:-)

EDIT: Think it will be easy to set using Customizing entities - Home Assistant

Something like
sensor.deve…:
unit_of_measurement: ‘kWh’

I am running latest also. I was messing around with this tonight and i think i got somewhere but then it just went all weird.

First off i tried looking at Manage Cluster of the device and also reading through the actual vendor tech document (https://www.develcoproducts.com/media/1782/zhemi101-technical-manual-external-meter-interface.pdf), it seems that there is a cluster attribute that can be set for unit_of_meassure. But when trying to retrieve the already set value it returns undefined as the screenshot shows.

Anyway, I started looking around and in a zigbee2mqtt github issue someone set it to kW & kWh binary, so I gave it a shot and set the attribute to that

After a few minutes I went into developer tools and states and it would show the unit_of_meassure BUT the actual units in the state did not work out to be kWh, rather it was just W.

Anyway, seeing as i had no real way of knowing what changes I had made or if they were valid, I deleted the device and re-paired it and I am back to square 1. Below i have the output from the pairing:

[0x452e:1:0x000a] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=False disable_default_response=False> manufacturer=None tsn=86 command_id=Command.Read_Attributes>
[0x452e:1:0x000a] ZCL request 0x0000: [[7]]
[0x21cf] Delivery error for seq # 0x13, on endpoint id 11 cluster 0x0006: message send failure
[0x21CF:11:0x0006]: failed to get attributes '['on_off']' on 'on_off' cluster: [0x21cf:11:0x0006]: Message send failure
[0x21CF:11:0x0006]: async_initialize: retryable request #2 failed: [0x21cf:11:0x0006]: Message send failure. Retrying in 1.0s
[0x21CF:11:0x0006]: initializing channel: from_cache: False
[0x452e:1:0xef00] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=CLUSTER_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=87 command_id=36>
[0x452e:1:0xef00] ZCL request 0x0024: [[2, 37]]
[0x452e:1:0xef00] No handler for cluster command 36
New device 0xd685 (00:15:bc:00:1b:02:2a:c7) joined the network
[0xd685] Scheduling initialization
Received frame on uninitialized device <Device model=None manuf=None nwk=0xD685 ieee=00:15:bc:00:1b:02:2a:c7 is_initialized=False> from ep 0 to ep 0, cluster 19: b'A\x85\xd6\xc7*\x02\x1b\x00\xbc\x15\x00\x00'
[0xd685:zdo] ZDO request ZDOCmd.Device_annce: [0xD685, 00:15:bc:00:1b:02:2a:c7, 0]
Tries remaining: 3
[0xd685] Requesting 'Node Descriptor'
Tries remaining: 2
[0xd685] Extending timeout for 0x1c request
Received frame on uninitialized device <Device model=None manuf=None nwk=0xD685 ieee=00:15:bc:00:1b:02:2a:c7 is_initialized=False> from ep 2 to ep 1, cluster 10: b'\x00\x02\x00\x00\x00'
[0xd685] Received ZCL while uninitialized on endpoint id 2, cluster 0x000a id, hdr: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=False disable_default_response=False> manufacturer=None tsn=2 command_id=Command.Read_Attributes>, payload: b'\x00\x00'
[0xd685] Uninitialized device command 'Command.Read_Attributes' args: [[0]]
Received frame on uninitialized device <Device model=None manuf=None nwk=0xD685 ieee=00:15:bc:00:1b:02:2a:c7 is_initialized=False> from ep 0 to ep 0, cluster 32770: b'\x1c\x00\x85\xd6\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
[0xd685] Got Node Descriptor: NodeDescriptor(logical_type=<LogicalType.EndDevice: 2>, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.0: 0>, mac_capability_flags=<MACCapabilityFlags.NONE: 0>, manufacturer_code=0, maximum_buffer_size=0, maximum_incoming_transfer_size=0, server_mask=0, maximum_outgoing_transfer_size=0, descriptor_capability_field=<DescriptorCapability.NONE: 0>, *allocate_address=False, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=True, *is_full_function_device=False, *is_mains_powered=False, *is_receiver_on_when_idle=False, *is_router=False, *is_security_capable=False)
[0xd685] Discovering endpoints
Tries remaining: 3
[0xd685] Extending timeout for 0x1e request
Received frame on uninitialized device <Device model=None manuf=None nwk=0xD685 ieee=00:15:bc:00:1b:02:2a:c7 is_initialized=False> from ep 0 to ep 0, cluster 32773: b'\x1e\x00\x85\xd6\x02\x02\x01'
[0xd685] Discovered endpoints: [2, 1]
[0xd685] Initializing endpoints [<Endpoint id=2 in=[] out=[] status=<Status.NEW: 0>>, <Endpoint id=1 in=[] out=[] status=<Status.NEW: 0>>]
[0xd685:2] Discovering endpoint information
Tries remaining: 3
[0xd685] Extending timeout for 0x20 request
Received frame on uninitialized device <Device model=None manuf=None nwk=0xD685 ieee=00:15:bc:00:1b:02:2a:c7 is_initialized=False> from ep 0 to ep 0, cluster 32772: b' \x00\x85\xd6\x10\x02\x04\x01\x07\x00\x00\x03\x00\x00\x03\x00\x02\x07\x01\n\x00'
[0xd685:2] Discovered endpoint information: SizePrefixedSimpleDescriptor(endpoint=2, profile=260, device_type=7, device_version=0, input_clusters=[0, 3, 1794], output_clusters=[10])
[0xd685:1] Discovering endpoint information
Tries remaining: 3
[0xd685] Extending timeout for 0x22 request
Received frame on uninitialized device <Device model=None manuf=None nwk=0xD685 ieee=00:15:bc:00:1b:02:2a:c7 is_initialized=False> from ep 0 to ep 0, cluster 32772: b'"\x00\x85\xd6\x10\x01\xc9\xc0\x01\x00\x01\x03\x02\x00\x03\x00\x05\x00\x01\x01\x00'
[0xd685:1] Discovered endpoint information: SizePrefixedSimpleDescriptor(endpoint=1, profile=49353, device_type=1, device_version=1, input_clusters=[2, 3, 5], output_clusters=[1])
[0xd685] Extending timeout for 0x24 request
[0xd685:2:0x0000] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=36 command_id=Command.Read_Attributes_rsp>
[0xd685] Read model 'ZHEMI101' and manufacturer 'Develco' from <Endpoint id=2 in=[basic:0x0000, identify:0x0003, smartenergy_metering:0x0702] out=[time:0x000A] status=<Status.ZDO_INIT: 1>>
[0xd685] Discovered basic device information for <Device model='ZHEMI101' manuf='Develco' nwk=0xD685 ieee=00:15:bc:00:1b:02:2a:c7 is_initialized=True>
Device is initialized <Device model='ZHEMI101' manuf='Develco' nwk=0xD685 ieee=00:15:bc:00:1b:02:2a:c7 is_initialized=True>
Checking quirks for Develco ZHEMI101 (00:15:bc:00:1b:02:2a:c7)
Considering <class 'zhaquirks.xbee.xbee_io.XBeeSensor'>
Fail because endpoint list mismatch: {232, 230} {1, 2}
Considering <class 'zhaquirks.xbee.xbee3_io.XBee3Sensor'>
Fail because endpoint list mismatch: {232, 230} {1, 2}
Considering <class 'zhaquirks.smartthings.tag_v4.SmartThingsTagV4'>
Fail because endpoint list mismatch: {1} {1, 2}
Considering <class 'zhaquirks.smartthings.multi.SmartthingsMultiPurposeSensor'>
Fail because endpoint list mismatch: {1} {1, 2}
Considering <class 'zhaquirks.netvox.z308e3ed.Z308E3ED'>
Fail because endpoint list mismatch: {1} {1, 2}
Considering <class 'zhaquirks.gledopto.soposhgu10.SoposhGU10'>
Fail because endpoint list mismatch: {11, 13} {1, 2}
Considering <class 'bellows.zigbee.application.EZSPCoordinator'>
Fail because endpoint list mismatch: {1} {1, 2}
'sensor' component -> 'SmartEnergyMetering' using ['smartenergy_metering']
'sensor' component -> 'SmartEnergySummation' using ['smartenergy_metering']
device - 0xD685:00:15:bc:00:1b:02:2a:c7 entering async_device_initialized - is_new_join: True
device - 0xD685:00:15:bc:00:1b:02:2a:c7 has joined the ZHA zigbee network
[0xD685](ZHEMI101): started configuration
[0xD685:ZDO](ZHEMI101): 'async_configure' stage succeeded
Error handling '_save_attribute' event with (00:15:bc:00:1b:02:2a:c7, 2, 0, 4, 'Develco') params: FOREIGN KEY constraint failed
[0xd685] Extending timeout for 0x26 request
[0xD685:2:0x0000]: finished channel configuration
Error handling '_save_attribute' event with (00:15:bc:00:1b:02:2a:c7, 2, 0, 5, 'ZHEMI101') params: FOREIGN KEY constraint failed
Device 0xd685 (00:15:bc:00:1b:02:2a:c7) joined the network
[0xd685:zdo] ZDO request ZDOCmd.Device_annce: [0xD685, 00:15:bc:00:1b:02:2a:c7, 0]
[0x21cf] Delivery error for seq # 0x1a, on endpoint id 11 cluster 0x0006: message send failure
[0x21CF:11:0x0006]: failed to get attributes '['on_off']' on 'on_off' cluster: [0x21cf:11:0x0006]: Message send failure
[0x21CF:11:0x0006]: async_initialize: retryable request #3 failed: [0x21cf:11:0x0006]: Message send failure. Retrying in 3.7s
[0xD685:2:0x0702]: bound 'smartenergy_metering' cluster: Status.SUCCESS
[0xd685] Extending timeout for 0x28 request
[0xd685:2:0x0702] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=3 command_id=Command.Report_Attributes>
[0xd685:2:0x0702] ZCL request 0x000a: [[Attribute(attrid=0, value=<TypeValue type=uint48_t, value=0>), Attribute(attrid=1024, value=<TypeValue type=int24s, value=0>), Attribute(attrid=512, value=<TypeValue type=bitmap8, value=bitmap8.0>), Attribute(attrid=256, value=<TypeValue type=uint48_t, value=281474976710655>), Attribute(attrid=258, value=<TypeValue type=uint48_t, value=281474976710655>)]]
[0xd685:2:0x0702] Attribute report received: current_summ_delivered=0, instantaneous_demand=0, status=0, current_tier1_summ_delivered=281474976710655, current_tier2_summ_delivered=281474976710655
Device 0x4d78 (5c:02:72:ff:fe:cb:fd:27) joined the network
[0x4d78:zdo] ZDO request ZDOCmd.Device_annce: [0x4D78, 5c:02:72:ff:fe:cb:fd:27, 128]
[0x4d78] Extending timeout for 0x2a request
[0xd685:2:0x0702] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=40 command_id=Command.Configure_Reporting_rsp>
[0xD685:2:0x0702]: Successfully configured reporting for '{'current_summ_delivered', 'instantaneous_demand', 'status'}' on 'smartenergy_metering' cluster
[0xD685:2:0x0702]: Failed to configure reporting for '[]' on 'smartenergy_metering' cluster: [ConfigureReportingResponseRecord(status=0), ConfigureReportingResponseRecord(status=0), ConfigureReportingResponseRecord(status=0)]
[0xD685:2:0x0702]: finished channel configuration
[0xD685:2:0x0702]: 'async_configure' stage succeeded
[0xD685:2:0x0000]: 'async_configure' stage succeeded
[0xD685](ZHEMI101): completed configuration
[0xD685](ZHEMI101): stored in registry: ZhaDeviceEntry(name='Develco ZHEMI101', ieee='00:15:bc:00:1b:02:2a:c7', last_seen=1643158048.9763913)
[0xd685] Extending timeout for 0x2c request
[0xd685:2:0x0702] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=4 command_id=Command.Report_Attributes>
[0xd685:2:0x0702] ZCL request 0x000a: [[Attribute(attrid=0, value=<TypeValue type=uint48_t, value=0>), Attribute(attrid=1024, value=<TypeValue type=int24s, value=0>), Attribute(attrid=512, value=<TypeValue type=bitmap8, value=bitmap8.0>), Attribute(attrid=256, value=<TypeValue type=uint48_t, value=281474976710655>), Attribute(attrid=258, value=<TypeValue type=uint48_t, value=281474976710655>)]]
[0xd685:2:0x0702] Attribute report received: current_summ_delivered=0, instantaneous_demand=0, status=0, current_tier1_summ_delivered=281474976710655, current_tier2_summ_delivered=281474976710655
[0x4d78:1:0x0004] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=CLUSTER_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=42 command_id=2>
[0x4d78] Extending timeout for 0x2e request
[0x4d78:2:0x0004] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=CLUSTER_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=46 command_id=2>
Device 0xd685 (00:15:bc:00:1b:02:2a:c7) joined the network
[0xd685:zdo] ZDO request ZDOCmd.Device_annce: [0xD685, 00:15:bc:00:1b:02:2a:c7, 0]
[0x21CF:11:0x0006]: initializing channel: from_cache: False
[0x4d78:1:0x0000] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=57 command_id=Command.Report_Attributes>
[0x4d78:1:0x0000] ZCL request 0x000a: [[Attribute(attrid=1, value=<TypeValue type=uint8_t, value=65>), Attribute(attrid=65506, value=<TypeValue type=uint8_t, value=19>)]]
[0x4d78:1:0x0000] Attribute report received: app_version=65, 65506=19
Device 0xd685 (00:15:bc:00:1b:02:2a:c7) joined the network
[0xd685:zdo] ZDO request ZDOCmd.Device_annce: [0xD685, 00:15:bc:00:1b:02:2a:c7, 0]
Device 0xd685 (00:15:bc:00:1b:02:2a:c7) joined the network
[0xd685:zdo] ZDO request ZDOCmd.Device_annce: [0xD685, 00:15:bc:00:1b:02:2a:c7, 0]
Device 0xd685 (00:15:bc:00:1b:02:2a:c7) joined the network
[0xd685:zdo] ZDO request ZDOCmd.Device_annce: [0xD685, 00:15:bc:00:1b:02:2a:c7, 0]
[0x21cf] Delivery error for seq # 0x30, on endpoint id 11 cluster 0x0006: message send failure
[0x21CF:11:0x0006]: failed to get attributes '['on_off']' on 'on_off' cluster: [0x21cf:11:0x0006]: Message send failure
[0x21CF:11:0x0006]: async_initialize: all attempts have failed: [DeliveryError('[0x21cf:11:0x0006]: Message send failure'), DeliveryError('[0x21cf:11:0x0006]: Message send failure'), DeliveryError('[0x21cf:11:0x0006]: Message send failure'), DeliveryError('[0x21cf:11:0x0006]: Message send failure')]
[0x21CF:11:0x0006]: 'async_initialize' stage succeeded
[0x21CF:11:0x0008]: 'async_initialize' stage succeeded
[0x21CF:11:0x0300]: 'async_initialize' stage succeeded
[0x21CF:11:0x1000]: 'async_initialize' stage succeeded
[0x21CF:11:0x0000]: 'async_initialize' stage succeeded
[0x21CF:11:0x0019]: 'async_initialize' stage succeeded
[0x21CF](LCT012): power source: Mains
[0x21CF](LCT012): completed initialization
None: polling current state
[0x4d78] Extending timeout for 0x32 request
None: polling current state
[0x4d78] Extending timeout for 0x34 request
None: polling current state
[0x452e] Extending timeout for 0x36 request
None: polling current state
[0x452e] Extending timeout for 0x38 request
None: polling current state
[0x452e] Extending timeout for 0x3a request
[0x452e:1:0xef00] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=CLUSTER_COMMAND manufacturer_specific=False is_reply=True disable_default_response=False> manufacturer=None tsn=88 command_id=17>
[0x452e:1:0xef00] ZCL request 0x0011: [MCUVersionRsp(tsn=9730, version=64)]
[0x452e:1:0x0006] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=54 command_id=Command.Read_Attributes_rsp>
Error handling '_unsupported_attribute_added' event with (60:a4:23:ff:fe:aa:f4:82, 1, 6, 0) params: FOREIGN KEY constraint failed
Device 0xd685 (00:15:bc:00:1b:02:2a:c7) joined the network
[0xd685:zdo] ZDO request ZDOCmd.Device_annce: [0xD685, 00:15:bc:00:1b:02:2a:c7, 0]
[0x4d78:1:0x0006] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=50 command_id=Command.Read_Attributes_rsp>
[0x452e:1:0xef00] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=CLUSTER_COMMAND manufacturer_specific=False is_reply=True disable_default_response=False> manufacturer=None tsn=88 command_id=17>
[0x452e:1:0xef00] ZCL request 0x0011: [MCUVersionRsp(tsn=9730, version=64)]
[0x4d78:2:0x0006] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=52 command_id=Command.Read_Attributes_rsp>
[0x4d78:1:0x0006] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=False> manufacturer=None tsn=58 command_id=Command.Report_Attributes>
[0x4d78:1:0x0006] ZCL request 0x000a: [[Attribute(attrid=0, value=<TypeValue type=Bool, value=Bool.true>), Attribute(attrid=16385, value=<TypeValue type=uint16_t, value=0>), Attribute(attrid=16386, value=<TypeValue type=uint16_t, value=0>)]]
[0x4d78:1:0x0006] Attribute report received: on_off=1, on_time=0, off_wait_time=0
[0x4d78:2:0x0006] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=False> manufacturer=None tsn=59 command_id=Command.Report_Attributes>
[0x4d78:2:0x0006] ZCL request 0x000a: [[Attribute(attrid=0, value=<TypeValue type=Bool, value=Bool.false>), Attribute(attrid=16385, value=<TypeValue type=uint16_t, value=0>), Attribute(attrid=16386, value=<TypeValue type=uint16_t, value=0>)]]
[0x4d78:2:0x0006] Attribute report received: on_off=0, on_time=0, off_wait_time=0
Device 0xd685 (00:15:bc:00:1b:02:2a:c7) joined the network
[0xd685:zdo] ZDO request ZDOCmd.Device_annce: [0xD685, 00:15:bc:00:1b:02:2a:c7, 0]
Device 0xd685 (00:15:bc:00:1b:02:2a:c7) joined the network
[0xd685:zdo] ZDO request ZDOCmd.Device_annce: [0xD685, 00:15:bc:00:1b:02:2a:c7, 0]
Device 0xd685 (00:15:bc:00:1b:02:2a:c7) joined the network
[0xd685:zdo] ZDO request ZDOCmd.Device_annce: [0xD685, 00:15:bc:00:1b:02:2a:c7, 0]
Device 0xd685 (00:15:bc:00:1b:02:2a:c7) joined the network
[0xd685:zdo] ZDO request ZDOCmd.Device_annce: [0xD685, 00:15:bc:00:1b:02:2a:c7, 0]
Device 0xd685 (00:15:bc:00:1b:02:2a:c7) joined the network
[0xd685:zdo] ZDO request ZDOCmd.Device_annce: [0xD685, 00:15:bc:00:1b:02:2a:c7, 0]
[0xD685:1:0x0003]: command failed: 'trigger_effect' args: '(2, 0)' kwargs '{}' exception: ''
[0xD685](ZHEMI101): started initialization
[0xD685:ZDO](ZHEMI101): 'async_initialize' stage succeeded
[0xD685:2:0x0702]: initializing channel: from_cache: False
[0xd685] Extending timeout for 0x3e request
[0xD685:2:0x0000]: initializing channel: from_cache: False
[0xD685:2:0x0000]: finished channel initialization
[0xd685:2:0x0702] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=62 command_id=Command.Read_Attributes_rsp>
[0xD685:2:0x0702]: finished channel initialization
[0xD685:2:0x0702]: 'async_initialize' stage succeeded
[0xD685:2:0x0000]: 'async_initialize' stage succeeded
[0xD685](ZHEMI101): power source: Battery or Unknown
[0xD685](ZHEMI101): completed initialization
Device 0xd685 (00:15:bc:00:1b:02:2a:c7) joined the network
[0xd685:zdo] ZDO request ZDOCmd.Device_annce: [0xD685, 00:15:bc:00:1b:02:2a:c7, 0]
[0x21CF](LCT012): Attempting to checkin with device - missed checkins: 1
Device 0xd685 (00:15:bc:00:1b:02:2a:c7) joined the network
[0xd685:zdo] ZDO request ZDOCmd.Device_annce: [0xD685, 00:15:bc:00:1b:02:2a:c7, 0]
Device 0xd685 (00:15:bc:00:1b:02:2a:c7) joined the network
[0xd685:zdo] ZDO request ZDOCmd.Device_annce: [0xD685, 00:15:bc:00:1b:02:2a:c7, 0]
Device 0xd685 (00:15:bc:00:1b:02:2a:c7) joined the network
[0xd685:zdo] ZDO request ZDOCmd.Device_annce: [0xD685, 00:15:bc:00:1b:02:2a:c7, 0]
Device 0xd685 (00:15:bc:00:1b:02:2a:c7) joined the network
[0xd685:zdo] ZDO request ZDOCmd.Device_annce: [0xD685, 00:15:bc:00:1b:02:2a:c7, 0]
[0x21cf] Delivery error for seq # 0x40, on endpoint id 11 cluster 0x0000: message send failure
Device 0xd685 (00:15:bc:00:1b:02:2a:c7) joined the network
[0xd685:zdo] ZDO request ZDOCmd.Device_annce: [0xD685, 00:15:bc:00:1b:02:2a:c7, 0]
Device 0xd685 (00:15:bc:00:1b:02:2a:c7) joined the network
[0xd685:zdo] ZDO request ZDOCmd.Device_annce: [0xD685, 00:15:bc:00:1b:02:2a:c7, 0]
Device 0xd685 (00:15:bc:00:1b:02:2a:c7) joined the network
[0xd685:zdo] ZDO request ZDOCmd.Device_annce: [0xD685, 00:15:bc:00:1b:02:2a:c7, 0]
Device 0xd685 (00:15:bc:00:1b:02:2a:c7) joined the network
[0xd685:zdo] ZDO request ZDOCmd.Device_annce: [0xD685, 00:15:bc:00:1b:02:2a:c7, 0]
Device 0xd685 (00:15:bc:00:1b:02:2a:c7) joined the network
[0xd685:zdo] ZDO request ZDOCmd.Device_annce: [0xD685, 00:15:bc:00:1b:02:2a:c7, 0]
[0xd685:2:0x0702] ZCL deserialize: <ZCLHeader frame_control=<FrameControl frame_type=GLOBAL_COMMAND manufacturer_specific=False is_reply=True disable_default_response=True> manufacturer=None tsn=5 command_id=Command.Report_Attributes>
[0xd685:2:0x0702] ZCL request 0x000a: [[Attribute(attrid=0, value=<TypeValue type=uint48_t, value=0>), Attribute(attrid=1024, value=<TypeValue type=int24s, value=0>), Attribute(attrid=512, value=<TypeValue type=bitmap8, value=bitmap8.0>), Attribute(attrid=256, value=<TypeValue type=uint48_t, value=281474976710655>), Attribute(attrid=258, value=<TypeValue type=uint48_t, value=281474976710655>)]]
[0xd685:2:0x0702] Attribute report received: current_summ_delivered=0, instantaneous_demand=0, status=0, current_tier1_summ_delivered=281474976710655, current_tier2_summ_delivered=281474976710655
Device 0xd685 (00:15:bc:00:1b:02:2a:c7) joined the network
[0xd685:zdo] ZDO request ZDOCmd.Device_annce: [0xD685, 00:15:bc:00:1b:02:2a:c7, 0]
Device 0xd685 (00:15:bc:00:1b:02:2a:c7) joined the network
[0xd685:zdo] ZDO request ZDOCmd.Device_annce: [0xD685, 00:15:bc:00:1b:02:2a:c7, 0]
Device 0xd685 (00:15:bc:00:1b:02:2a:c7) joined the network
[0xd685:zdo] ZDO request ZDOCmd.Device_annce: [0xD685, 00:15:bc:00:1b:02:2a:c7, 0]
Device 0xd685 (00:15:bc:00:1b:02:2a:c7) joined the network
[0xd685:zdo] ZDO request ZDOCmd.Device_annce: [0xD685, 00:15:bc:00:1b:02:2a:c7, 0]
Device 0xd685 (00:15:bc:00:1b:02:2a:c7) joined the network
[0xd685:zdo] ZDO request ZDOCmd.Device_annce: [0xD685, 00:15:bc:00:1b:02:2a:c7, 0]
Device 0xd685 (00:15:bc:00:1b:02:2a:c7) joined the network
[0xd685:zdo] ZDO request ZDOCmd.Device_annce: [0xD685, 00:15:bc:00:1b:02:2a:c7, 0]
Device 0xd685 (00:15:bc:00:1b:02:2a:c7) joined the network
[0xd685:zdo] ZDO request ZDOCmd.Device_annce: [0xD685, 00:15:bc:00:1b:02:2a:c7, 0]
Device 0xd685 (00:15:bc:00:1b:02:2a:c7) joined the network
[0xd685:zdo] ZDO request ZDOCmd.Device_annce: [0xD685, 00:15:bc:00:1b:02:2a:c7, 0]
Device 0xd685 (00:15:bc:00:1b:02:2a:c7) joined the network
[0xd685:zdo] ZDO request ZDOCmd.Device_annce: [0xD685, 00:15:bc:00:1b:02:2a:c7, 0]
Device 0xd685 (00:15:bc:00:1b:02:2a:c7) joined the network
[0xd685:zdo] ZDO request ZDOCmd.Device_annce: [0xD685, 00:15:bc:00:1b:02:2a:c7, 0]
Device 0xd685 (00:15:bc:00:1b:02:2a:c7) joined the network
[0xd685:zdo] ZDO request ZDOCmd.Device_annce: [0xD685, 00:15:bc:00:1b:02:2a:c7, 0]
Device 0xd685 (00:15:bc:00:1b:02:2a:c7) joined the network
[0xd685:zdo] ZDO request ZDOCmd.Device_annce: [0xD685, 00:15:bc:00:1b:02:2a:c7, 0]
Device 0xd685 (00:15:bc:00:1b:02:2a:c7) joined the network
[0xd685:zdo] ZDO request ZDOCmd.Device_annce: [0xD685, 00:15:bc:00:1b:02:2a:c7, 0]
Device 0xd685 (00:15:bc:00:1b:02:2a:c7) joined the network
[0xd685:zdo] ZDO request ZDOCmd.Device_annce: [0xD685, 00:15:bc:00:1b:02:2a:c7, 0]
[0x21CF](LCT012): Attempting to checkin with device - missed checkins: 2
Device 0xd685 (00:15:bc:00:1b:02:2a:c7) joined the network
[0xd685:zdo] ZDO request ZDOCmd.Device_annce: [0xD685, 00:15:bc:00:1b:02:2a:c7, 0]

And this is the device signature

{
  "node_descriptor": "NodeDescriptor(logical_type=<LogicalType.EndDevice: 2>, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.0: 0>, mac_capability_flags=<MACCapabilityFlags.NONE: 0>, manufacturer_code=0, maximum_buffer_size=0, maximum_incoming_transfer_size=0, server_mask=0, maximum_outgoing_transfer_size=0, descriptor_capability_field=<DescriptorCapability.NONE: 0>, *allocate_address=False, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=True, *is_full_function_device=False, *is_mains_powered=False, *is_receiver_on_when_idle=False, *is_router=False, *is_security_capable=False)",
  "endpoints": {
    "1": {
      "profile_id": 49353,
      "device_type": "0x0001",
      "in_clusters": [
        "0x0002",
        "0x0003",
        "0x0005"
      ],
      "out_clusters": [
        "0x0001"
      ]
    },
    "2": {
      "profile_id": 260,
      "device_type": "0x0007",
      "in_clusters": [
        "0x0000",
        "0x0003",
        "0x0702"
      ],
      "out_clusters": [
        "0x000a"
      ]
    }
  },
  "manufacturer": "Develco",
  "model": "ZHEMI101",
  "class": "zigpy.device.Device"
}

If i do a reconfigure this is what it returns as complete.

At this point I do not know if this is an issue on my side or is there something that needs doing on the ZHA/Zigpy side. I am hoping someone will know what is going on

Latest Update: I went to bed yesterday after resetting the device and reconnecting it to HA. It was not showing a unit of measurement as was the case before resetting. I log on today and I see this….

But I did not do any changes to the cluster (as mentioned in a previous post), I am not sure whether the changes I made before the reset, survived the reset of the device or whether something else made it show up. Either way, it now shows unit_of_meassurement but the number it is showing is incorrect, I believe it is showing W rather than kWh. If anyone knows anything please let me know.

and a little update of my tinkering.

There was something not right in how the energy dashboard was displaying the metrics or how the sensor was displaying the state numerically.

This is what it looked like in various places around Home Assistant

One number after the decimal point


Then here displaying in the thousands


Screen Shot 2022-01-26 at 16.14.40

You can see the metrics are a bit F’d. Wrong decimal points in some places, in others it does not seem to be in sync. So i went another route with this as in my head there was something i had done maybe historically and as such it was displaying new metrics along side something historical and it was trying to fit in to that. Just something i thought. So i proceeded to delete all statistics in the DB related to any sensors that i created for this device or any device that may have skewed metrics

I am using MariaDB as a backend, so I shutdown ha core

ha core stop

Then used DBeaver to connect to the Database with the credentials that can be found in the MariaDB add-on (remember to add an external port to the mariadb container so you can connect from a local machine)

I then went into the home assistant database and done a query on statistics_meta

select * from statistics_meta

That will show you all the entries, look for any which you have added to the energy dashboard as part of Grid consumption and note down the ID of them. For an example lets say the ID of one of the sensors is 55, you would then run

delete from statistics where metadata_id='55'

Do that for all the historical sensors that may be F’ing up your energy dashboard.

Then delete the row from statistics_meta for the sensors.

This should clear all historical data used for those sensors and also force HA to create new entries in the database for the sensors

Boot up ha core again

ha core start

And now for whatever reason, whether it is what i did or something else related to black magic, it looks like this or in other words…it looks normal



Hi, Happy to know it works now. A long journey:-)

Looking for a pulse meter. Suspecting you live in i Sweden, as I am, I am curious as to where you bought the Freint electricity meter!

Also, can one offset the total kwh used? The meter is not zero off course when one adds the pulse meter.

Also, how long is the cord?

Nevermind! Found it on amazon! If I understand correctly it is 3,5 cm thick? Thats a problem, how long is the cord?

Thanks

I got it from proshop.dk

The cord is app 70cm long, and it is quite thick.

1 Like

I’m thinking of getting this piece of HW. I have a few questions:

  • Does it work only with pulse reading or it can communicate via IR and read the actual counters?
  • If the device reads the counters: Is the device capable of retrieving counters per tarif? I have two tarifs low 20hrs, high 4hrs.

The one I have is pulse reading only. I beleive all of them are like this.

The traifs changes can be handled using the utility function in HA, it has build in possibility for multiply traifs. I do not have different traifs, hence I have no examples

I got this today and set it up.

I use deConz and couldn’t figure out how to add it there so I temporarily disabled deconz to add the ZHA integration. I then renabled deconz and both seem to work fine.

However, I am having the same issue as above where there is no unit of measurement and I cannot use it with the home assistant energy electricity grid set up.

I also must confess that I have no idea what each entity means:

sensor.electricity_meter_smartenergy_metering_summation_delivered seems to be showing a constantly incrementing value that is now at 1451.0. Is this the total kWh I have used? More likely I guess it is Wh and I would need to create a template sensor to divide this by 1000 convert it in to kWh? I could then create a new template sensor which multiplies this value with a cost per unit sensor to show my daily cost every day?

I gather then that sensor.electricity_meter_smartenergy_metering is showing how much energy I am expending right now - again in watts per hour? It seems fairly consistent at 300 though there have been some spikes to 2500. Is that explainable or an anomoly?

Any advice on the above would be really gratefully received :slight_smile:

EDIT: A quick template sensor shows I’ve only spent 40p in energy since 7pm…?

{{ ((states.sensor.electricity_meter_smartenergy_metering_summation_delivered.state|float) / 1000) * (states.input_text.energycost.state|float) }}

EDIT 2: Is there a way to reset the value of the summation_delivered sensor? (in order to track monthly or actual overall spend or is that another template sensor?)

1 Like

sensor.electricity_meter_smartenergy_metering_summation_delivered shows total used kWh since start or some other time. I do not know if you can reset it to zero. I have made a template sensor I update once a hour to make a graph. Only reason for the template sensor is very frequently updates of the sensor, used up +30% of my DB. Hence made a hourly updated template for graphs. For statestics I use the energy setup, giving a good overview.

sensor.electricity_meter_smartenergy_metering is showing current W used. It will be on a fairly flat level most of the time. It will spike due to e.g. the water boiler in the kitchen, or change level with other household equipment.

1 Like