Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding support for "Develco AMS HAN sensor (EMIZB-132)" #974

Closed
ShrinkWrapper opened this issue Feb 8, 2020 · 108 comments
Closed

Adding support for "Develco AMS HAN sensor (EMIZB-132)" #974

ShrinkWrapper opened this issue Feb 8, 2020 · 108 comments

Comments

@ShrinkWrapper
Copy link

ShrinkWrapper commented Feb 8, 2020

So I've been going at it for a while now and I'm at a loss on what to do next. Posting what I have so far in the hopes that someone can help me out a bit.

This is a device that connects to the HAN-port on a digital electricity meter and it should be able to read electrical measurements from the device.

Here is the datasheet for the device. https://www.develcoproducts.com/media/1783/emizb-132-technical-manual-emi-norwegian-han.pdf

This is the initial log when I connect the device in HA:
https://gist.github.com/SilentFez/94cdc5a6aa953d648323b403a6247dcc

And this is the log after adding the following in devices.js

{
    zigbeeModel: ['EMIZB-132'], 
    model: 'emizb-132',
    vendor: 'Develco',
    description: 'Wattle AMS HAN power-meter sensor',
    supports: 'Monitoring stats from central household power-meter',
    fromZigbee: [],
    toZigbee: [],
},

https://gist.github.com/SilentFez/8e28969c0a677a22c46cad9d7baa9afd

And this is the log for when I add the converter that is showing up in the second log:
https://gist.github.com/SilentFez/026af1cf913fd899d1430f9c756f8b63

When I add the device in homeassistant.js and try to pair it, nothing seems not show up and I cant seem to get any other readings for converters in the logs.

@Koenkk
Copy link
Owner

Koenkk commented Feb 8, 2020

Can you share your database.db?

@ShrinkWrapper
Copy link
Author

Thanks for helping out, much appreciated! Here is the database for zigbee2mqtt:
https://gist.github.com/SilentFez/58513f9b68e839aa86c5e6d6f0a6d95a

@Koenkk
Copy link
Owner

Koenkk commented Feb 12, 2020

Please try with

{
    zigbeeModel: ['EMIZB-132'], 
    model: 'emizb-132',
    vendor: 'Develco',
    description: 'Wattle AMS HAN power-meter sensor',
    supports: 'Monitoring stats from central household power-meter',
    fromZigbee: [fz.on_off, fz.generic_power],
    toZigbee: [tz.on_off],
    meta: {configureKey: 1},
    configure: async (device, coordinatorEndpoint) => {
        const endpoint = device.getEndpoint(2);
        await bind(endpoint, coordinatorEndpoint, ['genOnOff', 'seMetering']);
        await configureReporting.onOff(endpoint);
        await configureReporting.instantaneousDemand(endpoint);
        await endpoint.read('seMetering', ['multiplier', 'divisor']);
    },
},

@ShrinkWrapper
Copy link
Author

ShrinkWrapper commented Feb 12, 2020

This is what I get in the logs when I try it out:
https://gist.github.com/SilentFez/b6ff3f06a6dc6cea91786d84876cd8e0

It seems to output an error, then it connects on the second try.
Currently I'm getting the following readout from the device:
zigbee2mqtt:info 2020-02-12 16:27:47: MQTT publish: topic 'zigbee2mqtt/0x0015bc001b024362', payload '{"power":-8388608,"linkquality":47,"energy":4295032.83}'

I have added this in homeassistant.js in the pattern list.
'EMIZB-132': [cfg.switch, cfg.sensor_power],

Reading in the datasheet, these are the different values I should be getting https://i.imgur.com/rIYQj53.png

Edit: Just saw something else as well, there seems to be some extra code needed for some of the metering devices. I got the one marked in yellow https://i.imgur.com/lMrtown.png

Edit2: I'm getting the following when checking the device in Zigbee2MqttAssistant https://i.imgur.com/IVNGZum.png

@ShrinkWrapper
Copy link
Author

I'm getting these lines as well, not sure if they are related to this device?
https://gist.github.com/SilentFez/91f4e1e1d44ba4e9d619c90c171d2286

@Koenkk
Copy link
Owner

Koenkk commented Feb 13, 2020

  • Could you share your database.db again
  • Can you activate the zigbee2mqtt debug logging, connect a load with a known consumption (e.g. a 50 watt bulb), and provide the logging when getting the power measurements.

@ShrinkWrapper
Copy link
Author

Here is the updated database.db
https://gist.github.com/SilentFez/8d97e2a496f64aa9d03f5a5ac4976c66

@Koenkk
Copy link
Owner

Koenkk commented Feb 13, 2020

And

Can you activate the zigbee2mqtt debug logging, connect a load with a known consumption (e.g. a 50 watt bulb), and provide the logging when getting the power measurements.

?

@ShrinkWrapper
Copy link
Author

ShrinkWrapper commented Feb 14, 2020

It's not a power socket so I wont be able to see a direct comparison to a bulb being connected. It's a AMS HAN reader for the fuse box. It plugs into the main relay in the house and monitors the total consumption of power and throughput in real time. Its the device circled in the picture. Its a fairly new thing and I haven't seen many other implementations of it. So in theory I should be seeing the total wattage/consumption used in total for all my outlets, computer, heater etc.
image

And here is what I'm currently getting with debugging enabled:
https://gist.github.com/SilentFez/e3ef1aab3706b541fe0b3cbe07ba9f84

@ShrinkWrapper
Copy link
Author

ShrinkWrapper commented Feb 14, 2020

Reading in the deconz where they are adding the same device, they couldnt get any readings from it before they added the manufacture specific attributes. How would I go about adding that to the above snippet you gave me? Or is that not needed for zigbee2mqtt?
These are the attributes I need:
image

Edit: If I try with the following snippet:

{
    zigbeeModel: ['EMIZB-132'], 
    model: 'emizb-132',
    vendor: 'Develco',
    description: 'Wattle AMS HAN power-meter sensor',
    supports: 'Monitoring stats from central household power-meter',
    fromZigbee: [fz.on_off, fz.electrical_measurement],
    toZigbee: [tz.on_off],
    meta: {configureKey: 1},
    configure: async (device, coordinatorEndpoint) => {
        const endpoint = device.getEndpoint(2);
            await bind(endpoint, coordinatorEndpoint, ['genOnOff', 'haElectricalMeasurement']);
            await endpoint.read('haElectricalMeasurement', [
                'acVoltageMultiplier', 'acVoltageDivisor', 'acCurrentMultiplier',
                'acCurrentDivisor', 'acPowerMultiplier', 'acPowerDivisor',
            ]);
            await configureReporting.onOff(endpoint);
            await configureReporting.rmsVoltage(endpoint);
            await configureReporting.rmsCurrent(endpoint);
            await configureReporting.activePower(endpoint);
        },
},

I get the following in debugging:

{"frameType":0,"manufacturerSpecific":false,"direction":1,"disableDefaultResponse":true},"transactionSequenceNumber":67,"manufacturerCode":null,"commandIdentifier":10},"Payload":[{"attrId":1285,"dataType":33,"attrData":65535},{"attrId":1288,"dataType":33,"attrData":65535},{"attrId":2309,"dataType":33,"attrData":65535},{"attrId":2312,"dataType":33,"attrData":65535},{"attrId":2565,"dataType":33,"attrData":65535},{"attrId":2568,"dataType":33,"attrData":65535}]},"address":52630,"endpoint":2,"linkquality":60,"groupID":0}'
zigbee2mqtt:debug 2020-02-14 20:36:00: Received Zigbee message from '0x0015bc001b024362', type 'attributeReport', cluster 'haElectricalMeasurement', data 
zigbee2mqtt:info  2020-02-14 20:36:08: MQTT publish: topic 'zigbee2mqtt/0x0015bc001b024362', payload '{"power":65535,"linkquality":63,"energy":4295032.83,"current":65535,"voltage":65535,"state":"OFF"}
zigbee2mqtt:debug 2020-02-14 20:37:07: Received Zigbee message from '0x0015bc001b024362', type 'attributeReport', cluster 'haElectricalMeasurement', data '{"rmsVoltage":65535,"rmsCurrent":65535,"rmsVoltagePhB":65535,"rmsCurrentPhB":65535,"rmsVoltagePhC":65535,"rmsCurrentPhC":65535}' from endpoint 2 with groupID 0

Those attributes correspond with what I want to get from the meter as shown here:
image

Only problem is all the data is showing the same and Im pretty sure that has to do with the manufacture spesific attributes.
But I might be wrong..

@Koenkk
Copy link
Owner

Koenkk commented Feb 16, 2020

I don't know if it has to be added yet, it only make sense if after that we issue write requests to it.

Looking at your we already got some luck with the config from #974 (comment) as I can see you got an energy value "energy":4295032.83, this shows the total electricity that has been delivered in watts (??) does this value make sense?

@ShrinkWrapper
Copy link
Author

The energy reading seems to always be 4295032.83 when it is showing up in the log. There is a display in the fusebox that will also show the values and the total energy should be at 13270 as of now (6 PM).

@Koenkk
Copy link
Owner

Koenkk commented Feb 20, 2020

Can you try with below, this will set the mode to Kaifa (don't know if this is correct for your config), if not you can change the value: 0x0203 to the correct one.

{
    zigbeeModel: ['EMIZB-132'],
    model: 'emizb-132',
    vendor: 'Develco',
    description: 'Wattle AMS HAN power-meter sensor',
    supports: 'Monitoring stats from central household power-meter',
    fromZigbee: [fz.electrical_measurement, fz.generic_power],
    toZigbee: [],
    meta: {configureKey: 5},
    configure: async (device, coordinatorEndpoint) => {
        const endpoint = device.getEndpoint(2);
        // Kaifka meter mode https://github.com/Koenkk/zigbee-herdsman-converters/issues/974#issuecomment-586455655
        await endpoint.write('seMetering', {0x0302: {value: 0x0203, type: 49}}, {manufacturerCode: 0x1015});
        await bind(endpoint, coordinatorEndpoint, ['haElectricalMeasurement', 'seMetering']);
        await endpoint.read('haElectricalMeasurement', [
            'acVoltageMultiplier', 'acVoltageDivisor', 'acCurrentMultiplier',
            'acCurrentDivisor', 'acPowerMultiplier', 'acPowerDivisor',
        ]);
        await configureReporting.rmsVoltage(endpoint);
        await configureReporting.rmsCurrent(endpoint);
        await configureReporting.activePower(endpoint);

        await endpoint.read('seMetering', ['multiplier', 'divisor']);
        await configureReporting.instantaneousDemand(endpoint);
    },
},

@ShrinkWrapper
Copy link
Author

ShrinkWrapper commented Feb 20, 2020

Thanks for the new code. I have the Aidon meter, so I believe I need to use value: 0x0201 to enable communication. Unfortunately I don't seem to get any usable readings, they are still showing 65535 on all the data. I tried all the manufacture specific values one by one to check and repaired the device each time. Here is the log for when I pair with 0x0201 as a value:

https://gist.github.com/SilentFez/20caf69844c5e6b8eaf7881054c9b06b

Edit: I noticed something. The data I get on "power":-8388608 corresponds with the following in the datasheet. Does that mean it is picking the power data from the wrong endpoint?
image

And I'm alos getting zigbee2mqtt:debug 2020-02-20 22:28:13: No converter available for 'emizb-132' with cluster 'genBasic' and type 'readResponse' and data '{}' in the log now

@Koenkk
Copy link
Owner

Koenkk commented Feb 22, 2020

Can you provide the log with:

{
    zigbeeModel: ['EMIZB-132'],
    model: 'emizb-132',
    vendor: 'Develco',
    description: 'Wattle AMS HAN power-meter sensor',
    supports: 'Monitoring stats from central household power-meter',
    fromZigbee: [fz.electrical_measurement, fz.generic_power],
    toZigbee: [],
    meta: {configureKey: 5},
    configure: async (device, coordinatorEndpoint) => {
        const endpoint = device.getEndpoint(2);
        // Kaifka meter mode https://github.com/Koenkk/zigbee-herdsman-converters/issues/974#issuecomment-586455655
        await endpoint.write('seMetering', {0x0302: {value: 0x201, type: 49}}, {manufacturerCode: 0x1015});
        const result = await entity.read('seMetering', [0x0302], {manufacturerCode: 0x1015});
        console.log('\n\n\n', 'result', result, '\n\n\n');
        await bind(endpoint, coordinatorEndpoint, ['haElectricalMeasurement', 'seMetering']);
        await endpoint.read('haElectricalMeasurement', [
            'acVoltageMultiplier', 'acVoltageDivisor', 'acCurrentMultiplier',
            'acCurrentDivisor', 'acPowerMultiplier', 'acPowerDivisor',
        ]);
        await configureReporting.rmsVoltage(endpoint);
        await configureReporting.rmsCurrent(endpoint);
        await configureReporting.activePower(endpoint);

        await endpoint.read('seMetering', ['multiplier', 'divisor']);
        await configureReporting.instantaneousDemand(endpoint);
    },
},

@ShrinkWrapper
Copy link
Author

Here is the log when testing with the latest code. And thanks for still helping out! 👍
https://gist.github.com/SilentFez/c7c54bc903257240a0777edc3d559231

@Koenkk
Copy link
Owner

Koenkk commented Feb 23, 2020

I dont see a configure in the log which is the only thing im interested in for know. You dont have to repair everytime as you can also trigger a configure manually via https://www.zigbee2mqtt.io/information/mqtt_topics_and_message_structure.html#zigbee2mqttbridgeconfigure

@ShrinkWrapper
Copy link
Author

ShrinkWrapper commented Feb 23, 2020

Aha thanks, good to know!
Here is the log with configure in it:
It seems to throw an error each time it tries to configure
https://gist.github.com/SilentFez/60b7a05bdd8a7056b359296437f7956c

Here is line 484 in devices.js as referenced in the log:
image

@Koenkk
Copy link
Owner

Koenkk commented Feb 23, 2020

I made a mistake, it has to be

{
    zigbeeModel: ['EMIZB-132'],
    model: 'emizb-132',
    vendor: 'Develco',
    description: 'Wattle AMS HAN power-meter sensor',
    supports: 'Monitoring stats from central household power-meter',
    fromZigbee: [fz.electrical_measurement, fz.generic_power],
    toZigbee: [],
    meta: {configureKey: 5},
    configure: async (device, coordinatorEndpoint) => {
        const endpoint = device.getEndpoint(2);
        // Kaifka meter mode https://github.com/Koenkk/zigbee-herdsman-converters/issues/974#issuecomment-586455655
        await endpoint.write('seMetering', {0x0302: {value: 0x201, type: 49}}, {manufacturerCode: 0x1015});
        const result = await endpoint.read('seMetering', [0x0302], {manufacturerCode: 0x1015});
        console.log('\n\n\n', 'result', result, '\n\n\n');
        await bind(endpoint, coordinatorEndpoint, ['haElectricalMeasurement', 'seMetering']);
        await endpoint.read('haElectricalMeasurement', [
            'acVoltageMultiplier', 'acVoltageDivisor', 'acCurrentMultiplier',
            'acCurrentDivisor', 'acPowerMultiplier', 'acPowerDivisor',
        ]);
        await configureReporting.rmsVoltage(endpoint);
        await configureReporting.rmsCurrent(endpoint);
        await configureReporting.activePower(endpoint);

        await endpoint.read('seMetering', ['multiplier', 'divisor']);
        await configureReporting.instantaneousDemand(endpoint);
    },
},

@ShrinkWrapper
Copy link
Author

ShrinkWrapper commented Feb 23, 2020

Thanks, here is the updated log with the new code. It successfully configures again, but the data seems to still be the same values.

https://gist.github.com/SilentFez/6610e64d0fe7ebb2af214c7d5d18f3b3

Edit: Here is the database.db entry as well if needed:

{"id":6,"type":"EndDevice","ieeeAddr":"0x0015bc001b024362","nwkAddr":54287,"manufId":4117,"manufName":"Develco Products A/S","powerSource":"DC Source","modelId":"EMIZB-132","epList":[1,2],"endpoints":{"1":{"profId":49353,"epId":1,"devId":1,"inClusterList":[3,5,6],"outClusterList":[],"clusters":{},"binds":[]},"2":{"profId":260,"epId":2,"devId":83,"inClusterList":[0,3,32,1794,1796,2820],"outClusterList":[3,10,25],"clusters":{"genBasic":{"attributes":{"modelId":"EMIZB-132","manufacturerName":"Develco Products A/S","powerSource":4,"zclVersion":1,"dateCode":"2017-11-01 18:40"}},"seMetering":{"attributes":{"divisor":1000,"currentSummDelivered":[65535,4294967295],"instantaneousDemand":-8388608,"status":0,"multiplier":1}},"haElectricalMeasurement":{"attributes":{"rmsVoltage":65535,"rmsCurrent":65535,"rmsVoltagePhB":65535,"rmsCurrentPhB":65535,"rmsVoltagePhC":65535,"rmsCurrentPhC":65535,"acVoltageMultiplier":65535,"acVoltageDivisor":65535,"acCurrentMultiplier":65535,"acCurrentDivisor":65535}}},"binds":[{"cluster":2820,"type":"endpoint","deviceIeeeAddress":"0x00124b000be89ce1","endpointID":1},{"cluster":1794,"type":"endpoint","deviceIeeeAddress":"0x00124b000be89ce1","endpointID":1}]}},"dateCode":"2017-11-01 18:40","zclVersion":1,"interviewCompleted":true,"meta":{"configured":5},"lastSeen":1582464591712}

@Koenkk
Copy link
Owner

Koenkk commented Feb 23, 2020

Are you sure this is with the code from #974 (comment).

I'm asking because I don't see the endpoint.read('seMetering', [0x0302], {manufacturerCode: 0x1015}); being executed and also the console.log output is missing.

@ShrinkWrapper
Copy link
Author

ShrinkWrapper commented Feb 23, 2020

Yep it should be. Just in case I restarted zigbee2mqtt from inside HA just now and logged in to the new docker instance and added the code again. Screenshot of what I have added:
image

I have log_level: debug inside advanced and also zigbee_herdsman_debug: true at top-level if that could be messing up the console output.
And here is the log from the new testing:
https://gist.github.com/SilentFez/3055f94f4b9607591fe92e24a3802586

@Koenkk
Copy link
Owner

Koenkk commented Feb 23, 2020

Sorry, but I still don't see it. could it be that after a restart of the addon changes to devices.js are lost?

Also in the Deconz issue they talk about having the energy company opening the HAN port, are you sure this port is opened by your energy provider?

@ShrinkWrapper
Copy link
Author

ShrinkWrapper commented Feb 23, 2020

I did it like this:

  1. Restart zigbee2mqtt from the addon
  2. Open a terminal to HA and run docker ps to check for the new ID on the z2m docker
  3. Open bash for the new docker ID and add the device in devices.js
  4. Close the docker and restart the docker with docker restart ID
  5. Open the docker again to confirm the data is still present in device.js
  6. Repaired the device and checked the log

I contacted my energy company a couple of months ago for them to open the HAN-port and got a confirmation mail stating that they had opened it. It is also possible to measure the voltage across pin 1 and 2 on the HAN-port. The port is polling data every 30 seconds and if the port is in fact opened it should show 24V, and I have confirmed this with a multimeter so it should be sending data.

I'm on the zigbee2mqtt and Home Assistant discords (nick: SilentFez#8888) if you want login-info to my HA or terminal if that would make it easier to debug.

Edit: I can see the following lines regarding seMetering in the last log I provided, is that for something else?

zigbee2mqtt:debug 2020-02-23 18:39:05: Received Zigbee message from '0x0015bc001b024362', type 'readResponse', cluster 'seMetering', data '{"multiplier":1,"divisor":1000}' from endpoint 2 with groupID 0
2020-02-23T18:39:05.295Z zigbee-herdsman:controller:endpoint ConfigureReporting 0x0015bc001b024362/2 seMetering([{"attribute":"instantaneousDemand","minimumReportInterval":0,"maximumReportInterval":3600,"reportableChange":1}], {"timeout":10000,"defaultResponseTimeout":15000,"manufacturerCode":null,"disableDefaultResponse":true})

@Koenkk
Copy link
Owner

Koenkk commented Feb 23, 2020

@SilentFez somehow I cannot find you, could you contact me on telegram (@Koenkk)?

@ShrinkWrapper
Copy link
Author

ShrinkWrapper commented Feb 24, 2020

Update:
@Koenkk have been doing some debugging on the device and after testing we have concluded that the code is definitely working but because of an older firmware on the Wattle/Develco stick we can not get any proper readings from the device at the current time. The same has been confirmed by another user over at the deconz github with the same device connected to an Aidon meter.

@ShrinkWrapper
Copy link
Author

Update 2:
I contacted Wattle and asked them if it was possible to get the new firmware for the device. But I need to have their bridge/gateway in order to update it myself. But they were nice enough to offer to update it for me, so if I send the device to them they will make sure to upgrade it to the 2019 version that is needed for the Aidon meters. So if anyone else were to bump in to the same problem they could try and do the same, just ask if they are willing to update it for you.

@ShrinkWrapper
Copy link
Author

Just picked up the device. They have sent me a new one with the updated firmware.
Connected, paired and configured it now. It is definitely picking up values now and not just the default one we saw earlier. But I'm not sure if it is showing them correct, the voltage is at 2300 and energy seems to be a bit high as well.
https://gist.github.com/SilentFez/fcaa431d0b53f9541fac7a3c5cb25ab6

@Koenkk
Copy link
Owner

Koenkk commented Mar 18, 2020

Cool! Could you share your debug logging (when receiving measurements from the device) and database.db now?

To enable debug logging set in configuration.yaml:

advanced:
  log_level: debug

@ShrinkWrapper
Copy link
Author

ShrinkWrapper commented Mar 18, 2020

log: https://gist.github.com/SilentFez/c7cc887a9b355e19f241683c3ef02eec
database.db:

{"id":6,"type":"EndDevice","ieeeAddr":"0x0015bc001b024000","nwkAddr":61175,"manufId":4117,"manufName":"Develco Products A/S","powerSource":"DC Source","modelId":"EMIZB-132","epList":[1,2],"endpoints":{"1":{"profId":49353,"epId":1,"devId":1,"inClusterList":[3,5,6],"outClusterList":[],"clusters":{},"binds":[]},"2":{"profId":260,"epId":2,"devId":83,"inClusterList":[0,3,32,1794,1796,2820],"outClusterList":[3,10,25],"clusters":{"genBasic":{"attributes":{"modelId":"EMIZB-132","manufacturerName":"Develco Products A/S","powerSource":4,"zclVersion":1,"dateCode":"2017-08-22 06:18"}},"seMetering":{"attributes":{"divisor":1000,"currentSummDelivered":[65535,4294967295],"instantaneousDemand":560,"status":0,"multiplier":1}},"haElectricalMeasurement":{"attributes":{"rmsVoltage":2374,"rmsCurrent":26,"rmsVoltagePhB":65535,"rmsCurrentPhB":65535,"rmsVoltagePhC":65535,"rmsCurrentPhC":65535,"acVoltageMultiplier":65535,"acVoltageDivisor":65535,"acCurrentMultiplier":65535,"acCurrentDivisor":65535}}},"binds":[{"cluster":2820,"type":"endpoint","deviceIeeeAddress":"0x00124b000be89ce1","endpointID":1},{"cluster":1794,"type":"endpoint","deviceIeeeAddress":"0x00124b000be89ce1","endpointID":1}]}},"dateCode":"2017-08-22 06:18","zclVersion":1,"interviewCompleted":true,"meta":{"configured":5},"lastSeen":1584533200165}

@Koenkk
Copy link
Owner

Koenkk commented Mar 27, 2020

thanks, changes will be available in the latest dev branch this evening.

Koenkk added a commit that referenced this issue Mar 27, 2020
* Attempt to fix EMIZB-132 multiplier/divisor and add phase measurements. #974

* Update devices.js

* Updates

* Update fromZigbee.js
@toremick
Copy link

thanks, changes will be available in the latest dev branch this evening.

You do excellent work !

@toremick
Copy link

toremick commented Mar 28, 2020

Would it be possible to change the unit of the energy point. It is now "kW" which is the unit for power. Energy is power over time i.e. "kWh"

@Koenkk
Copy link
Owner

Koenkk commented Mar 28, 2020

@toremick done!

@SwoopX
Copy link

SwoopX commented Apr 22, 2020

Great work guys and really cool that you got it working. You also "on the fly" proved my theory on the firmware being the root cause of the missing values.

Just wanted to chime in on the previous question around the firmware, which is indeed not the date code (#974 (comment)). As to my knowledge, it's more the manufacturing date. The firmware and hardware version is "hidden" in manufacturer specific attributes of the basic cluster. If you're interested, check out general.xml in deconz repository (pretty much at the beginning). Should be 8010, 8020, ...
Although data is octet string, data must be read as raw byte value and not the ascii representation!

@christerr
Copy link

I have a problem with this device - only getting generic readings and also getting some error messages - and was wondering if you have any suggestions as how to fix this? I am using the latest dev version, which include the above fixes. The device is brand new, with a relatively fresh manufacturing date according to the dateCode from database.db - so maybe not the FW issue talked about earlier? HAN port confirmed open by the electricity company here in Norway - and I have an Aidon meter. The EMIZB-132 is connected to the coordinator (CC2531) routed via an IKEA E1603/E1702 due to range to meter.

I set interface mode after pairing by:

mosquitto_pub -t 'zigbee2mqtt/0x0015bc001b024ce5/set' -m '{"interface_mode": "norwegian_han_extra_load"}'

From database.db:

{"id":6,"type":"EndDevice","ieeeAddr":"0x0015bc001b024ce5","nwkAddr":48396,"manufId":4117,"manufName":"Develco Products A/S","powerSource":"DC Source","modelId":"EMIZB-132","epList":[1,2],"endpoints":{"1":{"profId":49353,"epId":1,"devId":1,"inClusterList":[3,5,6],"outClusterList":[],"clusters":{},"binds":[]},"2":{"profId":260,"epId":2,"devId":83,"inClusterList":[0,3,32,1794,1796,2820],"outClusterList":[3,10,25],"clusters":{"genBasic":{"attributes":{"modelId":"EMIZB-132","manufacturerName":"Develco Products A/S","powerSource":4,"zclVersion":1,"dateCode":"2019-07-11 23:42"}},"haElectricalMeasurement":{"attributes":{"rmsVoltage":65535,"rmsCurrent":65535,"rmsVoltagePhB":65535,"rmsCurrentPhB":65535,"rmsVoltagePhC":65535,"rmsCurrentPhC":65535,"acVoltageMultiplier":65535,"acVoltageDivisor":65535,"acCurrentMultiplier":65535,"acCurrentDivisor":65535}},"seMetering":{"attributes":{"currentSummDelivered":[65535,4294967295],"instantaneousDemand":-8388608,"status":0}}},"binds":[{"cluster":2820,"type":"endpoint","deviceIeeeAddress":"0x00124b0018e2515d","endpointID":1},{"cluster":1794,"type":"endpoint","deviceIeeeAddress":"0x00124b0018e2515d","endpointID":1}]}},"dateCode":"2019-07-11 23:42","zclVersion":1,"interviewCompleted":true,"meta":{},"lastSeen":1587633975175}

Every time I start z2m, I see generic reporting from the device in addition to the following error messages:

^[[32mzigbee2mqtt:info ^[[39m 2020-04-23 11:25:32: MQTT publish: topic 'zigbee2mqtt/bridge/config', payload '{"version":"1.12.2-dev","commit":"d073a7f","coordinator":{"type":"zStack12","meta":{"transportrev":2,"product":0,"majorrel":2,"minorrel":6,"maintrel":3,"revision":20190608}},"log_level":"debug","permit_join":true}'

...

^[[34mzigbee2mqtt:debug^[[39m 2020-04-23 11:25:37: Received Zigbee message from '0x0015bc001b024ce5', type 'attributeReport', cluster 'haElectricalMeasurement', data '{"rmsVoltage":65535,"rmsCurrent":65535,"rmsVoltagePhB":65535,"rmsCurrentPhB":65535,"rmsVoltagePhC":65535,"rmsCurrentPhC":65535}' from endpoint 2 with groupID 0
^[[32mzigbee2mqtt:info ^[[39m 2020-04-23 11:25:37: MQTT publish: topic 'zigbee2mqtt/0x0015bc001b024ce5', payload '{"current":65535,"current_phase_b":65535,"current_phase_c":65535,"voltage":65535,"voltage_phase_b":65535,"voltage_phase_c":65535,"linkquality":65,"power":-8388608,"interface_mode":"norwegian_han_extra_load"}'
^[[34mzigbee2mqtt:debug^[[39m 2020-04-23 11:25:45: Received Zigbee message from '0x0015bc001b024ce5', type 'attributeReport', cluster 'seMetering', data '{"currentSummDelivered":[65535,4294967295],"instantaneousDemand":-8388608,"status":0}' from endpoint 2 with groupID 0
^[[32mzigbee2mqtt:info ^[[39m 2020-04-23 11:25:45: MQTT publish: topic 'zigbee2mqtt/0x0015bc001b024ce5', payload '{"current":65535,"current_phase_b":65535,"current_phase_c":65535,"voltage":65535,"voltage_phase_b":65535,"voltage_phase_c":65535,"linkquality":65,"power":-8388608,"interface_mode":"norwegian_han_extra_load"}'
^[[34mzigbee2mqtt:debug^[[39m 2020-04-23 11:25:45: Received Zigbee message from '0x0015bc001b024ce5', type 'readResponse', cluster 'haElectricalMeasurement', data '{"acVoltageMultiplier":65535,"acVoltageDivisor":65535,"acCurrentMultiplier":65535}' from endpoint 2 with groupID 0
^[[34mzigbee2mqtt:debug^[[39m 2020-04-23 11:25:52: Received Zigbee message from '0x0015bc001b024ce5', type 'readResponse', cluster 'haElectricalMeasurement', data '{"acCurrentDivisor":65535}' from endpoint 2 with groupID 0
^[[31mzigbee2mqtt:error^[[39m 2020-04-23 11:25:52: Failed to configure '0x0015bc001b024ce5', attempt 1 (Error: Read 0x0015bc001b024ce5/2 haElectricalMeasurement(["acCurrentDivisor","acPowerMultiplier","acPowerDivisor"], {"timeout":10000,"manufacturerCode":null,"disableDefaultResponse":true}) failed (Error: Status 'UNSUPPORTED_ATTRIBUTE')
    at Endpoint.<anonymous> (/opt/zigbee2mqtt/node_modules/zigbee-herdsman/dist/controller/model/endpoint.js:182:23)
    at Generator.next (<anonymous>)
    at fulfilled (/opt/zigbee2mqtt/node_modules/zigbee-herdsman/dist/controller/model/endpoint.js:5:58))
^[[34mzigbee2mqtt:debug^[[39m 2020-04-23 11:25:56: Received Zigbee message from '0x0015bc001b024ce5', type 'attributeReport', cluster 'haElectricalMeasurement', data '{"rmsVoltage":65535,"rmsCurrent":65535,"rmsVoltagePhB":65535,"rmsCurrentPhB":65535,"rmsVoltagePhC":65535,"rmsCurrentPhC":65535}' from endpoint 2 with groupID 0
^[[32mzigbee2mqtt:info ^[[39m 2020-04-23 11:25:57: MQTT publish: topic 'zigbee2mqtt/0x0015bc001b024ce5', payload '{"current":65535,"current_phase_b":65535,"current_phase_c":65535,"voltage":65535,"voltage_phase_b":65535,"voltage_phase_c":65535,"linkquality":65,"power":-8388608,"interface_mode":"norwegian_han_extra_load"}'
^[[32mzigbee2mqtt:info ^[[39m 2020-04-23 11:25:57: Configuring '0x0015bc001b024ce5'
^[[34mzigbee2mqtt:debug^[[39m 2020-04-23 11:25:58: Received Zigbee message from '0x0015bc001b024ce5', type 'attributeReport', cluster 'haElectricalMeasurement', data '{"rmsVoltage":65535,"rmsCurrent":65535,"rmsVoltagePhB":65535,"rmsCurrentPhB":65535,"rmsVoltagePhC":65535,"rmsCurrentPhC":65535}' from endpoint 2 with groupID 0
^[[32mzigbee2mqtt:info ^[[39m 2020-04-23 11:25:58: MQTT publish: topic 'zigbee2mqtt/0x0015bc001b024ce5', payload '{"current":65535,"current_phase_b":65535,"current_phase_c":65535,"voltage":65535,"voltage_phase_b":65535,"voltage_phase_c":65535,"linkquality":65,"power":-8388608,"interface_mode":"norwegian_han_extra_load"}'
^[[34mzigbee2mqtt:debug^[[39m 2020-04-23 11:26:00: Received Zigbee message from '0x0015bc001b024ce5', type 'attributeReport', cluster 'seMetering', data '{"currentSummDelivered":[65535,4294967295],"instantaneousDemand":-8388608,"status":0}' from endpoint 2 with groupID 0
^[[32mzigbee2mqtt:info ^[[39m 2020-04-23 11:26:00: MQTT publish: topic 'zigbee2mqtt/0x0015bc001b024ce5', payload '{"current":65535,"current_phase_b":65535,"current_phase_c":65535,"voltage":65535,"voltage_phase_b":65535,"voltage_phase_c":65535,"linkquality":65,"power":-8388608,"interface_mode":"norwegian_han_extra_load"}'
^[[34mzigbee2mqtt:debug^[[39m 2020-04-23 11:26:07: Received Zigbee message from '0x0015bc001b024ce5', type 'readResponse', cluster 'haElectricalMeasurement', data '{"acVoltageMultiplier":65535,"acVoltageDivisor":65535,"acCurrentMultiplier":65535}' from endpoint 2 with groupID 0
^[[34mzigbee2mqtt:debug^[[39m 2020-04-23 11:26:15: Received Zigbee message from '0x0015bc001b024ce5', type 'readResponse', cluster 'haElectricalMeasurement', data '{"acCurrentDivisor":65535}' from endpoint 2 with groupID 0
^[[31mzigbee2mqtt:error^[[39m 2020-04-23 11:26:15: Failed to configure '0x0015bc001b024ce5', attempt 2 (Error: Read 0x0015bc001b024ce5/2 haElectricalMeasurement(["acCurrentDivisor","acPowerMultiplier","acPowerDivisor"], {"timeout":10000,"manufacturerCode":null,"disableDefaultResponse":true}) failed (Error: Status 'UNSUPPORTED_ATTRIBUTE')
    at Endpoint.<anonymous> (/opt/zigbee2mqtt/node_modules/zigbee-herdsman/dist/controller/model/endpoint.js:182:23)
    at Generator.next (<anonymous>)
    at fulfilled (/opt/zigbee2mqtt/node_modules/zigbee-herdsman/dist/controller/model/endpoint.js:5:58))

...

@SwoopX
Copy link

SwoopX commented Apr 23, 2020

so maybe not the FW issue talked about earlier

IMHO, you only can be sure if you compare the FW versions. Manufacturer specific attributes 0x8000 and 0x8010 of the basic cluster should be of interest here.

The error on the manufacturer code being null rings a bell. The device may behave a bit "special" on that one. Some Develco devices do not have it included in the device announcement response and some not in the node descriptor...

@christerr
Copy link

Thanks. I am fumbling in the dark here, never used Wireshark before - but the frame below from EMIZB-132 caught my attention with regards to "Software Build Id". Is there anything to be understood from that, am I looking at the right place or is there another way I should proceed to get the FW version on the device?

Frame 1797: 62 bytes on wire (496 bits), 62 bytes captured (496 bits) on interface 0
ZBOSS dump, IN, page 0, channel 18
IEEE 802.15.4 Data, Dst: 0x71be, Src: 0x57b1
ZigBee Network Layer Data, Dst: 0x0000, Src: 0x57b1
ZigBee Application Support Layer Data, Dst Endpt: 1, Src Endpt: 2
    Frame Control Field: Data (0x00)
    Destination Endpoint: 1
    Cluster: Basic (0x0000)
    Profile: Home Automation (0x0104)
    Source Endpoint: 2
    Counter: 24
ZigBee Cluster Library Frame, Command: Read Attributes Response, Seq: 11
    Frame Control Field: Profile-wide (0x18)
    Sequence Number: 11
    Command: Read Attributes Response (0x01)
    Status Record
        Attribute: Software Build Id (0x4000)
        Status: Unsupported Attribute (0x86)

0000   5a 42 4f 53 53 00 12 00 00 00 00 61 88 25 62 1a   ZBOSS......a.%b.
0010   be 71 b1 57 48 02 00 00 b1 57 1e 06 28 1d 00 00   .q.WH....W..(...
0020   00 e5 4c 02 1b 00 bc 15 00 00 02 1b 98 38 36 a6   ..L..........86.
0030   67 d3 6b 3f ea 24 fc bd d7 ab 4a 9a d6 e7         g.k?.$....J...

@SwoopX
Copy link

SwoopX commented Apr 24, 2020

That's not unusual what you see here and has nothing to do with the firmware version of the device.

I don't know how manufacturer specific attributes can be read with z2m, sry. Just wanted to give guidance where that information is to be found with my comment above.

@ShrinkWrapper
Copy link
Author

Facing some issues after updating to 1.13.0. The device is having trouble configuring after starting z2m. Tried to remove the device and repair as well. During configuration it seems to output some values but then suddenly stops when it fails to configure.
Without debug: https://gist.github.com/SilentFez/6c74f4eba3561362a4aa2d8fb7c3fff3
With debug: https://gist.github.com/SilentFez/a02f4f1df48961845976e743c758926e

@Koenkk
Copy link
Owner

Koenkk commented May 2, 2020

Can you try changing the entry in devices.js to

{
    zigbeeModel: ['EMIZB-132'],
    model: 'EMIZB-132',
    vendor: 'Develco',
    description: 'Wattle AMS HAN power-meter sensor',
    supports: 'power measurements',
    fromZigbee: [fz.metering_power, fz.electrical_measurement_power],
    toZigbee: [tz.EMIZB_132_mode],
    meta: {configureKey: 9},
    configure: async (device, coordinatorEndpoint) => {
        const endpoint = device.getEndpoint(2);
        await bind(endpoint, coordinatorEndpoint, ['haElectricalMeasurement', 'seMetering']);

        // await readEletricalMeasurementPowerConverterAttributes(endpoint);
        await configureReporting.rmsVoltage(endpoint);
        await configureReporting.rmsCurrent(endpoint);
        await configureReporting.activePower(endpoint);

        await readMeteringPowerConverterAttributes(endpoint);
        await configureReporting.instantaneousDemand(endpoint);
        await configureReporting.currentSummDelivered(endpoint);
        await configureReporting.currentSummReceived(endpoint);
    },
},

@ShrinkWrapper
Copy link
Author

ShrinkWrapper commented May 2, 2020

Changing out the entry and sending configure commands gives me the following:

zigbee2mqtt:error 2020-05-02 11:53:10: Failed to configure '0x0015bc001b024000', attempt 1 (Error: ConfigureReporting 0x0015bc001b024000/2 haElectricalMeasurement([{"attribute":"activePower","minimumReportInterval":5,"maximumReportInterval":300,"reportableChange":1}], {"timeout":10000,"manufacturerCode":null,"disableDefaultResponse":true}) failed (Error: Status 'UNSUPPORTED_ATTRIBUTE')
    at Endpoint.<anonymous> (/zigbee2mqtt-1.13.0/node_modules/zigbee-herdsman/dist/controller/model/endpoint.js:326:23)
    at Generator.next (<anonymous>)
    at fulfilled (/zigbee2mqtt-1.13.0/node_modules/zigbee-herdsman/dist/controller/model/endpoint.js:5:58))

@Koenkk
Copy link
Owner

Koenkk commented May 2, 2020

And with:

{
    zigbeeModel: ['EMIZB-132'],
    model: 'EMIZB-132',
    vendor: 'Develco',
    description: 'Wattle AMS HAN power-meter sensor',
    supports: 'power measurements',
    fromZigbee: [fz.metering_power, fz.electrical_measurement_power],
    toZigbee: [tz.EMIZB_132_mode],
    meta: {configureKey: 9},
    configure: async (device, coordinatorEndpoint) => {
        const endpoint = device.getEndpoint(2);
        await bind(endpoint, coordinatorEndpoint, ['haElectricalMeasurement', 'seMetering']);

        try {
        await readEletricalMeasurementPowerConverterAttributes(endpoint);
        await configureReporting.rmsVoltage(endpoint);
        await configureReporting.rmsCurrent(endpoint);
        await configureReporting.activePower(endpoint);
        } catch (e) {}

        await readMeteringPowerConverterAttributes(endpoint);
        await configureReporting.instantaneousDemand(endpoint);
        await configureReporting.currentSummDelivered(endpoint);
        await configureReporting.currentSummReceived(endpoint);
    },
},

@ShrinkWrapper
Copy link
Author

ShrinkWrapper commented May 2, 2020

That worked flawlessly! Thank you very much 👍

zigbee2mqtt:info  2020-05-02 14:13:05: Configuring '0x0015bc001b024000'
zigbee2mqtt:info  2020-05-02 14:13:09: Successfully configured '0x0015bc001b024000'
zigbee2mqtt:info  2020-05-02 14:13:13: MQTT publish: topic 'zigbee2mqtt/0x0015bc001b024000', payload '{"current":20.4,"current_phase_b":6553.5,"current_phase_c":6553.5,"voltage":235.7,"voltage_phase_b":6553.5,"voltage_phase_c":6553.5,"linkquality":47,"power":4858,"interface_mode":"norwegian_han_extra_load","energy":15086.47}'
zigbee2mqtt:info  2020-05-02 14:13:15: MQTT publish: topic 'zigbee2mqtt/0x0015bc001b024000', payload '{"current":20.4,"current_phase_b":6553.5,"current_phase_c":6553.5,"voltage":235.7,"voltage_phase_b":6553.5,"voltage_phase_c":6553.5,"linkquality":47,"power":4874,"interface_mode":"norwegian_han_extra_load","energy":15086.47}'
zigbee2mqtt:info  2020-05-02 14:13:21: MQTT publish: topic 'zigbee2mqtt/0x0015bc001b024000', payload '{"current":20.4,"current_phase_b":6553.5,"current_phase_c":6553.5,"voltage":235.7,"voltage_phase_b":6553.5,"voltage_phase_c":6553.5,"linkquality":44,"power":4882,"interface_mode":"norwegian_han_extra_load","energy":15086.47}'
zigbee2mqtt:info  2020-05-02 14:13:21: MQTT publish: topic 'zigbee2mqtt/0x0015bc001b024000', payload '{"current":20.7,"current_phase_b":6553.5,"current_phase_c":6553.5,"voltage":235.6,"voltage_phase_b":6553.5,"voltage_phase_c":6553.5,"linkquality":47,"power":4882,"interface_mode":"norwegian_han_extra_load","energy":15086.47}'
zigbee2mqtt:info  2020-05-02 14:13:23: MQTT publish: topic 'zigbee2mqtt/0x0015bc001b024000', payload '{"current":20.7,"current_phase_b":6553.5,"current_phase_c":6553.5,"voltage":235.6,"voltage_phase_b":6553.5,"voltage_phase_c":6553.5,"linkquality":44,"power":4896,"interface_mode":"norwegian_han_extra_load","energy":15086.47}'

Koenkk added a commit that referenced this issue May 2, 2020
@Koenkk
Copy link
Owner

Koenkk commented May 2, 2020

@SilentFez thanks, will push it to the dev branch soon.

@damtjern
Copy link

damtjern commented Jun 18, 2020

After struggling with trying to get this to work for a while with deconz, I recieved my CC2531 trying my luck with z2m, now it finally seems interface mode was set right, but values still doesnt update.
Running 1.14.0-dev. Not sure if i set the right interface, tried both norwegian_han_extra_load
d` and 'aidon_meter'. Will auto detect also be added?
image

Edit; I have a different version of the Aidon device than SilentFez, my model is 5125, which is 3x230v instead of 2phase

Heres my db
{"id":1,"type":"Coordinator","ieeeAddr":"0x00124b001949dc5c","nwkAddr":0,"manufId":0,"epList":[1,2,3,4,5,6,8,11,12,13,47,110,242],"endpoints":{"1":{"profId":260,"epId":1,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{},"binds":[]},"2":{"profId":257,"epId":2,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{},"binds":[]},"3":{"profId":261,"epId":3,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{},"binds":[]},"4":{"profId":263,"epId":4,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{},"binds":[]},"5":{"profId":264,"epId":5,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{},"binds":[]},"6":{"profId":265,"epId":6,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{},"binds":[]},"8":{"profId":260,"epId":8,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{},"binds":[]},"11":{"profId":260,"epId":11,"devId":1024,"inClusterList":[],"outClusterList":[1280,1282],"clusters":{},"binds":[]},"12":{"profId":49246,"epId":12,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{},"binds":[]},"13":{"profId":260,"epId":13,"devId":5,"inClusterList":[25],"outClusterList":[],"clusters":{},"binds":[]},"47":{"profId":260,"epId":47,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{},"binds":[]},"110":{"profId":260,"epId":110,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{},"binds":[]},"242":{"profId":41440,"epId":242,"devId":5,"inClusterList":[],"outClusterList":[],"clusters":{},"binds":[]}},"interviewCompleted":true,"meta":{},"lastSeen":null} {"id":2,"type":"EndDevice","ieeeAddr":"0x0015bc001b024d71","nwkAddr":42738,"manufId":4117,"manufName":"Develco Products A/S","powerSource":"DC Source","modelId":"EMIZB-132","epList":[1,2],"endpoints":{"1":{"profId":49353,"epId":1,"devId":1,"inClusterList":[3,5,6],"outClusterList":[],"clusters":{},"binds":[]},"2":{"profId":260,"epId":2,"devId":83,"inClusterList":[0,3,32,1794,1796,2820],"outClusterList":[3,10,25],"clusters":{"genBasic":{"attributes":{"modelId":"EMIZB-132","manufacturerName":"Develco Products A/S","powerSource":4,"zclVersion":1,"dateCode":"2019-07-11 21:23"}},"haElectricalMeasurement":{"attributes":{"rmsVoltage":65535,"rmsCurrent":65535,"rmsVoltagePhB":65535,"rmsCurrentPhB":65535,"rmsVoltagePhC":65535,"rmsCurrentPhC":65535,"acVoltageMultiplier":1,"acVoltageDivisor":10,"acCurrentMultiplier":1,"acCurrentDivisor":10}},"seMetering":{"attributes":{"currentSummDelivered":[65535,4294967295],"instantaneousDemand":-8388608,"status":0,"multiplier":1,"divisor":1000,"currentSummReceived":[65535,4294967295]}}},"binds":[{"cluster":2820,"type":"endpoint","deviceIeeeAddress":"0x00124b001949dc5c","endpointID":1},{"cluster":1794,"type":"endpoint","deviceIeeeAddress":"0x00124b001949dc5c","endpointID":1}]}},"dateCode":"2019-07-11 21:23","zclVersion":1,"interviewCompleted":true,"meta":{"configured":9},"lastSeen":1592513589772}

@SwoopX
Copy link

SwoopX commented Jun 18, 2020

@damtjern You are aware that you require Develco's latest firmware for that, aren't you?

@damtjern
Copy link

Yes, but to my understanding 2019-07 is the latest? Considering to buy the gateway from develco to check if my device actually works

@SwoopX
Copy link

SwoopX commented Jun 18, 2020

Well, I don't know. This seems something they're very strict about. Was in contact with their support and discussed a potential firmware bug (which apparently was none) and also asked for it for my smoke sensors. Unfortunately nothing.

But hey, if you buy the gateway, I'll send you all my stuff for a firmware update 😂

@LarsSimonsen
Copy link

LarsSimonsen commented Aug 12, 2020

I just bought an EMIZB-132. The meter is a Kamstrup, and "interface_mode": "kaifa_and_kamstrup" is the only mode that seems to produce any meaningful data for me.

The current and voltage values reported through zigbee2mqtt all seem to be correct. However, the power value seems to be exactly double of what I can read off the LCD screen on my meter.

Also, the energy value is way too high. The Kamstrup meter seems to update the energy value only once every whole hour. The value reported through zigbee2mqtt also increases every hour, but at the moment it's about 217.53 times higher than what the LCD screen shows.

I'm just going to halve the power in Node-Red and I think I'll be good, but if I'm going to make any sense of the energy number, I'm going to have to look at how it changes over time.

@havardthom
Copy link

havardthom commented Mar 13, 2021

Hi, I'm using hassio-zigbee2mqtt and getting an error when EMIZB-132 is configured:

Zigbee2MQTT:error 2021-03-13 11:01:12: Failed to configure '0x0015bc001b02445c', attempt 1 (Error: Bind 0x0015bc001b02445c/2 seMetering from '0x00212effff05a3fc/1' failed (waiting for response TIMEOUT)
    at DeconzAdapter.<anonymous> (/app/node_modules/zigbee-herdsman/dist/adapter/deconz/adapter/deconzAdapter.js:710:23)
    at Generator.throw (<anonymous>)
    at rejected (/app/node_modules/zigbee-herdsman/dist/adapter/deconz/adapter/deconzAdapter.js:25:65)
    at runMicrotasks (<anonymous>)
    at runNextTicks (internal/process/task_queues.js:58:5)
    at processTimers (internal/timers.js:494:9))

I see that you try catch this error ( 7ef6e54), but still raise it, any particular reason for that?

I've tried overwriting devices.js using the hassio method (https://www.zigbee2mqtt.io/information/configuration.html#external-converters-configuration), but my .js file does not seem to overwrite the original device since I can not see any of my log messages.

const fz = require('zigbee-herdsman-converters/converters/fromZigbee');
const tz = require('zigbee-herdsman-converters/converters/toZigbee');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const e = exposes.presets;

const bind = async (endpoint, target, clusters) => {
    for (const cluster of clusters) {
        await endpoint.bind(cluster, target);
    }
};

const device = {
    zigbeeModel: ['EMIZB-132'],
    model: 'EMIZB-132',
    vendor: 'Develco',
    description: 'Wattle AMS HAN power-meter sensor',
    supports: 'power measurements',
    fromZigbee: [fz.metering_power, fz.electrical_measurement_power],
    toZigbee: [tz.EMIZB_132_mode],
    meta: {configureKey: 9},
    configure: async (device, coordinatorEndpoint, logger) => {
        logger.debug("CONFIGURING EMIZB-132")
        const endpoint = device.getEndpoint(2);
        await bind(endpoint, coordinatorEndpoint, ['haElectricalMeasurement', 'seMetering']);
    
        try {
            await readEletricalMeasurementPowerConverterAttributes(endpoint);
            await configureReporting.rmsVoltage(endpoint);
            await configureReporting.rmsCurrent(endpoint);
            await configureReporting.activePower(endpoint);
        } catch (e) {
            logger.debug("error catched")
        }
    
        await readMeteringPowerConverterAttributes(endpoint);
        await configureReporting.instantaneousDemand(endpoint);
        await configureReporting.currentSummDelivered(endpoint);
        await configureReporting.currentSummReceived(endpoint);
    },
    exposes: [e.power(), e.energy(), e.current(), e.voltage(), e.current_phase_b(), e.voltage_phase_b(), e.current_phase_c(),
            e.voltage_phase_c()],
};

module.exports = device;

Anyone have ideas how I can fix this?

@havardthom
Copy link

havardthom commented Nov 8, 2021

Latest zigbee2mqtt release adds OTA support for Develco EMIZB-132: https://github.com/Koenkk/zigbee2mqtt/releases/tag/1.22.0

Firmware v4.0.1 is now available through OTA in zigbee2mqtt !!

I am currently updating my device from the outdated "2017-11-01 12:57" firmware, will report if the device starts working after.

Edit:
Can confirm that the device is now reporting correct values for power, energy, current, voltage attributes.

I've experienced flickering of some of my zigbee lights after updating the device, possibly due to high amount of traffic. Tried changing the Min rep change for InstantaneousDemand from 1 second to 60 seconds, but I still have some light flickering issues. Anyone else experienced this?

@LarsSimonsen
Copy link

I updated to the "2019-09-10 14:56" firmware, and power is no longer doubled, but current 1 and current 3 show as crazy high, over 600A each. Current 2 seems somewhat more plausible at around 10A.

@havardthom
Copy link

Very happy with the accuracy of the HAN sensor, here's a comparison of power usage recorded from the sensor yesterday vs. what my provider has registered.
home_assistant
fjordkraft

@MrsinNo
Copy link

MrsinNo commented Aug 19, 2022

Hi
I got my new EMIZB-132 Develco
There was no problem with connection but mqtt is showing some weird measurements like in this log below
I have tried all Configuring interface mode from here https://www.zigbee2mqtt.io/devices/EMIZB-132.html
but still the same error
Hope You guys can help me

MQTT1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants